diff --git a/_unit_tests_2compat_8hpp_source.html b/_unit_tests_2compat_8hpp_source.html index 26a84670b..2ecf4aa6e 100644 --- a/_unit_tests_2compat_8hpp_source.html +++ b/_unit_tests_2compat_8hpp_source.html @@ -170,7 +170,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/annotated.html b/annotated.html index 6bdad2db9..cde5b1706 100644 --- a/annotated.html +++ b/annotated.html @@ -224,7 +224,7 @@ $(function() { diff --git a/base64_8hpp_source.html b/base64_8hpp_source.html index 591908cb0..722510b69 100644 --- a/base64_8hpp_source.html +++ b/base64_8hpp_source.html @@ -346,7 +346,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/chrono_8hpp_source.html b/chrono_8hpp_source.html index 996853931..468ad018b 100644 --- a/chrono_8hpp_source.html +++ b/chrono_8hpp_source.html @@ -466,7 +466,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/classes.html b/classes.html index 3f52b0c59..17a4db798 100644 --- a/classes.html +++ b/classes.html @@ -133,7 +133,7 @@ $(function() { diff --git a/classstdex_1_1base64__dec-members.html b/classstdex_1_1base64__dec-members.html index b67d01328..69310f44f 100644 --- a/classstdex_1_1base64__dec-members.html +++ b/classstdex_1_1base64__dec-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1base64__dec.html b/classstdex_1_1base64__dec.html index afb70722a..ee2fb689e 100644 --- a/classstdex_1_1base64__dec.html +++ b/classstdex_1_1base64__dec.html @@ -230,7 +230,7 @@ template<class _Ty , class _Ax , class _Tchr > diff --git a/classstdex_1_1base64__enc-members.html b/classstdex_1_1base64__enc-members.html index db423b4b8..702328067 100644 --- a/classstdex_1_1base64__enc-members.html +++ b/classstdex_1_1base64__enc-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1base64__enc.html b/classstdex_1_1base64__enc.html index 6c5c134a6..87bed9132 100644 --- a/classstdex_1_1base64__enc.html +++ b/classstdex_1_1base64__enc.html @@ -235,7 +235,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classstdex_1_1charset__encoder-members.html b/classstdex_1_1charset__encoder-members.html index d605ad026..b399468a2 100644 --- a/classstdex_1_1charset__encoder-members.html +++ b/classstdex_1_1charset__encoder-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1charset__encoder.html b/classstdex_1_1charset__encoder.html index facfdc6d3..f82d71c81 100644 --- a/classstdex_1_1charset__encoder.html +++ b/classstdex_1_1charset__encoder.html @@ -607,7 +607,7 @@ template<class _Traits_to = std::char_traits<T_to>, class _Alloc_to = diff --git a/classstdex_1_1errno__error-members.html b/classstdex_1_1errno__error-members.html index e90a4f281..eb351dbf6 100644 --- a/classstdex_1_1errno__error-members.html +++ b/classstdex_1_1errno__error-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1errno__error.html b/classstdex_1_1errno__error.html index c53cad457..9dbe0db15 100644 --- a/classstdex_1_1errno__error.html +++ b/classstdex_1_1errno__error.html @@ -286,7 +286,7 @@ errno_t m_num diff --git a/classstdex_1_1global__progress-members.html b/classstdex_1_1global__progress-members.html index f658bd0cb..f5e23e3d8 100644 --- a/classstdex_1_1global__progress-members.html +++ b/classstdex_1_1global__progress-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1global__progress.html b/classstdex_1_1global__progress.html index c3efbc90e..d2f6a0225 100644 --- a/classstdex_1_1global__progress.html +++ b/classstdex_1_1global__progress.html @@ -547,7 +547,7 @@ template<class T > diff --git a/classstdex_1_1hex__dec-members.html b/classstdex_1_1hex__dec-members.html index ad187d50f..87f4ab73a 100644 --- a/classstdex_1_1hex__dec-members.html +++ b/classstdex_1_1hex__dec-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1hex__dec.html b/classstdex_1_1hex__dec.html index 975f3b1bb..116b29e5a 100644 --- a/classstdex_1_1hex__dec.html +++ b/classstdex_1_1hex__dec.html @@ -221,7 +221,7 @@ template<class _Ty , class _Ax , class _Tchr > diff --git a/classstdex_1_1hex__enc-members.html b/classstdex_1_1hex__enc-members.html index c8bf6d6b5..e077f0142 100644 --- a/classstdex_1_1hex__enc-members.html +++ b/classstdex_1_1hex__enc-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1hex__enc.html b/classstdex_1_1hex__enc.html index a8049898c..80ba709df 100644 --- a/classstdex_1_1hex__enc.html +++ b/classstdex_1_1hex__enc.html @@ -198,7 +198,7 @@ template<class _Elem , class _Traits , class _Ax > diff --git a/classstdex_1_1idrec_1_1record-members.html b/classstdex_1_1idrec_1_1record-members.html index 1493656ab..bba936c03 100644 --- a/classstdex_1_1idrec_1_1record-members.html +++ b/classstdex_1_1idrec_1_1record-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1idrec_1_1record.html b/classstdex_1_1idrec_1_1record.html index 91580fc6a..f7d109e58 100644 --- a/classstdex_1_1idrec_1_1record.html +++ b/classstdex_1_1idrec_1_1record.html @@ -526,7 +526,7 @@ template<class T , class T_ID , const T_ID ID, class T_SIZE , unsigned int AL diff --git a/classstdex_1_1lazy__progress-members.html b/classstdex_1_1lazy__progress-members.html index aaa7545e2..5a195b5c5 100644 --- a/classstdex_1_1lazy__progress-members.html +++ b/classstdex_1_1lazy__progress-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1lazy__progress.html b/classstdex_1_1lazy__progress.html index e235be8ea..743874631 100644 --- a/classstdex_1_1lazy__progress.html +++ b/classstdex_1_1lazy__progress.html @@ -279,7 +279,7 @@ template<class T > diff --git a/classstdex_1_1parser_1_1basic__angle-members.html b/classstdex_1_1parser_1_1basic__angle-members.html index cb92dcccc..4b26a200a 100644 --- a/classstdex_1_1parser_1_1basic__angle-members.html +++ b/classstdex_1_1parser_1_1basic__angle-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__angle.html b/classstdex_1_1parser_1_1basic__angle.html index f1233b595..9d9c998d2 100644 --- a/classstdex_1_1parser_1_1basic__angle.html +++ b/classstdex_1_1parser_1_1basic__angle.html @@ -244,7 +244,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__any__cu-members.html b/classstdex_1_1parser_1_1basic__any__cu-members.html index cd57555c7..c25883259 100644 --- a/classstdex_1_1parser_1_1basic__any__cu-members.html +++ b/classstdex_1_1parser_1_1basic__any__cu-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__any__cu.html b/classstdex_1_1parser_1_1basic__any__cu.html index 194b1954c..1c8f8cc89 100644 --- a/classstdex_1_1parser_1_1basic__any__cu.html +++ b/classstdex_1_1parser_1_1basic__any__cu.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__bol-members.html b/classstdex_1_1parser_1_1basic__bol-members.html index c40f83a31..bc0211597 100644 --- a/classstdex_1_1parser_1_1basic__bol-members.html +++ b/classstdex_1_1parser_1_1basic__bol-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__bol.html b/classstdex_1_1parser_1_1basic__bol.html index 9a787513f..bc15349d8 100644 --- a/classstdex_1_1parser_1_1basic__bol.html +++ b/classstdex_1_1parser_1_1basic__bol.html @@ -198,7 +198,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__branch-members.html b/classstdex_1_1parser_1_1basic__branch-members.html index dd47f7fc0..9360de99c 100644 --- a/classstdex_1_1parser_1_1basic__branch-members.html +++ b/classstdex_1_1parser_1_1basic__branch-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__branch.html b/classstdex_1_1parser_1_1basic__branch.html index 0ab1e236c..ceb21b147 100644 --- a/classstdex_1_1parser_1_1basic__branch.html +++ b/classstdex_1_1parser_1_1basic__branch.html @@ -253,7 +253,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__chemical__formula-members.html b/classstdex_1_1parser_1_1basic__chemical__formula-members.html index 5fa39d16a..10b69a54e 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula-members.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__chemical__formula.html b/classstdex_1_1parser_1_1basic__chemical__formula.html index d1c64d3e9..3b1955e65 100644 --- a/classstdex_1_1parser_1_1basic__chemical__formula.html +++ b/classstdex_1_1parser_1_1basic__chemical__formula.html @@ -239,7 +239,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__creditor__reference-members.html b/classstdex_1_1parser_1_1basic__creditor__reference-members.html index 6d8301fbb..4607193af 100644 --- a/classstdex_1_1parser_1_1basic__creditor__reference-members.html +++ b/classstdex_1_1parser_1_1basic__creditor__reference-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__creditor__reference.html b/classstdex_1_1parser_1_1basic__creditor__reference.html index 839e37c56..618870adf 100644 --- a/classstdex_1_1parser_1_1basic__creditor__reference.html +++ b/classstdex_1_1parser_1_1basic__creditor__reference.html @@ -240,7 +240,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__cu-members.html b/classstdex_1_1parser_1_1basic__cu-members.html index 5e71197c0..485164a31 100644 --- a/classstdex_1_1parser_1_1basic__cu-members.html +++ b/classstdex_1_1parser_1_1basic__cu-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__cu.html b/classstdex_1_1parser_1_1basic__cu.html index 8e3ad66c8..6021b9573 100644 --- a/classstdex_1_1parser_1_1basic__cu.html +++ b/classstdex_1_1parser_1_1basic__cu.html @@ -201,7 +201,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__cu__set-members.html b/classstdex_1_1parser_1_1basic__cu__set-members.html index c1b199021..4f4935aff 100644 --- a/classstdex_1_1parser_1_1basic__cu__set-members.html +++ b/classstdex_1_1parser_1_1basic__cu__set-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__cu__set.html b/classstdex_1_1parser_1_1basic__cu__set.html index 442df2b7a..60ceb7bba 100644 --- a/classstdex_1_1parser_1_1basic__cu__set.html +++ b/classstdex_1_1parser_1_1basic__cu__set.html @@ -210,7 +210,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__date-members.html b/classstdex_1_1parser_1_1basic__date-members.html index d3bea5c81..7205f52c6 100644 --- a/classstdex_1_1parser_1_1basic__date-members.html +++ b/classstdex_1_1parser_1_1basic__date-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__date.html b/classstdex_1_1parser_1_1basic__date.html index 3fbf61fae..336ea0243 100644 --- a/classstdex_1_1parser_1_1basic__date.html +++ b/classstdex_1_1parser_1_1basic__date.html @@ -252,7 +252,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__dns__domain__char-members.html b/classstdex_1_1parser_1_1basic__dns__domain__char-members.html index 56ce72779..780528396 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__dns__domain__char.html b/classstdex_1_1parser_1_1basic__dns__domain__char.html index ddabd4a53..bfec8f7ab 100644 --- a/classstdex_1_1parser_1_1basic__dns__domain__char.html +++ b/classstdex_1_1parser_1_1basic__dns__domain__char.html @@ -203,7 +203,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__dns__name-members.html b/classstdex_1_1parser_1_1basic__dns__name-members.html index f9282d5c9..2b9aeb99a 100644 --- a/classstdex_1_1parser_1_1basic__dns__name-members.html +++ b/classstdex_1_1parser_1_1basic__dns__name-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__dns__name.html b/classstdex_1_1parser_1_1basic__dns__name.html index ba0853811..d049dcd8e 100644 --- a/classstdex_1_1parser_1_1basic__dns__name.html +++ b/classstdex_1_1parser_1_1basic__dns__name.html @@ -205,7 +205,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__email__address-members.html b/classstdex_1_1parser_1_1basic__email__address-members.html index 5c3c4a470..92ce6ffde 100644 --- a/classstdex_1_1parser_1_1basic__email__address-members.html +++ b/classstdex_1_1parser_1_1basic__email__address-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__email__address.html b/classstdex_1_1parser_1_1basic__email__address.html index 6f23a0443..d5566e27d 100644 --- a/classstdex_1_1parser_1_1basic__email__address.html +++ b/classstdex_1_1parser_1_1basic__email__address.html @@ -245,7 +245,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__emoticon-members.html b/classstdex_1_1parser_1_1basic__emoticon-members.html index 6c8a7a0be..3cba25c06 100644 --- a/classstdex_1_1parser_1_1basic__emoticon-members.html +++ b/classstdex_1_1parser_1_1basic__emoticon-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__emoticon.html b/classstdex_1_1parser_1_1basic__emoticon.html index 0800c8d42..b7781c5fc 100644 --- a/classstdex_1_1parser_1_1basic__emoticon.html +++ b/classstdex_1_1parser_1_1basic__emoticon.html @@ -243,7 +243,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__eol-members.html b/classstdex_1_1parser_1_1basic__eol-members.html index 6b8e28a2d..e9c9d4113 100644 --- a/classstdex_1_1parser_1_1basic__eol-members.html +++ b/classstdex_1_1parser_1_1basic__eol-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__eol.html b/classstdex_1_1parser_1_1basic__eol.html index 329c3b0d5..4520cdf05 100644 --- a/classstdex_1_1parser_1_1basic__eol.html +++ b/classstdex_1_1parser_1_1basic__eol.html @@ -198,7 +198,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__fraction-members.html b/classstdex_1_1parser_1_1basic__fraction-members.html index ec0b0081e..2b13188c5 100644 --- a/classstdex_1_1parser_1_1basic__fraction-members.html +++ b/classstdex_1_1parser_1_1basic__fraction-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__fraction.html b/classstdex_1_1parser_1_1basic__fraction.html index f440475cf..e3a5adb0e 100644 --- a/classstdex_1_1parser_1_1basic__fraction.html +++ b/classstdex_1_1parser_1_1basic__fraction.html @@ -232,7 +232,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__iban-members.html b/classstdex_1_1parser_1_1basic__iban-members.html index 2adbc93e4..90428ecd5 100644 --- a/classstdex_1_1parser_1_1basic__iban-members.html +++ b/classstdex_1_1parser_1_1basic__iban-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__iban.html b/classstdex_1_1parser_1_1basic__iban.html index c8167d566..19fb33b91 100644 --- a/classstdex_1_1parser_1_1basic__iban.html +++ b/classstdex_1_1parser_1_1basic__iban.html @@ -244,7 +244,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer-members.html b/classstdex_1_1parser_1_1basic__integer-members.html index 34dfa8930..0d7d74e7d 100644 --- a/classstdex_1_1parser_1_1basic__integer-members.html +++ b/classstdex_1_1parser_1_1basic__integer-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer.html b/classstdex_1_1parser_1_1basic__integer.html index 93d9d4007..89e175964 100644 --- a/classstdex_1_1parser_1_1basic__integer.html +++ b/classstdex_1_1parser_1_1basic__integer.html @@ -180,7 +180,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer10-members.html b/classstdex_1_1parser_1_1basic__integer10-members.html index a7c7fa3a9..e08337901 100644 --- a/classstdex_1_1parser_1_1basic__integer10-members.html +++ b/classstdex_1_1parser_1_1basic__integer10-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer10.html b/classstdex_1_1parser_1_1basic__integer10.html index bc04de114..ffe171e3d 100644 --- a/classstdex_1_1parser_1_1basic__integer10.html +++ b/classstdex_1_1parser_1_1basic__integer10.html @@ -234,7 +234,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer10ts-members.html b/classstdex_1_1parser_1_1basic__integer10ts-members.html index fc424cf3d..493e7e6db 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts-members.html +++ b/classstdex_1_1parser_1_1basic__integer10ts-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer10ts.html b/classstdex_1_1parser_1_1basic__integer10ts.html index c34a5198f..cad8e4425 100644 --- a/classstdex_1_1parser_1_1basic__integer10ts.html +++ b/classstdex_1_1parser_1_1basic__integer10ts.html @@ -248,7 +248,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__integer16-members.html b/classstdex_1_1parser_1_1basic__integer16-members.html index f40ec688e..320e9da12 100644 --- a/classstdex_1_1parser_1_1basic__integer16-members.html +++ b/classstdex_1_1parser_1_1basic__integer16-members.html @@ -110,7 +110,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__integer16.html b/classstdex_1_1parser_1_1basic__integer16.html index 40e89f0dd..cb04626c1 100644 --- a/classstdex_1_1parser_1_1basic__integer16.html +++ b/classstdex_1_1parser_1_1basic__integer16.html @@ -252,7 +252,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__ipv4__address-members.html b/classstdex_1_1parser_1_1basic__ipv4__address-members.html index 678b62640..de46eb598 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address-members.html @@ -105,7 +105,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv4__address.html b/classstdex_1_1parser_1_1basic__ipv4__address.html index 834a37ebb..3af583dbf 100644 --- a/classstdex_1_1parser_1_1basic__ipv4__address.html +++ b/classstdex_1_1parser_1_1basic__ipv4__address.html @@ -265,7 +265,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__ipv6__address-members.html b/classstdex_1_1parser_1_1basic__ipv6__address-members.html index 3b508ed64..6ddaf2e3e 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address-members.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address-members.html @@ -113,7 +113,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv6__address.html b/classstdex_1_1parser_1_1basic__ipv6__address.html index dbe4095e1..9dc5f7996 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__address.html +++ b/classstdex_1_1parser_1_1basic__ipv6__address.html @@ -290,7 +290,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html index c0520d06d..44fc9d856 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html +++ b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html index 046ca3859..6c8306f76 100644 --- a/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1basic__ipv6__scope__id__char.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__iterations-members.html b/classstdex_1_1parser_1_1basic__iterations-members.html index 1424a6fbc..eb0b437d2 100644 --- a/classstdex_1_1parser_1_1basic__iterations-members.html +++ b/classstdex_1_1parser_1_1basic__iterations-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__iterations.html b/classstdex_1_1parser_1_1basic__iterations.html index 17aaee5d0..af2d93ed8 100644 --- a/classstdex_1_1parser_1_1basic__iterations.html +++ b/classstdex_1_1parser_1_1basic__iterations.html @@ -211,7 +211,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__json__string-members.html b/classstdex_1_1parser_1_1basic__json__string-members.html index 089ef263f..d94f66633 100644 --- a/classstdex_1_1parser_1_1basic__json__string-members.html +++ b/classstdex_1_1parser_1_1basic__json__string-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__json__string.html b/classstdex_1_1parser_1_1basic__json__string.html index afaa5eae9..98b3467c0 100644 --- a/classstdex_1_1parser_1_1basic__json__string.html +++ b/classstdex_1_1parser_1_1basic__json__string.html @@ -260,7 +260,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html index 58d22ad94..801e20977 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__mixed__numeral.html b/classstdex_1_1parser_1_1basic__mixed__numeral.html index 894baec2c..8c5d367a8 100644 --- a/classstdex_1_1parser_1_1basic__mixed__numeral.html +++ b/classstdex_1_1parser_1_1basic__mixed__numeral.html @@ -247,7 +247,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html index 8df0e16ca..84a286d20 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__monetary__numeral.html b/classstdex_1_1parser_1_1basic__monetary__numeral.html index 7c3b7245e..6ac96682e 100644 --- a/classstdex_1_1parser_1_1basic__monetary__numeral.html +++ b/classstdex_1_1parser_1_1basic__monetary__numeral.html @@ -251,7 +251,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__noop-members.html b/classstdex_1_1parser_1_1basic__noop-members.html index c455e39d7..230f064ed 100644 --- a/classstdex_1_1parser_1_1basic__noop-members.html +++ b/classstdex_1_1parser_1_1basic__noop-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__noop.html b/classstdex_1_1parser_1_1basic__noop.html index 460d086f1..b27e203d8 100644 --- a/classstdex_1_1parser_1_1basic__noop.html +++ b/classstdex_1_1parser_1_1basic__noop.html @@ -188,7 +188,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__parser-members.html b/classstdex_1_1parser_1_1basic__parser-members.html index 150eca675..c252d38c9 100644 --- a/classstdex_1_1parser_1_1basic__parser-members.html +++ b/classstdex_1_1parser_1_1basic__parser-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__parser.html b/classstdex_1_1parser_1_1basic__parser.html index 12da7374f..f758e874a 100644 --- a/classstdex_1_1parser_1_1basic__parser.html +++ b/classstdex_1_1parser_1_1basic__parser.html @@ -188,7 +188,7 @@ class stdex::parser::basic_parser< T >

Base template for all parse

diff --git a/classstdex_1_1parser_1_1basic__permutation-members.html b/classstdex_1_1parser_1_1basic__permutation-members.html index 02d3b26b9..0c6423ffe 100644 --- a/classstdex_1_1parser_1_1basic__permutation-members.html +++ b/classstdex_1_1parser_1_1basic__permutation-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__permutation.html b/classstdex_1_1parser_1_1basic__permutation.html index 1116dde53..1ee7c9e60 100644 --- a/classstdex_1_1parser_1_1basic__permutation.html +++ b/classstdex_1_1parser_1_1basic__permutation.html @@ -216,7 +216,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__phone__number-members.html b/classstdex_1_1parser_1_1basic__phone__number-members.html index b389a9115..ec6a52c4f 100644 --- a/classstdex_1_1parser_1_1basic__phone__number-members.html +++ b/classstdex_1_1parser_1_1basic__phone__number-members.html @@ -99,7 +99,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__phone__number.html b/classstdex_1_1parser_1_1basic__phone__number.html index 140d5d0bb..8226d6045 100644 --- a/classstdex_1_1parser_1_1basic__phone__number.html +++ b/classstdex_1_1parser_1_1basic__phone__number.html @@ -246,7 +246,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__punct__cu-members.html b/classstdex_1_1parser_1_1basic__punct__cu-members.html index 49eb4283c..91131d665 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu-members.html +++ b/classstdex_1_1parser_1_1basic__punct__cu-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__punct__cu.html b/classstdex_1_1parser_1_1basic__punct__cu.html index e540cc411..8a8559aac 100644 --- a/classstdex_1_1parser_1_1basic__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__punct__cu.html @@ -198,7 +198,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__roman__numeral-members.html b/classstdex_1_1parser_1_1basic__roman__numeral-members.html index f422a2a13..75014c611 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral-members.html @@ -103,7 +103,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__roman__numeral.html b/classstdex_1_1parser_1_1basic__roman__numeral.html index a4462102c..370582b2f 100644 --- a/classstdex_1_1parser_1_1basic__roman__numeral.html +++ b/classstdex_1_1parser_1_1basic__roman__numeral.html @@ -231,7 +231,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html index db21a9ef0..6f6cab817 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral-members.html @@ -103,7 +103,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__scientific__numeral.html b/classstdex_1_1parser_1_1basic__scientific__numeral.html index d4369e441..ce3a2043a 100644 --- a/classstdex_1_1parser_1_1basic__scientific__numeral.html +++ b/classstdex_1_1parser_1_1basic__scientific__numeral.html @@ -267,7 +267,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__score-members.html b/classstdex_1_1parser_1_1basic__score-members.html index d90f8fed3..d018fcd4a 100644 --- a/classstdex_1_1parser_1_1basic__score-members.html +++ b/classstdex_1_1parser_1_1basic__score-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__score.html b/classstdex_1_1parser_1_1basic__score.html index 016e3552b..61f6332c0 100644 --- a/classstdex_1_1parser_1_1basic__score.html +++ b/classstdex_1_1parser_1_1basic__score.html @@ -236,7 +236,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__sequence-members.html b/classstdex_1_1parser_1_1basic__sequence-members.html index e02ef358c..c0f8ac35c 100644 --- a/classstdex_1_1parser_1_1basic__sequence-members.html +++ b/classstdex_1_1parser_1_1basic__sequence-members.html @@ -97,7 +97,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__sequence.html b/classstdex_1_1parser_1_1basic__sequence.html index dc10da92d..202396186 100644 --- a/classstdex_1_1parser_1_1basic__sequence.html +++ b/classstdex_1_1parser_1_1basic__sequence.html @@ -209,7 +209,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__set-members.html b/classstdex_1_1parser_1_1basic__set-members.html index 357003b2b..3d0e65b69 100644 --- a/classstdex_1_1parser_1_1basic__set-members.html +++ b/classstdex_1_1parser_1_1basic__set-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__set.html b/classstdex_1_1parser_1_1basic__set.html index 841efb639..c425184b1 100644 --- a/classstdex_1_1parser_1_1basic__set.html +++ b/classstdex_1_1parser_1_1basic__set.html @@ -223,7 +223,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__si__reference-members.html b/classstdex_1_1parser_1_1basic__si__reference-members.html index aea6f58ff..74ca3b7ba 100644 --- a/classstdex_1_1parser_1_1basic__si__reference-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference-members.html @@ -102,7 +102,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__si__reference.html b/classstdex_1_1parser_1_1basic__si__reference.html index 5c04533f9..b520c5df8 100644 --- a/classstdex_1_1parser_1_1basic__si__reference.html +++ b/classstdex_1_1parser_1_1basic__si__reference.html @@ -265,7 +265,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html b/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html index bce586441..ab103ab1a 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference__delimiter-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__si__reference__delimiter.html b/classstdex_1_1parser_1_1basic__si__reference__delimiter.html index 584b79f5e..be1e720b4 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__delimiter.html +++ b/classstdex_1_1parser_1_1basic__si__reference__delimiter.html @@ -192,7 +192,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__si__reference__part-members.html b/classstdex_1_1parser_1_1basic__si__reference__part-members.html index 64e58b81c..22fd15e9d 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__part-members.html +++ b/classstdex_1_1parser_1_1basic__si__reference__part-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__si__reference__part.html b/classstdex_1_1parser_1_1basic__si__reference__part.html index ba770a921..861d371c7 100644 --- a/classstdex_1_1parser_1_1basic__si__reference__part.html +++ b/classstdex_1_1parser_1_1basic__si__reference__part.html @@ -192,7 +192,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__signed__numeral-members.html b/classstdex_1_1parser_1_1basic__signed__numeral-members.html index 7e33b2f0c..361bae9e6 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral-members.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral-members.html @@ -96,7 +96,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__signed__numeral.html b/classstdex_1_1parser_1_1basic__signed__numeral.html index 69d582e77..2d4dfbbf8 100644 --- a/classstdex_1_1parser_1_1basic__signed__numeral.html +++ b/classstdex_1_1parser_1_1basic__signed__numeral.html @@ -239,7 +239,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__space__cu-members.html b/classstdex_1_1parser_1_1basic__space__cu-members.html index a99b1534c..d0f8e7b28 100644 --- a/classstdex_1_1parser_1_1basic__space__cu-members.html +++ b/classstdex_1_1parser_1_1basic__space__cu-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__space__cu.html b/classstdex_1_1parser_1_1basic__space__cu.html index 879f80b0d..271a2fe05 100644 --- a/classstdex_1_1parser_1_1basic__space__cu.html +++ b/classstdex_1_1parser_1_1basic__space__cu.html @@ -198,7 +198,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html b/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html index bcbcba513..9263028aa 100644 --- a/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html +++ b/classstdex_1_1parser_1_1basic__space__or__punct__cu-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__space__or__punct__cu.html b/classstdex_1_1parser_1_1basic__space__or__punct__cu.html index b4bdc3572..de8eeacf3 100644 --- a/classstdex_1_1parser_1_1basic__space__or__punct__cu.html +++ b/classstdex_1_1parser_1_1basic__space__or__punct__cu.html @@ -198,7 +198,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__string-members.html b/classstdex_1_1parser_1_1basic__string-members.html index b0f456b4c..27e4f963d 100644 --- a/classstdex_1_1parser_1_1basic__string-members.html +++ b/classstdex_1_1parser_1_1basic__string-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__string.html b/classstdex_1_1parser_1_1basic__string.html index e32e3a076..09c4f4465 100644 --- a/classstdex_1_1parser_1_1basic__string.html +++ b/classstdex_1_1parser_1_1basic__string.html @@ -198,7 +198,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__string__branch-members.html b/classstdex_1_1parser_1_1basic__string__branch-members.html index 91bc940f0..d22319ad0 100644 --- a/classstdex_1_1parser_1_1basic__string__branch-members.html +++ b/classstdex_1_1parser_1_1basic__string__branch-members.html @@ -104,7 +104,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__string__branch.html b/classstdex_1_1parser_1_1basic__string__branch.html index 41d467b6b..7deb7ee69 100644 --- a/classstdex_1_1parser_1_1basic__string__branch.html +++ b/classstdex_1_1parser_1_1basic__string__branch.html @@ -185,7 +185,7 @@ class stdex::parser::basic_string_branch< T, T_parser >

Test for a

diff --git a/classstdex_1_1parser_1_1basic__time-members.html b/classstdex_1_1parser_1_1basic__time-members.html index 30da6d9fc..435579ba8 100644 --- a/classstdex_1_1parser_1_1basic__time-members.html +++ b/classstdex_1_1parser_1_1basic__time-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__time.html b/classstdex_1_1parser_1_1basic__time.html index 24fc00fd7..009a7fec4 100644 --- a/classstdex_1_1parser_1_1basic__time.html +++ b/classstdex_1_1parser_1_1basic__time.html @@ -242,7 +242,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url-members.html b/classstdex_1_1parser_1_1basic__url-members.html index 5a5816cc8..335ad884a 100644 --- a/classstdex_1_1parser_1_1basic__url-members.html +++ b/classstdex_1_1parser_1_1basic__url-members.html @@ -108,7 +108,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url.html b/classstdex_1_1parser_1_1basic__url.html index e5dfc5ca3..eb1c08119 100644 --- a/classstdex_1_1parser_1_1basic__url.html +++ b/classstdex_1_1parser_1_1basic__url.html @@ -272,7 +272,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__password__char-members.html b/classstdex_1_1parser_1_1basic__url__password__char-members.html index f57ae00ac..0e41968c0 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__password__char-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__password__char.html b/classstdex_1_1parser_1_1basic__url__password__char.html index e09908c85..3889ffffa 100644 --- a/classstdex_1_1parser_1_1basic__url__password__char.html +++ b/classstdex_1_1parser_1_1basic__url__password__char.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__path-members.html b/classstdex_1_1parser_1_1basic__url__path-members.html index 14006e796..80507914f 100644 --- a/classstdex_1_1parser_1_1basic__url__path-members.html +++ b/classstdex_1_1parser_1_1basic__url__path-members.html @@ -98,7 +98,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__path.html b/classstdex_1_1parser_1_1basic__url__path.html index 8d36bc9f0..447f62ec9 100644 --- a/classstdex_1_1parser_1_1basic__url__path.html +++ b/classstdex_1_1parser_1_1basic__url__path.html @@ -242,7 +242,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__path__char-members.html b/classstdex_1_1parser_1_1basic__url__path__char-members.html index 99c419333..39562bf3c 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__path__char-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__path__char.html b/classstdex_1_1parser_1_1basic__url__path__char.html index 033872005..f17a839c7 100644 --- a/classstdex_1_1parser_1_1basic__url__path__char.html +++ b/classstdex_1_1parser_1_1basic__url__path__char.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1basic__url__username__char-members.html b/classstdex_1_1parser_1_1basic__url__username__char-members.html index 0bb0b3513..b55cd5098 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char-members.html +++ b/classstdex_1_1parser_1_1basic__url__username__char-members.html @@ -92,7 +92,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1basic__url__username__char.html b/classstdex_1_1parser_1_1basic__url__username__char.html index 261355a70..27556b038 100644 --- a/classstdex_1_1parser_1_1basic__url__username__char.html +++ b/classstdex_1_1parser_1_1basic__url__username__char.html @@ -191,7 +191,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1http__agent-members.html b/classstdex_1_1parser_1_1http__agent-members.html index f57be413d..93001ca12 100644 --- a/classstdex_1_1parser_1_1http__agent-members.html +++ b/classstdex_1_1parser_1_1http__agent-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__agent.html b/classstdex_1_1parser_1_1http__agent.html index 0645bfc52..087a28492 100644 --- a/classstdex_1_1parser_1_1http__agent.html +++ b/classstdex_1_1parser_1_1http__agent.html @@ -220,7 +220,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__any__type-members.html b/classstdex_1_1parser_1_1http__any__type-members.html index 834a93c63..da7a9c2c2 100644 --- a/classstdex_1_1parser_1_1http__any__type-members.html +++ b/classstdex_1_1parser_1_1http__any__type-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__any__type.html b/classstdex_1_1parser_1_1http__any__type.html index c422d59c0..62a05b04c 100644 --- a/classstdex_1_1parser_1_1http__any__type.html +++ b/classstdex_1_1parser_1_1http__any__type.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__asterisk-members.html b/classstdex_1_1parser_1_1http__asterisk-members.html index e0aa4fb9a..6ee0972d4 100644 --- a/classstdex_1_1parser_1_1http__asterisk-members.html +++ b/classstdex_1_1parser_1_1http__asterisk-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__asterisk.html b/classstdex_1_1parser_1_1http__asterisk.html index a5cb4c0b3..b31d5c6fd 100644 --- a/classstdex_1_1parser_1_1http__asterisk.html +++ b/classstdex_1_1parser_1_1http__asterisk.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__cookie-members.html b/classstdex_1_1parser_1_1http__cookie-members.html index 4669a1875..2ba5b805b 100644 --- a/classstdex_1_1parser_1_1http__cookie-members.html +++ b/classstdex_1_1parser_1_1http__cookie-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__cookie.html b/classstdex_1_1parser_1_1http__cookie.html index 53e34cb8c..103f2198d 100644 --- a/classstdex_1_1parser_1_1http__cookie.html +++ b/classstdex_1_1parser_1_1http__cookie.html @@ -230,7 +230,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__cookie__parameter-members.html b/classstdex_1_1parser_1_1http__cookie__parameter-members.html index 5740d149c..3193c4699 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter-members.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__cookie__parameter.html b/classstdex_1_1parser_1_1http__cookie__parameter.html index 4ce8d483d..28cbcfce6 100644 --- a/classstdex_1_1parser_1_1http__cookie__parameter.html +++ b/classstdex_1_1parser_1_1http__cookie__parameter.html @@ -224,7 +224,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__header-members.html b/classstdex_1_1parser_1_1http__header-members.html index 2e5b9db43..926c8c88d 100644 --- a/classstdex_1_1parser_1_1http__header-members.html +++ b/classstdex_1_1parser_1_1http__header-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__header.html b/classstdex_1_1parser_1_1http__header.html index 3b68d03b4..60617aab5 100644 --- a/classstdex_1_1parser_1_1http__header.html +++ b/classstdex_1_1parser_1_1http__header.html @@ -224,7 +224,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__language-members.html b/classstdex_1_1parser_1_1http__language-members.html index 8abaa0d80..5cb902807 100644 --- a/classstdex_1_1parser_1_1http__language-members.html +++ b/classstdex_1_1parser_1_1http__language-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__language.html b/classstdex_1_1parser_1_1http__language.html index c8e91ec29..b76d1f109 100644 --- a/classstdex_1_1parser_1_1http__language.html +++ b/classstdex_1_1parser_1_1http__language.html @@ -217,7 +217,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__line__break-members.html b/classstdex_1_1parser_1_1http__line__break-members.html index 81d00529f..d14c7fba2 100644 --- a/classstdex_1_1parser_1_1http__line__break-members.html +++ b/classstdex_1_1parser_1_1http__line__break-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__line__break.html b/classstdex_1_1parser_1_1http__line__break.html index 2ef157bce..b4e61cee1 100644 --- a/classstdex_1_1parser_1_1http__line__break.html +++ b/classstdex_1_1parser_1_1http__line__break.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__media__range-members.html b/classstdex_1_1parser_1_1http__media__range-members.html index 5badfa998..0f15b1eea 100644 --- a/classstdex_1_1parser_1_1http__media__range-members.html +++ b/classstdex_1_1parser_1_1http__media__range-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__media__range.html b/classstdex_1_1parser_1_1http__media__range.html index 34822518a..c27bf6fda 100644 --- a/classstdex_1_1parser_1_1http__media__range.html +++ b/classstdex_1_1parser_1_1http__media__range.html @@ -225,7 +225,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__media__type-members.html b/classstdex_1_1parser_1_1http__media__type-members.html index 35d2cf639..879728dea 100644 --- a/classstdex_1_1parser_1_1http__media__type-members.html +++ b/classstdex_1_1parser_1_1http__media__type-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__media__type.html b/classstdex_1_1parser_1_1http__media__type.html index 4597543bc..036a07dea 100644 --- a/classstdex_1_1parser_1_1http__media__type.html +++ b/classstdex_1_1parser_1_1http__media__type.html @@ -229,7 +229,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__parameter-members.html b/classstdex_1_1parser_1_1http__parameter-members.html index 442340e10..363e25f0e 100644 --- a/classstdex_1_1parser_1_1http__parameter-members.html +++ b/classstdex_1_1parser_1_1http__parameter-members.html @@ -89,7 +89,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__parameter.html b/classstdex_1_1parser_1_1http__parameter.html index 3ed2669c0..9aa230770 100644 --- a/classstdex_1_1parser_1_1http__parameter.html +++ b/classstdex_1_1parser_1_1http__parameter.html @@ -226,7 +226,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__protocol-members.html b/classstdex_1_1parser_1_1http__protocol-members.html index 278946c4f..3c4e3a54e 100644 --- a/classstdex_1_1parser_1_1http__protocol-members.html +++ b/classstdex_1_1parser_1_1http__protocol-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__protocol.html b/classstdex_1_1parser_1_1http__protocol.html index 6fe6b9ade..b09e48bc6 100644 --- a/classstdex_1_1parser_1_1http__protocol.html +++ b/classstdex_1_1parser_1_1http__protocol.html @@ -230,7 +230,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__quoted__string-members.html b/classstdex_1_1parser_1_1http__quoted__string-members.html index b3562b1ba..4779cdcc9 100644 --- a/classstdex_1_1parser_1_1http__quoted__string-members.html +++ b/classstdex_1_1parser_1_1http__quoted__string-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__quoted__string.html b/classstdex_1_1parser_1_1http__quoted__string.html index 3c07ef356..f978d555f 100644 --- a/classstdex_1_1parser_1_1http__quoted__string.html +++ b/classstdex_1_1parser_1_1http__quoted__string.html @@ -222,7 +222,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__request-members.html b/classstdex_1_1parser_1_1http__request-members.html index deb2ce89b..fde91c52a 100644 --- a/classstdex_1_1parser_1_1http__request-members.html +++ b/classstdex_1_1parser_1_1http__request-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__request.html b/classstdex_1_1parser_1_1http__request.html index 41c2722ed..624a04c10 100644 --- a/classstdex_1_1parser_1_1http__request.html +++ b/classstdex_1_1parser_1_1http__request.html @@ -230,7 +230,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__space-members.html b/classstdex_1_1parser_1_1http__space-members.html index 0f6d77bb2..cdd116134 100644 --- a/classstdex_1_1parser_1_1http__space-members.html +++ b/classstdex_1_1parser_1_1http__space-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__space.html b/classstdex_1_1parser_1_1http__space.html index bb905e404..a3b5c1f5b 100644 --- a/classstdex_1_1parser_1_1http__space.html +++ b/classstdex_1_1parser_1_1http__space.html @@ -191,7 +191,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1http__text__char-members.html b/classstdex_1_1parser_1_1http__text__char-members.html index dde89718b..b75b0f40c 100644 --- a/classstdex_1_1parser_1_1http__text__char-members.html +++ b/classstdex_1_1parser_1_1http__text__char-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__text__char.html b/classstdex_1_1parser_1_1http__text__char.html index 2113ffabd..a58cabe40 100644 --- a/classstdex_1_1parser_1_1http__text__char.html +++ b/classstdex_1_1parser_1_1http__text__char.html @@ -191,7 +191,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1http__token-members.html b/classstdex_1_1parser_1_1http__token-members.html index 3ebc02c54..8b139e6b4 100644 --- a/classstdex_1_1parser_1_1http__token-members.html +++ b/classstdex_1_1parser_1_1http__token-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__token.html b/classstdex_1_1parser_1_1http__token.html index 8fec48ac3..e7cd0a935 100644 --- a/classstdex_1_1parser_1_1http__token.html +++ b/classstdex_1_1parser_1_1http__token.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url-members.html b/classstdex_1_1parser_1_1http__url-members.html index 8bdab306c..2c8d7d569 100644 --- a/classstdex_1_1parser_1_1http__url-members.html +++ b/classstdex_1_1parser_1_1http__url-members.html @@ -91,7 +91,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url.html b/classstdex_1_1parser_1_1http__url.html index 9e178e8e6..89e01eca6 100644 --- a/classstdex_1_1parser_1_1http__url.html +++ b/classstdex_1_1parser_1_1http__url.html @@ -229,7 +229,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__parameter-members.html b/classstdex_1_1parser_1_1http__url__parameter-members.html index f82b0b151..885f3cad7 100644 --- a/classstdex_1_1parser_1_1http__url__parameter-members.html +++ b/classstdex_1_1parser_1_1http__url__parameter-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__parameter.html b/classstdex_1_1parser_1_1http__url__parameter.html index ec8f80a7a..1a6199de1 100644 --- a/classstdex_1_1parser_1_1http__url__parameter.html +++ b/classstdex_1_1parser_1_1http__url__parameter.html @@ -220,7 +220,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__path-members.html b/classstdex_1_1parser_1_1http__url__path-members.html index 2607c733b..a771bfa29 100644 --- a/classstdex_1_1parser_1_1http__url__path-members.html +++ b/classstdex_1_1parser_1_1http__url__path-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__path.html b/classstdex_1_1parser_1_1http__url__path.html index 95fd8a52a..67c3fd207 100644 --- a/classstdex_1_1parser_1_1http__url__path.html +++ b/classstdex_1_1parser_1_1http__url__path.html @@ -218,7 +218,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__path__segment-members.html b/classstdex_1_1parser_1_1http__url__path__segment-members.html index b9d8f6ff1..93532b382 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment-members.html +++ b/classstdex_1_1parser_1_1http__url__path__segment-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__path__segment.html b/classstdex_1_1parser_1_1http__url__path__segment.html index 50369db15..fe2c9e61b 100644 --- a/classstdex_1_1parser_1_1http__url__path__segment.html +++ b/classstdex_1_1parser_1_1http__url__path__segment.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__port-members.html b/classstdex_1_1parser_1_1http__url__port-members.html index ee5f51648..f6ff20254 100644 --- a/classstdex_1_1parser_1_1http__url__port-members.html +++ b/classstdex_1_1parser_1_1http__url__port-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__port.html b/classstdex_1_1parser_1_1http__url__port.html index 188735415..c5139efca 100644 --- a/classstdex_1_1parser_1_1http__url__port.html +++ b/classstdex_1_1parser_1_1http__url__port.html @@ -220,7 +220,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__url__server-members.html b/classstdex_1_1parser_1_1http__url__server-members.html index fc68d8ed7..57d291931 100644 --- a/classstdex_1_1parser_1_1http__url__server-members.html +++ b/classstdex_1_1parser_1_1http__url__server-members.html @@ -85,7 +85,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__url__server.html b/classstdex_1_1parser_1_1http__url__server.html index d68eb16c3..fd7d36314 100644 --- a/classstdex_1_1parser_1_1http__url__server.html +++ b/classstdex_1_1parser_1_1http__url__server.html @@ -184,7 +184,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__value-members.html b/classstdex_1_1parser_1_1http__value-members.html index a7244c52d..31d9ba3fe 100644 --- a/classstdex_1_1parser_1_1http__value-members.html +++ b/classstdex_1_1parser_1_1http__value-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__value.html b/classstdex_1_1parser_1_1http__value.html index e41966ada..36b5a59e9 100644 --- a/classstdex_1_1parser_1_1http__value.html +++ b/classstdex_1_1parser_1_1http__value.html @@ -222,7 +222,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__value__collection-members.html b/classstdex_1_1parser_1_1http__value__collection-members.html index 5daf425c4..f127bd536 100644 --- a/classstdex_1_1parser_1_1http__value__collection-members.html +++ b/classstdex_1_1parser_1_1http__value__collection-members.html @@ -84,7 +84,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__value__collection.html b/classstdex_1_1parser_1_1http__value__collection.html index f659eda47..8ba3724b2 100644 --- a/classstdex_1_1parser_1_1http__value__collection.html +++ b/classstdex_1_1parser_1_1http__value__collection.html @@ -107,7 +107,7 @@ class stdex::parser::http_value_collection< _Key, T >

Collection o

diff --git a/classstdex_1_1parser_1_1http__weight-members.html b/classstdex_1_1parser_1_1http__weight-members.html index d9367080c..f5c4862eb 100644 --- a/classstdex_1_1parser_1_1http__weight-members.html +++ b/classstdex_1_1parser_1_1http__weight-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__weight.html b/classstdex_1_1parser_1_1http__weight.html index 0a42d88be..7dd5e7102 100644 --- a/classstdex_1_1parser_1_1http__weight.html +++ b/classstdex_1_1parser_1_1http__weight.html @@ -221,7 +221,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1http__weighted__value-members.html b/classstdex_1_1parser_1_1http__weighted__value-members.html index fb38b9905..f7e0ed335 100644 --- a/classstdex_1_1parser_1_1http__weighted__value-members.html +++ b/classstdex_1_1parser_1_1http__weighted__value-members.html @@ -90,7 +90,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1http__weighted__value.html b/classstdex_1_1parser_1_1http__weighted__value.html index 2fbad11dd..63d78997e 100644 --- a/classstdex_1_1parser_1_1http__weighted__value.html +++ b/classstdex_1_1parser_1_1http__weighted__value.html @@ -231,7 +231,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1parser__collection-members.html b/classstdex_1_1parser_1_1parser__collection-members.html index e8acd263f..ed8220824 100644 --- a/classstdex_1_1parser_1_1parser__collection-members.html +++ b/classstdex_1_1parser_1_1parser__collection-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1parser__collection.html b/classstdex_1_1parser_1_1parser__collection.html index c66c74f8f..bf412412a 100644 --- a/classstdex_1_1parser_1_1parser__collection.html +++ b/classstdex_1_1parser_1_1parser__collection.html @@ -189,7 +189,7 @@ template<clas diff --git a/classstdex_1_1parser_1_1sgml__any__cp-members.html b/classstdex_1_1parser_1_1sgml__any__cp-members.html index e49b38fff..7d493b1b5 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__any__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__any__cp.html b/classstdex_1_1parser_1_1sgml__any__cp.html index 2c5cb2fde..c49a1392d 100644 --- a/classstdex_1_1parser_1_1sgml__any__cp.html +++ b/classstdex_1_1parser_1_1sgml__any__cp.html @@ -196,7 +196,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__cp-members.html b/classstdex_1_1parser_1_1sgml__cp-members.html index bfa829fc8..dc1acddeb 100644 --- a/classstdex_1_1parser_1_1sgml__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__cp-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__cp.html b/classstdex_1_1parser_1_1sgml__cp.html index b3605da52..b0e981942 100644 --- a/classstdex_1_1parser_1_1sgml__cp.html +++ b/classstdex_1_1parser_1_1sgml__cp.html @@ -197,7 +197,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1sgml__cp__set-members.html b/classstdex_1_1parser_1_1sgml__cp__set-members.html index 90470eb6f..d96b726c6 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set-members.html +++ b/classstdex_1_1parser_1_1sgml__cp__set-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__cp__set.html b/classstdex_1_1parser_1_1sgml__cp__set.html index a98cbf25e..c544da687 100644 --- a/classstdex_1_1parser_1_1sgml__cp__set.html +++ b/classstdex_1_1parser_1_1sgml__cp__set.html @@ -210,7 +210,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html b/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html index dbdfcd95a..56556145e 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__dns__domain__char.html b/classstdex_1_1parser_1_1sgml__dns__domain__char.html index ade1dae8a..de2134b88 100644 --- a/classstdex_1_1parser_1_1sgml__dns__domain__char.html +++ b/classstdex_1_1parser_1_1sgml__dns__domain__char.html @@ -205,7 +205,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html index 858210ebb..de74d0b24 100644 --- a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html +++ b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char-members.html @@ -86,7 +86,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html index bb8d03d8b..dab80062b 100644 --- a/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html +++ b/classstdex_1_1parser_1_1sgml__ipv6__scope__id__char.html @@ -187,7 +187,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__punct__cp-members.html b/classstdex_1_1parser_1_1sgml__punct__cp-members.html index 1026dcebf..e3a0f0b40 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__punct__cp.html b/classstdex_1_1parser_1_1sgml__punct__cp.html index a894f4704..23b2c57a0 100644 --- a/classstdex_1_1parser_1_1sgml__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__punct__cp.html @@ -200,7 +200,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__space__cp-members.html b/classstdex_1_1parser_1_1sgml__space__cp-members.html index 042bef5d3..494ac86a6 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__space__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__space__cp.html b/classstdex_1_1parser_1_1sgml__space__cp.html index c206d5958..fd9dcd2f8 100644 --- a/classstdex_1_1parser_1_1sgml__space__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__cp.html @@ -200,7 +200,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html b/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html index e1d8da29e..8027688d6 100644 --- a/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html +++ b/classstdex_1_1parser_1_1sgml__space__or__punct__cp-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html b/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html index b20d15e90..edbbed1ee 100644 --- a/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html +++ b/classstdex_1_1parser_1_1sgml__space__or__punct__cp.html @@ -200,7 +200,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__string-members.html b/classstdex_1_1parser_1_1sgml__string-members.html index 24198d9dd..073f4687e 100644 --- a/classstdex_1_1parser_1_1sgml__string-members.html +++ b/classstdex_1_1parser_1_1sgml__string-members.html @@ -87,7 +87,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__string.html b/classstdex_1_1parser_1_1sgml__string.html index 37e0941d7..599472d5a 100644 --- a/classstdex_1_1parser_1_1sgml__string.html +++ b/classstdex_1_1parser_1_1sgml__string.html @@ -194,7 +194,7 @@ Additional Inherited Members diff --git a/classstdex_1_1parser_1_1sgml__url__password__char-members.html b/classstdex_1_1parser_1_1sgml__url__password__char-members.html index 44fdb1aaf..a92ce7616 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__url__password__char.html b/classstdex_1_1parser_1_1sgml__url__password__char.html index d10cd4ab7..cfb354d8d 100644 --- a/classstdex_1_1parser_1_1sgml__url__password__char.html +++ b/classstdex_1_1parser_1_1sgml__url__password__char.html @@ -196,7 +196,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__url__path__char-members.html b/classstdex_1_1parser_1_1sgml__url__path__char-members.html index 745e125c5..dbd069314 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__url__path__char.html b/classstdex_1_1parser_1_1sgml__url__path__char.html index 32584b70d..d40a248f7 100644 --- a/classstdex_1_1parser_1_1sgml__url__path__char.html +++ b/classstdex_1_1parser_1_1sgml__url__path__char.html @@ -196,7 +196,7 @@ std::locale m_locale diff --git a/classstdex_1_1parser_1_1sgml__url__username__char-members.html b/classstdex_1_1parser_1_1sgml__url__username__char-members.html index f73fce4f1..a1fdffb63 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char-members.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char-members.html @@ -93,7 +93,7 @@ $(function() { diff --git a/classstdex_1_1parser_1_1sgml__url__username__char.html b/classstdex_1_1parser_1_1sgml__url__username__char.html index 7d6e3acf2..ebe6e5352 100644 --- a/classstdex_1_1parser_1_1sgml__url__username__char.html +++ b/classstdex_1_1parser_1_1sgml__url__username__char.html @@ -196,7 +196,7 @@ std::locale m_locale diff --git a/classstdex_1_1progress-members.html b/classstdex_1_1progress-members.html index fe028f145..c00994d1f 100644 --- a/classstdex_1_1progress-members.html +++ b/classstdex_1_1progress-members.html @@ -88,7 +88,7 @@ $(function() { diff --git a/classstdex_1_1progress.html b/classstdex_1_1progress.html index cd563c951..c1f0e2ca1 100644 --- a/classstdex_1_1progress.html +++ b/classstdex_1_1progress.html @@ -319,7 +319,7 @@ template<class T > diff --git a/classstdex_1_1progress__switcher-members.html b/classstdex_1_1progress__switcher-members.html index f9d6e093d..76a68fd13 100644 --- a/classstdex_1_1progress__switcher-members.html +++ b/classstdex_1_1progress__switcher-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1progress__switcher.html b/classstdex_1_1progress__switcher.html index b0437b8cc..24bb9a19d 100644 --- a/classstdex_1_1progress__switcher.html +++ b/classstdex_1_1progress__switcher.html @@ -163,7 +163,7 @@ class stdex::progress_switcher< T >

Progress indicator switcher. <

diff --git a/classstdex_1_1ring-members.html b/classstdex_1_1ring-members.html index bd543bdc4..c29f722d5 100644 --- a/classstdex_1_1ring-members.html +++ b/classstdex_1_1ring-members.html @@ -100,7 +100,7 @@ $(function() { diff --git a/classstdex_1_1ring.html b/classstdex_1_1ring.html index a8201ac03..5cefd5eab 100644 --- a/classstdex_1_1ring.html +++ b/classstdex_1_1ring.html @@ -296,7 +296,7 @@ template<class T , size_t CAPACITY> diff --git a/classstdex_1_1stream_1_1async__reader-members.html b/classstdex_1_1stream_1_1async__reader-members.html index ed6e4fd9b..2fbfd7a7e 100644 --- a/classstdex_1_1stream_1_1async__reader-members.html +++ b/classstdex_1_1stream_1_1async__reader-members.html @@ -150,7 +150,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1async__reader.html b/classstdex_1_1stream_1_1async__reader.html index 3d47b295b..1b8703eeb 100644 --- a/classstdex_1_1stream_1_1async__reader.html +++ b/classstdex_1_1stream_1_1async__reader.html @@ -392,7 +392,7 @@ template<size_t CAPACITY = default_async_limit> diff --git a/classstdex_1_1stream_1_1async__writer-members.html b/classstdex_1_1stream_1_1async__writer-members.html index 2081f51e5..fad45a9c1 100644 --- a/classstdex_1_1stream_1_1async__writer-members.html +++ b/classstdex_1_1stream_1_1async__writer-members.html @@ -150,7 +150,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1async__writer.html b/classstdex_1_1stream_1_1async__writer.html index f24bdfba4..43aa3bc53 100644 --- a/classstdex_1_1stream_1_1async__writer.html +++ b/classstdex_1_1stream_1_1async__writer.html @@ -423,7 +423,7 @@ template<size_t CAPACITY = default_async_limit> diff --git a/classstdex_1_1stream_1_1basic-members.html b/classstdex_1_1stream_1_1basic-members.html index 879d8e69d..4fe0cd16a 100644 --- a/classstdex_1_1stream_1_1basic-members.html +++ b/classstdex_1_1stream_1_1basic-members.html @@ -140,7 +140,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic.html b/classstdex_1_1stream_1_1basic.html index 476a4a9fa..8f5c026a8 100644 --- a/classstdex_1_1stream_1_1basic.html +++ b/classstdex_1_1stream_1_1basic.html @@ -1326,7 +1326,7 @@ template<class T > diff --git a/classstdex_1_1stream_1_1basic__file-members.html b/classstdex_1_1stream_1_1basic__file-members.html index b3772e8f1..9f1ca98ee 100644 --- a/classstdex_1_1stream_1_1basic__file-members.html +++ b/classstdex_1_1stream_1_1basic__file-members.html @@ -156,7 +156,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic__file.html b/classstdex_1_1stream_1_1basic__file.html index c884dfb06..21a3392cb 100644 --- a/classstdex_1_1stream_1_1basic__file.html +++ b/classstdex_1_1stream_1_1basic__file.html @@ -929,7 +929,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1basic__sys-members.html b/classstdex_1_1stream_1_1basic__sys-members.html index 17e30cd26..ae0c99eab 100644 --- a/classstdex_1_1stream_1_1basic__sys-members.html +++ b/classstdex_1_1stream_1_1basic__sys-members.html @@ -152,7 +152,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1basic__sys.html b/classstdex_1_1stream_1_1basic__sys.html index d62a4d4ff..6ca288f62 100644 --- a/classstdex_1_1stream_1_1basic__sys.html +++ b/classstdex_1_1stream_1_1basic__sys.html @@ -495,7 +495,7 @@ sys_handle m_h diff --git a/classstdex_1_1stream_1_1buffer-members.html b/classstdex_1_1stream_1_1buffer-members.html index 1ef16de1e..053df7c8b 100644 --- a/classstdex_1_1stream_1_1buffer-members.html +++ b/classstdex_1_1stream_1_1buffer-members.html @@ -151,7 +151,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1buffer.html b/classstdex_1_1stream_1_1buffer.html index 18325a699..1790aede2 100644 --- a/classstdex_1_1stream_1_1buffer.html +++ b/classstdex_1_1stream_1_1buffer.html @@ -470,7 +470,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1buffered__sys-members.html b/classstdex_1_1stream_1_1buffered__sys-members.html index eeda7dde5..efc0e4f1a 100644 --- a/classstdex_1_1stream_1_1buffered__sys-members.html +++ b/classstdex_1_1stream_1_1buffered__sys-members.html @@ -153,7 +153,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1buffered__sys.html b/classstdex_1_1stream_1_1buffered__sys.html index 173d1a51c..26075a296 100644 --- a/classstdex_1_1stream_1_1buffered__sys.html +++ b/classstdex_1_1stream_1_1buffered__sys.html @@ -346,7 +346,7 @@ void done () diff --git a/classstdex_1_1stream_1_1cache-members.html b/classstdex_1_1stream_1_1cache-members.html index 331bb930e..0ef974bf4 100644 --- a/classstdex_1_1stream_1_1cache-members.html +++ b/classstdex_1_1stream_1_1cache-members.html @@ -168,7 +168,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1cache.html b/classstdex_1_1stream_1_1cache.html index 80a8c0fd3..27e0bbdcd 100644 --- a/classstdex_1_1stream_1_1cache.html +++ b/classstdex_1_1stream_1_1cache.html @@ -935,7 +935,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1cached__file-members.html b/classstdex_1_1stream_1_1cached__file-members.html index a06023e6a..637c54c8f 100644 --- a/classstdex_1_1stream_1_1cached__file-members.html +++ b/classstdex_1_1stream_1_1cached__file-members.html @@ -174,7 +174,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1cached__file.html b/classstdex_1_1stream_1_1cached__file.html index 7be744b50..fc92f86c1 100644 --- a/classstdex_1_1stream_1_1cached__file.html +++ b/classstdex_1_1stream_1_1cached__file.html @@ -604,7 +604,7 @@ void write_cache () diff --git a/classstdex_1_1stream_1_1converter-members.html b/classstdex_1_1stream_1_1converter-members.html index 8a1082ff5..8d9685e1f 100644 --- a/classstdex_1_1stream_1_1converter-members.html +++ b/classstdex_1_1stream_1_1converter-members.html @@ -145,7 +145,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1converter.html b/classstdex_1_1stream_1_1converter.html index 89da1e79b..a1fa7e517 100644 --- a/classstdex_1_1stream_1_1converter.html +++ b/classstdex_1_1stream_1_1converter.html @@ -482,7 +482,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1diag__file-members.html b/classstdex_1_1stream_1_1diag__file-members.html index ba97c4c92..5a4012d4b 100644 --- a/classstdex_1_1stream_1_1diag__file-members.html +++ b/classstdex_1_1stream_1_1diag__file-members.html @@ -159,7 +159,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1diag__file.html b/classstdex_1_1stream_1_1diag__file.html index 3dfb5b8ca..a6a351865 100644 --- a/classstdex_1_1stream_1_1diag__file.html +++ b/classstdex_1_1stream_1_1diag__file.html @@ -722,7 +722,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1fifo-members.html b/classstdex_1_1stream_1_1fifo-members.html index 037ffc797..a37fb95de 100644 --- a/classstdex_1_1stream_1_1fifo-members.html +++ b/classstdex_1_1stream_1_1fifo-members.html @@ -147,7 +147,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1fifo.html b/classstdex_1_1stream_1_1fifo.html index 2c3bf39ba..e5a877ca6 100644 --- a/classstdex_1_1stream_1_1fifo.html +++ b/classstdex_1_1stream_1_1fifo.html @@ -447,7 +447,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1file-members.html b/classstdex_1_1stream_1_1file-members.html index 63d3f596d..4531b2771 100644 --- a/classstdex_1_1stream_1_1file-members.html +++ b/classstdex_1_1stream_1_1file-members.html @@ -181,7 +181,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1file.html b/classstdex_1_1stream_1_1file.html index 01a9043db..39efbec2a 100644 --- a/classstdex_1_1stream_1_1file.html +++ b/classstdex_1_1stream_1_1file.html @@ -1129,7 +1129,7 @@ sys_handle m_h diff --git a/classstdex_1_1stream_1_1file__window-members.html b/classstdex_1_1stream_1_1file__window-members.html index 37138b6bc..60e03d91f 100644 --- a/classstdex_1_1stream_1_1file__window-members.html +++ b/classstdex_1_1stream_1_1file__window-members.html @@ -160,7 +160,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1file__window.html b/classstdex_1_1stream_1_1file__window.html index 99cb52601..c7b444c27 100644 --- a/classstdex_1_1stream_1_1file__window.html +++ b/classstdex_1_1stream_1_1file__window.html @@ -755,7 +755,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1limiter-members.html b/classstdex_1_1stream_1_1limiter-members.html index 94ef8f44c..673dc2bed 100644 --- a/classstdex_1_1stream_1_1limiter-members.html +++ b/classstdex_1_1stream_1_1limiter-members.html @@ -148,7 +148,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1limiter.html b/classstdex_1_1stream_1_1limiter.html index 248d089c1..fbeb54561 100644 --- a/classstdex_1_1stream_1_1limiter.html +++ b/classstdex_1_1stream_1_1limiter.html @@ -431,7 +431,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1memory__file-members.html b/classstdex_1_1stream_1_1memory__file-members.html index ce0d9a779..34772fde6 100644 --- a/classstdex_1_1stream_1_1memory__file-members.html +++ b/classstdex_1_1stream_1_1memory__file-members.html @@ -200,7 +200,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1memory__file.html b/classstdex_1_1stream_1_1memory__file.html index b933bb09f..121b5ded9 100644 --- a/classstdex_1_1stream_1_1memory__file.html +++ b/classstdex_1_1stream_1_1memory__file.html @@ -1611,7 +1611,7 @@ template<class T > diff --git a/classstdex_1_1stream_1_1replicator-members.html b/classstdex_1_1stream_1_1replicator-members.html index 6ad0fc495..cdb52f2c9 100644 --- a/classstdex_1_1stream_1_1replicator-members.html +++ b/classstdex_1_1stream_1_1replicator-members.html @@ -145,7 +145,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1replicator.html b/classstdex_1_1stream_1_1replicator.html index cd1457ec9..d2888f3cf 100644 --- a/classstdex_1_1stream_1_1replicator.html +++ b/classstdex_1_1stream_1_1replicator.html @@ -430,7 +430,7 @@ state_t m_state diff --git a/classstdex_1_1stream_1_1replicator_1_1worker-members.html b/classstdex_1_1stream_1_1replicator_1_1worker-members.html index c8d99f3df..c7a2a9aad 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker-members.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker-members.html @@ -94,7 +94,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1replicator_1_1worker.html b/classstdex_1_1stream_1_1replicator_1_1worker.html index 329d1ffd8..c9008e6d0 100644 --- a/classstdex_1_1stream_1_1replicator_1_1worker.html +++ b/classstdex_1_1stream_1_1replicator_1_1worker.html @@ -146,7 +146,7 @@ static void process_op diff --git a/classstdex_1_1stream_1_1window-members.html b/classstdex_1_1stream_1_1window-members.html index d470642cb..d3059d4a2 100644 --- a/classstdex_1_1stream_1_1window-members.html +++ b/classstdex_1_1stream_1_1window-members.html @@ -151,7 +151,7 @@ $(function() { diff --git a/classstdex_1_1stream_1_1window.html b/classstdex_1_1stream_1_1window.html index 5e69e423a..294994745 100644 --- a/classstdex_1_1stream_1_1window.html +++ b/classstdex_1_1stream_1_1window.html @@ -440,7 +440,7 @@ state_t m_state diff --git a/classstdex_1_1sys__object-members.html b/classstdex_1_1sys__object-members.html index afbc0eac0..a1009c4db 100644 --- a/classstdex_1_1sys__object-members.html +++ b/classstdex_1_1sys__object-members.html @@ -95,7 +95,7 @@ $(function() { diff --git a/classstdex_1_1sys__object.html b/classstdex_1_1sys__object.html index 1edf13347..2cb8640ed 100644 --- a/classstdex_1_1sys__object.html +++ b/classstdex_1_1sys__object.html @@ -182,7 +182,7 @@ sys_handle m_h diff --git a/classstdex_1_1user__cancelled-members.html b/classstdex_1_1user__cancelled-members.html index e98d02c6c..cefad9ff7 100644 --- a/classstdex_1_1user__cancelled-members.html +++ b/classstdex_1_1user__cancelled-members.html @@ -84,7 +84,7 @@ $(function() { diff --git a/classstdex_1_1user__cancelled.html b/classstdex_1_1user__cancelled.html index babd0bc04..ceaf802dc 100644 --- a/classstdex_1_1user__cancelled.html +++ b/classstdex_1_1user__cancelled.html @@ -141,7 +141,7 @@ Public Member Functions diff --git a/classstdex_1_1vector__queue-members.html b/classstdex_1_1vector__queue-members.html index 792a6797f..e1963f09d 100644 --- a/classstdex_1_1vector__queue-members.html +++ b/classstdex_1_1vector__queue-members.html @@ -122,7 +122,7 @@ $(function() { diff --git a/classstdex_1_1vector__queue.html b/classstdex_1_1vector__queue.html index c5eece869..170604704 100644 --- a/classstdex_1_1vector__queue.html +++ b/classstdex_1_1vector__queue.html @@ -795,7 +795,7 @@ template<class T > diff --git a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html index 937bbec53..a1b1ad37b 100644 --- a/dir_4be4f7b278e009bf0f1906cf31fb73bd.html +++ b/dir_4be4f7b278e009bf0f1906cf31fb73bd.html @@ -100,7 +100,7 @@ Files diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index 3722fd1c8..95fd38ec1 100644 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -86,7 +86,7 @@ Directories diff --git a/dir_fca3c47b2ea228727bd6729832f89576.html b/dir_fca3c47b2ea228727bd6729832f89576.html index a0ce313ce..de701587f 100644 --- a/dir_fca3c47b2ea228727bd6729832f89576.html +++ b/dir_fca3c47b2ea228727bd6729832f89576.html @@ -128,7 +128,7 @@ Files diff --git a/endian_8hpp_source.html b/endian_8hpp_source.html index 2fda09f04..50ff6f5a0 100644 --- a/endian_8hpp_source.html +++ b/endian_8hpp_source.html @@ -226,7 +226,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/errno_8hpp_source.html b/errno_8hpp_source.html index 06bc4b2c7..07f8cce20 100644 --- a/errno_8hpp_source.html +++ b/errno_8hpp_source.html @@ -153,7 +153,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/exception_8hpp_source.html b/exception_8hpp_source.html index 6c692a5f0..fd7bff8c9 100644 --- a/exception_8hpp_source.html +++ b/exception_8hpp_source.html @@ -110,7 +110,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/files.html b/files.html index dd54d380a..03da9ceb1 100644 --- a/files.html +++ b/files.html @@ -113,7 +113,7 @@ $(function() { diff --git a/functions.html b/functions.html index 0b3182bd9..b973935f0 100644 --- a/functions.html +++ b/functions.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_b.html b/functions_b.html index 298bc60a3..b7aa9ed86 100644 --- a/functions_b.html +++ b/functions_b.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_c.html b/functions_c.html index f7f8061cd..5e13fae1e 100644 --- a/functions_c.html +++ b/functions_c.html @@ -92,7 +92,7 @@ $(function() { diff --git a/functions_d.html b/functions_d.html index 2360ace0b..0c964dd98 100644 --- a/functions_d.html +++ b/functions_d.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_e.html b/functions_e.html index 4c8681d77..8f64c7bb3 100644 --- a/functions_e.html +++ b/functions_e.html @@ -87,7 +87,7 @@ $(function() { diff --git a/functions_f.html b/functions_f.html index b446eb63b..e81d6b5e4 100644 --- a/functions_f.html +++ b/functions_f.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_func.html b/functions_func.html index db6d320a5..56baa853b 100644 --- a/functions_func.html +++ b/functions_func.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func_b.html b/functions_func_b.html index 9d7a4bbd5..d73e92932 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_c.html b/functions_func_c.html index 706ff354d..3c4b06484 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_func_d.html b/functions_func_d.html index e89238fec..f116f8a5d 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_func_e.html b/functions_func_e.html index fd1ee0c78..65b0702a4 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -82,7 +82,7 @@ $(function() { diff --git a/functions_func_f.html b/functions_func_f.html index 2f6f853f0..c15a3d4db 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_func_g.html b/functions_func_g.html index b05ee83c9..3bc3e98d2 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_h.html b/functions_func_h.html index fce10dd6e..bdd0b8f0c 100644 --- a/functions_func_h.html +++ b/functions_func_h.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_i.html b/functions_func_i.html index 79a3b3f64..9317582a4 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_l.html b/functions_func_l.html index 1749a4dfc..0fda5e99a 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_m.html b/functions_func_m.html index 4716b65a9..888116649 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -80,7 +80,7 @@ $(function() { diff --git a/functions_func_n.html b/functions_func_n.html index 7a2bd6c2b..ccfd5a620 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_o.html b/functions_func_o.html index 37d6e3ffc..7d5c462c1 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_func_p.html b/functions_func_p.html index 37fbc55fa..4a369f6a7 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_q.html b/functions_func_q.html index 766e6c2c4..b55b80fdd 100644 --- a/functions_func_q.html +++ b/functions_func_q.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_func_r.html b/functions_func_r.html index eb0bf3c32..1cda4c175 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -90,7 +90,7 @@ $(function() { diff --git a/functions_func_s.html b/functions_func_s.html index b51282615..7f0f074eb 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -97,7 +97,7 @@ $(function() { diff --git a/functions_func_t.html b/functions_func_t.html index 48a68512c..1dcc723e0 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -83,7 +83,7 @@ $(function() { diff --git a/functions_func_u.html b/functions_func_u.html index 2cc4cd100..5c50257b4 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_func_v.html b/functions_func_v.html index 971206e70..0d846202d 100644 --- a/functions_func_v.html +++ b/functions_func_v.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_func_w.html b/functions_func_w.html index b11cc3449..e5ee6f508 100644 --- a/functions_func_w.html +++ b/functions_func_w.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_func_~.html b/functions_func_~.html index ab5757ae3..c609788d1 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_g.html b/functions_g.html index a68f202cb..b1c6cf46a 100644 --- a/functions_g.html +++ b/functions_g.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_h.html b/functions_h.html index 43d03ff28..72d9c47f4 100644 --- a/functions_h.html +++ b/functions_h.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_i.html b/functions_i.html index fbdc30d5e..08c08b79d 100644 --- a/functions_i.html +++ b/functions_i.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_l.html b/functions_l.html index deedc3b2a..226170f2e 100644 --- a/functions_l.html +++ b/functions_l.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_m.html b/functions_m.html index 3f85dcafd..e8cf19b64 100644 --- a/functions_m.html +++ b/functions_m.html @@ -96,7 +96,7 @@ $(function() { diff --git a/functions_n.html b/functions_n.html index 436133010..e695c8108 100644 --- a/functions_n.html +++ b/functions_n.html @@ -85,7 +85,7 @@ $(function() { diff --git a/functions_o.html b/functions_o.html index f3a3eadf6..d2fc4f208 100644 --- a/functions_o.html +++ b/functions_o.html @@ -86,7 +86,7 @@ $(function() { diff --git a/functions_p.html b/functions_p.html index 66cde11ec..1ef015e01 100644 --- a/functions_p.html +++ b/functions_p.html @@ -90,7 +90,7 @@ $(function() { diff --git a/functions_q.html b/functions_q.html index b37eb0d1f..bc5fab1d1 100644 --- a/functions_q.html +++ b/functions_q.html @@ -78,7 +78,7 @@ $(function() { diff --git a/functions_r.html b/functions_r.html index b56371dd9..aed76eb07 100644 --- a/functions_r.html +++ b/functions_r.html @@ -94,7 +94,7 @@ $(function() { diff --git a/functions_s.html b/functions_s.html index 50bb0ed89..fcfb3b2ac 100644 --- a/functions_s.html +++ b/functions_s.html @@ -103,7 +103,7 @@ $(function() { diff --git a/functions_t.html b/functions_t.html index 2be069544..1bebc73fb 100644 --- a/functions_t.html +++ b/functions_t.html @@ -84,7 +84,7 @@ $(function() { diff --git a/functions_type.html b/functions_type.html index bef04af79..445d8b28b 100644 --- a/functions_type.html +++ b/functions_type.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_u.html b/functions_u.html index 4f6bc1248..9a4eccb4c 100644 --- a/functions_u.html +++ b/functions_u.html @@ -79,7 +79,7 @@ $(function() { diff --git a/functions_v.html b/functions_v.html index 5113fdd06..3cfd6f961 100644 --- a/functions_v.html +++ b/functions_v.html @@ -81,7 +81,7 @@ $(function() { diff --git a/functions_vars.html b/functions_vars.html index e26cef5b7..79ccf9548 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -213,7 +213,7 @@ $(function() { diff --git a/functions_w.html b/functions_w.html index f1e408d68..ab76aa5b0 100644 --- a/functions_w.html +++ b/functions_w.html @@ -88,7 +88,7 @@ $(function() { diff --git a/functions_~.html b/functions_~.html index 26a7aaa41..1d5b96247 100644 --- a/functions_~.html +++ b/functions_~.html @@ -78,7 +78,7 @@ $(function() { diff --git a/hex_8hpp_source.html b/hex_8hpp_source.html index 5203d985a..3272ab6f1 100644 --- a/hex_8hpp_source.html +++ b/hex_8hpp_source.html @@ -232,7 +232,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/hierarchy.html b/hierarchy.html index 8679b5304..be620475d 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -236,7 +236,7 @@ $(function() { diff --git a/idrec_8hpp_source.html b/idrec_8hpp_source.html index f0e2f3634..d85cf0da9 100644 --- a/idrec_8hpp_source.html +++ b/idrec_8hpp_source.html @@ -421,7 +421,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/include_2stdex_2compat_8hpp_source.html b/include_2stdex_2compat_8hpp_source.html index 7d7be5498..4bd18119c 100644 --- a/include_2stdex_2compat_8hpp_source.html +++ b/include_2stdex_2compat_8hpp_source.html @@ -288,7 +288,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/index.html b/index.html index 2e2d79e8a..36eb1d66c 100644 --- a/index.html +++ b/index.html @@ -76,7 +76,7 @@ $(function() { diff --git a/interval_8hpp_source.html b/interval_8hpp_source.html index 48ec677a7..8dd496225 100644 --- a/interval_8hpp_source.html +++ b/interval_8hpp_source.html @@ -202,7 +202,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/mapping_8hpp_source.html b/mapping_8hpp_source.html index 3d60fd9b0..7c1aa0c5c 100644 --- a/mapping_8hpp_source.html +++ b/mapping_8hpp_source.html @@ -124,7 +124,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/math_8cpp_source.html b/math_8cpp_source.html index d76d21849..4c3c02430 100644 --- a/math_8cpp_source.html +++ b/math_8cpp_source.html @@ -129,7 +129,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/math_8hpp_source.html b/math_8hpp_source.html index 1eab3ced1..e79285fe7 100644 --- a/math_8hpp_source.html +++ b/math_8hpp_source.html @@ -134,7 +134,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/memory_8hpp_source.html b/memory_8hpp_source.html index 1115b9d45..6e6737383 100644 --- a/memory_8hpp_source.html +++ b/memory_8hpp_source.html @@ -128,7 +128,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/parser_8cpp_source.html b/parser_8cpp_source.html index 3c7b3e0e4..cb18da4f2 100644 --- a/parser_8cpp_source.html +++ b/parser_8cpp_source.html @@ -587,12 +587,12 @@ $(document).ready(function() { init_codefold(0); });
503 };
504}
stdex::parser::basic_parser< char >
-
stdex::parser::basic_parser::interval
interval< size_t > interval
Region of the last match.
Definition parser.hpp:170
-
stdex::parser::basic_string
Test for given string.
Definition parser.hpp:816
-
stdex::parser::http_header
Test for HTTP header.
Definition parser.hpp:7148
-
stdex::parser::http_request
Test for HTTP request.
Definition parser.hpp:7010
-
stdex::parser::sgml_cp
Test for specific SGML code point.
Definition parser.hpp:341
-
stdex::parser::sgml_space_cp
Test for any SGML space code point.
Definition parser.hpp:428
+
stdex::parser::basic_parser::interval
interval< size_t > interval
Region of the last match.
Definition parser.hpp:178
+
stdex::parser::basic_string
Test for given string.
Definition parser.hpp:824
+
stdex::parser::http_header
Test for HTTP header.
Definition parser.hpp:7156
+
stdex::parser::http_request
Test for HTTP request.
Definition parser.hpp:7018
+
stdex::parser::sgml_cp
Test for specific SGML code point.
Definition parser.hpp:349
+
stdex::parser::sgml_space_cp
Test for any SGML space code point.
Definition parser.hpp:436
stdex::interval
Numerical interval.
Definition interval.hpp:18
stdex::interval::size
T size() const
Returns interval size.
Definition interval.hpp:47
stdex::interval::end
T end
interval end
Definition interval.hpp:20
@@ -600,7 +600,7 @@ $(document).ready(function() { init_codefold(0); }); diff --git a/parser_8hpp_source.html b/parser_8hpp_source.html index 5656bd547..eb78e056f 100644 --- a/parser_8hpp_source.html +++ b/parser_8hpp_source.html @@ -136,7472 +136,7480 @@ $(document).ready(function() { init_codefold(0); });
52ENUM_FLAG_OPERATOR(T,&) \
53enum class T : type
54
-
55namespace stdex
-
56{
-
57 namespace parser
-
58 {
-
62 constexpr int match_default = 0;
-
63 constexpr int match_case_insensitive = 0x1;
-
64 constexpr int match_multiline = 0x2;
-
65
-
69 template <class T>
-
-
70 class basic_parser
-
71 {
-
72 public:
-
73 basic_parser(_In_ const std::locale& locale = std::locale()) : m_locale(locale) {}
-
74 virtual ~basic_parser() {}
-
75
-
76 bool search(
-
77 _In_reads_or_z_(end) const T* text,
-
78 _In_ size_t start = 0,
-
79 _In_ size_t end = (size_t)-1,
-
80 _In_ int flags = match_default)
-
81 {
-
82 for (size_t i = start; i < end && text[i]; i++)
-
83 if (match(text, i, end, flags))
-
84 return true;
-
85 return false;
-
86 }
-
87
-
88 virtual bool match(
-
89 _In_reads_or_z_(end) const T* text,
-
90 _In_ size_t start = 0,
-
91 _In_ size_t end = (size_t)-1,
-
92 _In_ int flags = match_default) = 0;
-
93
-
94 template<class _Traits, class _Ax>
-
95 inline bool match(
-
96 const std::basic_string<T, _Traits, _Ax>& text,
-
97 _In_ size_t start = 0,
-
98 _In_ size_t end = (size_t)-1,
-
99 _In_ int flags = match_default)
-
100 {
-
101 return match(text.c_str(), start, std::min<size_t>(end, text.size()), flags);
-
102 }
-
103
-
104 virtual void invalidate()
-
105 {
-
106 this->interval.start = 1;
-
107 this->interval.end = 0;
-
108 }
-
109
-
110 protected:
-
112 const wchar_t* next_sgml_cp(_In_ const char* text, _In_ size_t start, _In_ size_t end, _Out_ size_t& chr_end, _Out_ wchar_t(&buf)[3])
+
55#ifndef s6_words
+
56#ifdef __APPLE__
+
57#define s6_words __u6_addr.__u6_addr16
+
58#else
+
59#error Unsupported platform
+
60#endif
+
61#endif
+
62
+
63namespace stdex
+
64{
+
65 namespace parser
+
66 {
+
70 constexpr int match_default = 0;
+
71 constexpr int match_case_insensitive = 0x1;
+
72 constexpr int match_multiline = 0x2;
+
73
+
77 template <class T>
+
+ +
79 {
+
80 public:
+
81 basic_parser(_In_ const std::locale& locale = std::locale()) : m_locale(locale) {}
+
82 virtual ~basic_parser() {}
+
83
+
84 bool search(
+
85 _In_reads_or_z_(end) const T* text,
+
86 _In_ size_t start = 0,
+
87 _In_ size_t end = (size_t)-1,
+
88 _In_ int flags = match_default)
+
89 {
+
90 for (size_t i = start; i < end && text[i]; i++)
+
91 if (match(text, i, end, flags))
+
92 return true;
+
93 return false;
+
94 }
+
95
+
96 virtual bool match(
+
97 _In_reads_or_z_(end) const T* text,
+
98 _In_ size_t start = 0,
+
99 _In_ size_t end = (size_t)-1,
+
100 _In_ int flags = match_default) = 0;
+
101
+
102 template<class _Traits, class _Ax>
+
103 inline bool match(
+
104 const std::basic_string<T, _Traits, _Ax>& text,
+
105 _In_ size_t start = 0,
+
106 _In_ size_t end = (size_t)-1,
+
107 _In_ int flags = match_default)
+
108 {
+
109 return match(text.c_str(), start, std::min<size_t>(end, text.size()), flags);
+
110 }
+
111
+
112 virtual void invalidate()
113 {
-
114 if (text[start] == '&') {
-
115 // Potential entity start
-
116 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
-
117 for (chr_end = start + 1;; chr_end++) {
-
118 if (chr_end >= end || text[chr_end] == 0) {
-
119 // Unterminated entity
-
120 break;
-
121 }
-
122 if (text[chr_end] == ';') {
-
123 // Entity end
-
124 size_t n = chr_end - start - 1;
-
125 if (n >= 2 && text[start + 1] == '#') {
-
126 // Numerical entity
-
127 char32_t unicode;
-
128 if (text[start + 2] == 'x' || text[start + 2] == 'X')
-
129 unicode = strtou32(text + start + 3, n - 2, nullptr, 16);
-
130 else
-
131 unicode = strtou32(text + start + 2, n - 1, nullptr, 10);
-
132#ifdef _WIN32
-
133 if (unicode < 0x10000) {
-
134 buf[0] = (wchar_t)unicode;
-
135 buf[1] = 0;
-
136 }
-
137 else {
-
138 ucs4_to_surrogate_pair(buf, unicode);
-
139 buf[2] = 0;
-
140 }
-
141#else
-
142 buf[0] = (wchar_t)unicode;
-
143 buf[1] = 0;
-
144#endif
-
145 chr_end++;
-
146 return buf;
-
147 }
-
148 const wchar_t* entity_w = sgml2uni(text + start + 1, n);
-
149 if (entity_w) {
-
150 chr_end++;
-
151 return entity_w;
-
152 }
-
153 // Unknown entity.
-
154 break;
-
155 }
-
156 else if (text[chr_end] == '&' || ctype.is(ctype.space, text[chr_end])) {
-
157 // This char cannot possibly be a part of entity.
-
158 break;
-
159 }
-
160 }
-
161 }
-
162 buf[0] = text[start];
-
163 buf[1] = 0;
-
164 chr_end = start + 1;
-
165 return buf;
-
166 }
-
168
-
169 public:
- -
171
-
172 protected:
-
173 std::locale m_locale;
-
174 };
+
114 this->interval.start = 1;
+
115 this->interval.end = 0;
+
116 }
+
117
+
118 protected:
+
120 const wchar_t* next_sgml_cp(_In_ const char* text, _In_ size_t start, _In_ size_t end, _Out_ size_t& chr_end, _Out_ wchar_t(&buf)[3])
+
121 {
+
122 if (text[start] == '&') {
+
123 // Potential entity start
+
124 const auto& ctype = std::use_facet<std::ctype<T>>(m_locale);
+
125 for (chr_end = start + 1;; chr_end++) {
+
126 if (chr_end >= end || text[chr_end] == 0) {
+
127 // Unterminated entity
+
128 break;
+
129 }
+
130 if (text[chr_end] == ';') {
+
131 // Entity end
+
132 size_t n = chr_end - start - 1;
+
133 if (n >= 2 && text[start + 1] == '#') {
+
134 // Numerical entity
+
135 char32_t unicode;
+
136 if (text[start + 2] == 'x' || text[start + 2] == 'X')
+
137 unicode = strtou32(text + start + 3, n - 2, nullptr, 16);
+
138 else
+
139 unicode = strtou32(text + start + 2, n - 1, nullptr, 10);
+
140#ifdef _WIN32
+
141 if (unicode < 0x10000) {
+
142 buf[0] = (wchar_t)unicode;
+
143 buf[1] = 0;
+
144 }
+
145 else {
+
146 ucs4_to_surrogate_pair(buf, unicode);
+
147 buf[2] = 0;
+
148 }
+
149#else
+
150 buf[0] = (wchar_t)unicode;
+
151 buf[1] = 0;
+
152#endif
+
153 chr_end++;
+
154 return buf;
+
155 }
+
156 const wchar_t* entity_w = sgml2uni(text + start + 1, n);
+
157 if (entity_w) {
+
158 chr_end++;
+
159 return entity_w;
+
160 }
+
161 // Unknown entity.
+
162 break;
+
163 }
+
164 else if (text[chr_end] == '&' || ctype.is(ctype.space, text[chr_end])) {
+
165 // This char cannot possibly be a part of entity.
+
166 break;
+
167 }
+
168 }
+
169 }
+
170 buf[0] = text[start];
+
171 buf[1] = 0;
+
172 chr_end = start + 1;
+
173 return buf;
+
174 }
+
176
+
177 public:
+ +
179
+
180 protected:
+
181 std::locale m_locale;
+
182 };
-
175
-
176 using parser = basic_parser<char>;
-
177 using wparser = basic_parser<wchar_t>;
-
178#ifdef _UNICODE
-
179 using tparser = wparser;
-
180#else
-
181 using tparser = parser;
-
182#endif
-
183 using sgml_parser = basic_parser<char>;
-
184
-
188 template <class T>
-
-
189 class basic_noop : public basic_parser<T>
-
190 {
-
191 public:
-
192 virtual bool match(
-
193 _In_reads_or_z_(end) const T* text,
-
194 _In_ size_t start = 0,
-
195 _In_ size_t end = (size_t)-1,
-
196 _In_ int flags = match_default)
-
197 {
-
198 assert(text || start >= end);
-
199 if (start < end && text[start]) {
-
200 this->interval.start = this->interval.end = start;
-
201 return true;
-
202 }
-
203 this->interval.start = (this->interval.end = start) + 1;
-
204 return false;
-
205 }
-
206 };
+
183
+ + +
186#ifdef _UNICODE
+
187 using tparser = wparser;
+
188#else
+
189 using tparser = parser;
+
190#endif
+ +
192
+
196 template <class T>
+
+
197 class basic_noop : public basic_parser<T>
+
198 {
+
199 public:
+
200 virtual bool match(
+
201 _In_reads_or_z_(end) const T* text,
+
202 _In_ size_t start = 0,
+
203 _In_ size_t end = (size_t)-1,
+
204 _In_ int flags = match_default)
+
205 {
+
206 assert(text || start >= end);
+
207 if (start < end && text[start]) {
+
208 this->interval.start = this->interval.end = start;
+
209 return true;
+
210 }
+
211 this->interval.start = (this->interval.end = start) + 1;
+
212 return false;
+
213 }
+
214 };
-
207
-
208 using noop = basic_noop<char>;
- -
210#ifdef _UNICODE
-
211 using tnoop = wnoop;
-
212#else
-
213 using tnoop = noop;
-
214#endif
- -
216
-
220 template <class T>
-
-
221 class basic_any_cu : public basic_parser<T>
-
222 {
-
223 public:
-
224 basic_any_cu(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
225
-
226 virtual bool match(
-
227 _In_reads_or_z_(end) const T* text,
-
228 _In_ size_t start = 0,
-
229 _In_ size_t end = (size_t)-1,
-
230 _In_ int flags = match_default)
-
231 {
-
232 assert(text || start >= end);
-
233 if (start < end && text[start]) {
-
234 this->interval.end = (this->interval.start = start) + 1;
-
235 return true;
-
236 }
-
237 this->interval.start = (this->interval.end = start) + 1;
-
238 return false;
-
239 }
-
240 };
+
215
+
216 using noop = basic_noop<char>;
+ +
218#ifdef _UNICODE
+
219 using tnoop = wnoop;
+
220#else
+
221 using tnoop = noop;
+
222#endif
+ +
224
+
228 template <class T>
+
+
229 class basic_any_cu : public basic_parser<T>
+
230 {
+
231 public:
+
232 basic_any_cu(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
233
+
234 virtual bool match(
+
235 _In_reads_or_z_(end) const T* text,
+
236 _In_ size_t start = 0,
+
237 _In_ size_t end = (size_t)-1,
+
238 _In_ int flags = match_default)
+
239 {
+
240 assert(text || start >= end);
+
241 if (start < end && text[start]) {
+
242 this->interval.end = (this->interval.start = start) + 1;
+
243 return true;
+
244 }
+
245 this->interval.start = (this->interval.end = start) + 1;
+
246 return false;
+
247 }
+
248 };
-
241
- - -
244#ifdef _UNICODE
-
245 using tany_cu = wany_cu;
-
246#else
-
247 using tany_cu = any_cu;
-
248#endif
249
-
-
253 class sgml_any_cp : public basic_any_cu<char>
-
254 {
-
255 public:
-
256 sgml_any_cp(_In_ const std::locale& locale = std::locale()) : basic_any_cu<char>(locale) {}
+ + +
252#ifdef _UNICODE
+
253 using tany_cu = wany_cu;
+
254#else
+
255 using tany_cu = any_cu;
+
256#endif
257
-
258 virtual bool match(
-
259 _In_reads_or_z_(end) const char* text,
-
260 _In_ size_t start = 0,
-
261 _In_ size_t end = (size_t)-1,
-
262 _In_ int flags = match_default)
-
263 {
-
264 assert(text || start >= end);
-
265 if (start < end && text[start]) {
-
266 if (text[start] == '&') {
-
267 // SGML entity
-
268 const auto& ctype = std::use_facet<std::ctype<char>>(m_locale);
-
269 for (this->interval.end = start + 1; this->interval.end < end && text[this->interval.end]; this->interval.end++)
-
270 if (text[this->interval.end] == ';') {
-
271 this->interval.end++;
-
272 this->interval.start = start;
-
273 return true;
-
274 }
-
275 else if (text[this->interval.end] == '&' || ctype.is(ctype.space, text[this->interval.end]))
-
276 break;
-
277 // Unterminated entity
-
278 }
-
279 this->interval.end = (this->interval.start = start) + 1;
-
280 return true;
-
281 }
-
282 this->interval.start = (this->interval.end = start) + 1;
-
283 return false;
-
284 }
-
285 };
+
+
261 class sgml_any_cp : public basic_any_cu<char>
+
262 {
+
263 public:
+
264 sgml_any_cp(_In_ const std::locale& locale = std::locale()) : basic_any_cu<char>(locale) {}
+
265
+
266 virtual bool match(
+
267 _In_reads_or_z_(end) const char* text,
+
268 _In_ size_t start = 0,
+
269 _In_ size_t end = (size_t)-1,
+
270 _In_ int flags = match_default)
+
271 {
+
272 assert(text || start >= end);
+
273 if (start < end && text[start]) {
+
274 if (text[start] == '&') {
+
275 // SGML entity
+
276 const auto& ctype = std::use_facet<std::ctype<char>>(m_locale);
+
277 for (this->interval.end = start + 1; this->interval.end < end && text[this->interval.end]; this->interval.end++)
+
278 if (text[this->interval.end] == ';') {
+
279 this->interval.end++;
+
280 this->interval.start = start;
+
281 return true;
+
282 }
+
283 else if (text[this->interval.end] == '&' || ctype.is(ctype.space, text[this->interval.end]))
+
284 break;
+
285 // Unterminated entity
+
286 }
+
287 this->interval.end = (this->interval.start = start) + 1;
+
288 return true;
+
289 }
+
290 this->interval.start = (this->interval.end = start) + 1;
+
291 return false;
+
292 }
+
293 };
-
286
-
290 template <class T>
-
-
291 class basic_cu : public basic_parser<T>
-
292 {
-
293 public:
-
294 basic_cu(T chr, bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
295 basic_parser<T>(locale),
-
296 m_chr(chr),
-
297 m_invert(invert)
-
298 {}
-
299
-
300 virtual bool match(
-
301 _In_reads_or_z_(end) const T* text,
-
302 _In_ size_t start = 0,
-
303 _In_ size_t end = (size_t)-1,
-
304 _In_ int flags = match_default)
-
305 {
-
306 assert(text || start >= end);
-
307 if (start < end && text[start]) {
-
308 bool r;
-
309 if (flags & match_case_insensitive) {
-
310 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
-
311 r = ctype.tolower(text[start]) == ctype.tolower(m_chr);
-
312 }
-
313 else
-
314 r = text[start] == m_chr;
-
315 if ((r && !m_invert) || (!r && m_invert)) {
-
316 this->interval.end = (this->interval.start = start) + 1;
-
317 return true;
-
318 }
-
319 }
-
320 this->interval.start = (this->interval.end = start) + 1;
-
321 return false;
-
322 }
-
323
-
324 protected:
-
325 T m_chr;
-
326 bool m_invert;
-
327 };
+
294
+
298 template <class T>
+
+
299 class basic_cu : public basic_parser<T>
+
300 {
+
301 public:
+
302 basic_cu(T chr, bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
303 basic_parser<T>(locale),
+
304 m_chr(chr),
+
305 m_invert(invert)
+
306 {}
+
307
+
308 virtual bool match(
+
309 _In_reads_or_z_(end) const T* text,
+
310 _In_ size_t start = 0,
+
311 _In_ size_t end = (size_t)-1,
+
312 _In_ int flags = match_default)
+
313 {
+
314 assert(text || start >= end);
+
315 if (start < end && text[start]) {
+
316 bool r;
+
317 if (flags & match_case_insensitive) {
+
318 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
+
319 r = ctype.tolower(text[start]) == ctype.tolower(m_chr);
+
320 }
+
321 else
+
322 r = text[start] == m_chr;
+
323 if ((r && !m_invert) || (!r && m_invert)) {
+
324 this->interval.end = (this->interval.start = start) + 1;
+
325 return true;
+
326 }
+
327 }
+
328 this->interval.start = (this->interval.end = start) + 1;
+
329 return false;
+
330 }
+
331
+
332 protected:
+
333 T m_chr;
+
334 bool m_invert;
+
335 };
-
328
-
329 using cu = basic_cu<char>;
-
330 using wcu = basic_cu<wchar_t>;
-
331#ifdef _UNICODE
-
332 using tcu = wcu;
-
333#else
-
334 using tcu = cu;
-
335#endif
336
-
-
340 class sgml_cp : public sgml_parser
-
341 {
-
342 public:
-
343 sgml_cp(const char* chr, size_t count = (size_t)-1, bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
344 sgml_parser(locale),
-
345 m_invert(invert)
-
346 {
-
347 assert(chr || !count);
-
348 wchar_t buf[3];
-
349 size_t chr_end;
-
350 m_chr.assign(count ? next_sgml_cp(chr, 0, count, chr_end, buf) : L"");
-
351 }
-
352
-
353 virtual bool match(
-
354 _In_reads_or_z_(end) const char* text,
-
355 _In_ size_t start = 0,
-
356 _In_ size_t end = (size_t)-1,
-
357 _In_ int flags = match_default)
-
358 {
-
359 assert(text || start >= end);
-
360 if (start < end && text[start]) {
-
361 wchar_t buf[3];
-
362 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
363 bool r = ((flags & match_case_insensitive) ?
-
364 stdex::strnicmp(chr, (size_t)-1, m_chr.c_str(), m_chr.size(), m_locale) :
-
365 stdex::strncmp(chr, (size_t)-1, m_chr.c_str(), m_chr.size())) == 0;
-
366 if ((r && !m_invert) || (!r && m_invert)) {
-
367 this->interval.start = start;
-
368 return true;
-
369 }
-
370 }
-
371 this->interval.start = (this->interval.end = start) + 1;
-
372 return false;
-
373 }
-
374
-
375 protected:
-
376 std::wstring m_chr;
-
377 bool m_invert;
-
378 };
+
337 using cu = basic_cu<char>;
+
338 using wcu = basic_cu<wchar_t>;
+
339#ifdef _UNICODE
+
340 using tcu = wcu;
+
341#else
+
342 using tcu = cu;
+
343#endif
+
344
+
+
348 class sgml_cp : public sgml_parser
+
349 {
+
350 public:
+
351 sgml_cp(const char* chr, size_t count = (size_t)-1, bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
352 sgml_parser(locale),
+
353 m_invert(invert)
+
354 {
+
355 assert(chr || !count);
+
356 wchar_t buf[3];
+
357 size_t chr_end;
+
358 m_chr.assign(count ? next_sgml_cp(chr, 0, count, chr_end, buf) : L"");
+
359 }
+
360
+
361 virtual bool match(
+
362 _In_reads_or_z_(end) const char* text,
+
363 _In_ size_t start = 0,
+
364 _In_ size_t end = (size_t)-1,
+
365 _In_ int flags = match_default)
+
366 {
+
367 assert(text || start >= end);
+
368 if (start < end && text[start]) {
+
369 wchar_t buf[3];
+
370 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
371 bool r = ((flags & match_case_insensitive) ?
+
372 stdex::strnicmp(chr, (size_t)-1, m_chr.c_str(), m_chr.size(), m_locale) :
+
373 stdex::strncmp(chr, (size_t)-1, m_chr.c_str(), m_chr.size())) == 0;
+
374 if ((r && !m_invert) || (!r && m_invert)) {
+
375 this->interval.start = start;
+
376 return true;
+
377 }
+
378 }
+
379 this->interval.start = (this->interval.end = start) + 1;
+
380 return false;
+
381 }
+
382
+
383 protected:
+
384 std::wstring m_chr;
+
385 bool m_invert;
+
386 };
-
379
-
383 template <class T>
-
-
384 class basic_space_cu : public basic_parser<T>
-
385 {
-
386 public:
-
387 basic_space_cu(bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
388 basic_parser<T>(locale),
-
389 m_invert(invert)
-
390 {}
-
391
-
392 virtual bool match(
-
393 _In_reads_or_z_(end) const T* text,
-
394 _In_ size_t start = 0,
-
395 _In_ size_t end = (size_t)-1,
-
396 _In_ int flags = match_default)
-
397 {
-
398 assert(text || start >= end);
-
399 if (start < end && text[start]) {
-
400 bool r =
-
401 ((flags & match_multiline) || !islbreak(text[start])) &&
-
402 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::space, text[start]);
-
403 if ((r && !m_invert) || (!r && m_invert)) {
-
404 this->interval.end = (this->interval.start = start) + 1;
-
405 return true;
-
406 }
-
407 }
-
408 this->interval.start = (this->interval.end = start) + 1;
-
409 return false;
-
410 }
-
411
-
412 protected:
-
413 bool m_invert;
-
414 };
+
387
+
391 template <class T>
+
+
392 class basic_space_cu : public basic_parser<T>
+
393 {
+
394 public:
+
395 basic_space_cu(bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
396 basic_parser<T>(locale),
+
397 m_invert(invert)
+
398 {}
+
399
+
400 virtual bool match(
+
401 _In_reads_or_z_(end) const T* text,
+
402 _In_ size_t start = 0,
+
403 _In_ size_t end = (size_t)-1,
+
404 _In_ int flags = match_default)
+
405 {
+
406 assert(text || start >= end);
+
407 if (start < end && text[start]) {
+
408 bool r =
+
409 ((flags & match_multiline) || !islbreak(text[start])) &&
+
410 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::space, text[start]);
+
411 if ((r && !m_invert) || (!r && m_invert)) {
+
412 this->interval.end = (this->interval.start = start) + 1;
+
413 return true;
+
414 }
+
415 }
+
416 this->interval.start = (this->interval.end = start) + 1;
+
417 return false;
+
418 }
+
419
+
420 protected:
+
421 bool m_invert;
+
422 };
-
415
- - -
418#ifdef _UNICODE
-
419 using tspace_cu = wspace_cu;
-
420#else
-
421 using tspace_cu = space_cu;
-
422#endif
423
-
-
427 class sgml_space_cp : public basic_space_cu<char>
-
428 {
-
429 public:
-
430 sgml_space_cp(_In_ bool invert = false, _In_ const std::locale& locale = std::locale()) :
- -
432 {}
-
433
-
434 virtual bool match(
-
435 _In_reads_or_z_(end) const char* text,
-
436 _In_ size_t start = 0,
-
437 _In_ size_t end = (size_t)-1,
-
438 _In_ int flags = match_default)
-
439 {
-
440 assert(text || start >= end);
-
441 if (start < end && text[start]) {
-
442 wchar_t buf[3];
-
443 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
444 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
445 bool r =
-
446 ((flags & match_multiline) || !islbreak(chr, (size_t)-1)) &&
-
447 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::space, chr, chr_end) == chr_end;
-
448 if ((r && !m_invert) || (!r && m_invert)) {
-
449 this->interval.start = start;
-
450 return true;
-
451 }
-
452 }
-
453
-
454 this->interval.start = (this->interval.end = start) + 1;
-
455 return false;
-
456 }
-
457 };
+ + +
426#ifdef _UNICODE
+
427 using tspace_cu = wspace_cu;
+
428#else
+
429 using tspace_cu = space_cu;
+
430#endif
+
431
+
+
435 class sgml_space_cp : public basic_space_cu<char>
+
436 {
+
437 public:
+
438 sgml_space_cp(_In_ bool invert = false, _In_ const std::locale& locale = std::locale()) :
+ +
440 {}
+
441
+
442 virtual bool match(
+
443 _In_reads_or_z_(end) const char* text,
+
444 _In_ size_t start = 0,
+
445 _In_ size_t end = (size_t)-1,
+
446 _In_ int flags = match_default)
+
447 {
+
448 assert(text || start >= end);
+
449 if (start < end && text[start]) {
+
450 wchar_t buf[3];
+
451 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
452 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
453 bool r =
+
454 ((flags & match_multiline) || !islbreak(chr, (size_t)-1)) &&
+
455 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::space, chr, chr_end) == chr_end;
+
456 if ((r && !m_invert) || (!r && m_invert)) {
+
457 this->interval.start = start;
+
458 return true;
+
459 }
+
460 }
+
461
+
462 this->interval.start = (this->interval.end = start) + 1;
+
463 return false;
+
464 }
+
465 };
-
458
-
462 template <class T>
-
-
463 class basic_punct_cu : public basic_parser<T>
-
464 {
-
465 public:
-
466 basic_punct_cu(bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
467 basic_parser<T>(locale),
-
468 m_invert(invert)
-
469 {}
-
470
-
471 virtual bool match(
-
472 _In_reads_or_z_(end) const T* text,
-
473 _In_ size_t start = 0,
-
474 _In_ size_t end = (size_t)-1,
-
475 _In_ int flags = match_default)
-
476 {
-
477 assert(text || start >= end);
-
478 if (start < end && text[start]) {
-
479 bool r = std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::punct, text[start]);
-
480 if ((r && !m_invert) || (!r && m_invert)) {
-
481 this->interval.end = (this->interval.start = start) + 1;
-
482 return true;
-
483 }
-
484 }
-
485 this->interval.start = (this->interval.end = start) + 1;
-
486 return false;
-
487 }
-
488
-
489 protected:
-
490 bool m_invert;
-
491 };
+
466
+
470 template <class T>
+
+
471 class basic_punct_cu : public basic_parser<T>
+
472 {
+
473 public:
+
474 basic_punct_cu(bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
475 basic_parser<T>(locale),
+
476 m_invert(invert)
+
477 {}
+
478
+
479 virtual bool match(
+
480 _In_reads_or_z_(end) const T* text,
+
481 _In_ size_t start = 0,
+
482 _In_ size_t end = (size_t)-1,
+
483 _In_ int flags = match_default)
+
484 {
+
485 assert(text || start >= end);
+
486 if (start < end && text[start]) {
+
487 bool r = std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::punct, text[start]);
+
488 if ((r && !m_invert) || (!r && m_invert)) {
+
489 this->interval.end = (this->interval.start = start) + 1;
+
490 return true;
+
491 }
+
492 }
+
493 this->interval.start = (this->interval.end = start) + 1;
+
494 return false;
+
495 }
+
496
+
497 protected:
+
498 bool m_invert;
+
499 };
-
492
- - -
495#ifdef _UNICODE
-
496 using tpunct_cu = wpunct_cu;
-
497#else
-
498 using tpunct_cu = punct_cu;
-
499#endif
500
-
-
504 class sgml_punct_cp : public basic_punct_cu<char>
-
505 {
-
506 public:
-
507 sgml_punct_cp(bool invert = false, _In_ const std::locale& locale = std::locale()) :
- -
509 {}
-
510
-
511 virtual bool match(
-
512 _In_reads_or_z_(end) const char* text,
-
513 _In_ size_t start = 0,
-
514 _In_ size_t end = (size_t)-1,
-
515 _In_ int flags = match_default)
-
516 {
-
517 assert(text || start >= end);
-
518 if (start < end && text[start]) {
-
519 wchar_t buf[3];
-
520 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
521 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
522 bool r = std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::punct, chr, chr_end) == chr_end;
-
523 if ((r && !m_invert) || (!r && m_invert)) {
-
524 this->interval.start = start;
-
525 return true;
-
526 }
-
527 }
-
528 this->interval.start = (this->interval.end = start) + 1;
-
529 return false;
-
530 }
-
531 };
+ + +
503#ifdef _UNICODE
+
504 using tpunct_cu = wpunct_cu;
+
505#else
+
506 using tpunct_cu = punct_cu;
+
507#endif
+
508
+
+
512 class sgml_punct_cp : public basic_punct_cu<char>
+
513 {
+
514 public:
+
515 sgml_punct_cp(bool invert = false, _In_ const std::locale& locale = std::locale()) :
+ +
517 {}
+
518
+
519 virtual bool match(
+
520 _In_reads_or_z_(end) const char* text,
+
521 _In_ size_t start = 0,
+
522 _In_ size_t end = (size_t)-1,
+
523 _In_ int flags = match_default)
+
524 {
+
525 assert(text || start >= end);
+
526 if (start < end && text[start]) {
+
527 wchar_t buf[3];
+
528 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
529 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
530 bool r = std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::punct, chr, chr_end) == chr_end;
+
531 if ((r && !m_invert) || (!r && m_invert)) {
+
532 this->interval.start = start;
+
533 return true;
+
534 }
+
535 }
+
536 this->interval.start = (this->interval.end = start) + 1;
+
537 return false;
+
538 }
+
539 };
-
532
-
536 template <class T>
-
- -
538 {
-
539 public:
-
540 basic_space_or_punct_cu(bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
541 basic_parser<T>(locale),
-
542 m_invert(invert)
-
543 {}
-
544
-
545 virtual bool match(
-
546 _In_reads_or_z_(end) const T* text,
-
547 _In_ size_t start = 0,
-
548 _In_ size_t end = (size_t)-1,
-
549 _In_ int flags = match_default)
-
550 {
-
551 assert(text || start >= end);
-
552 if (start < end && text[start]) {
-
553 bool r =
-
554 ((flags & match_multiline) || !islbreak(text[start])) &&
-
555 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::space | std::ctype_base::punct, text[start]);
-
556 if ((r && !m_invert) || (!r && m_invert)) {
-
557 this->interval.end = (this->interval.start = start) + 1;
-
558 return true;
-
559 }
-
560 }
-
561 this->interval.start = (this->interval.end = start) + 1;
-
562 return false;
-
563 }
-
564
-
565 protected:
-
566 bool m_invert;
-
567 };
+
540
+
544 template <class T>
+
+ +
546 {
+
547 public:
+
548 basic_space_or_punct_cu(bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
549 basic_parser<T>(locale),
+
550 m_invert(invert)
+
551 {}
+
552
+
553 virtual bool match(
+
554 _In_reads_or_z_(end) const T* text,
+
555 _In_ size_t start = 0,
+
556 _In_ size_t end = (size_t)-1,
+
557 _In_ int flags = match_default)
+
558 {
+
559 assert(text || start >= end);
+
560 if (start < end && text[start]) {
+
561 bool r =
+
562 ((flags & match_multiline) || !islbreak(text[start])) &&
+
563 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::space | std::ctype_base::punct, text[start]);
+
564 if ((r && !m_invert) || (!r && m_invert)) {
+
565 this->interval.end = (this->interval.start = start) + 1;
+
566 return true;
+
567 }
+
568 }
+
569 this->interval.start = (this->interval.end = start) + 1;
+
570 return false;
+
571 }
+
572
+
573 protected:
+
574 bool m_invert;
+
575 };
-
568
- - -
571#ifdef _UNICODE
- -
573#else
- -
575#endif
576
-
- -
581 {
-
582 public:
-
583 sgml_space_or_punct_cp(bool invert = false, _In_ const std::locale& locale = std::locale()) :
- -
585 {}
-
586
-
587 virtual bool match(
-
588 _In_reads_or_z_(end) const char* text,
-
589 _In_ size_t start = 0,
-
590 _In_ size_t end = (size_t)-1,
-
591 _In_ int flags = match_default)
-
592 {
-
593 assert(text || start >= end);
-
594 if (start < end && text[start]) {
-
595 wchar_t buf[3];
-
596 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
597 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
598 bool r =
-
599 ((flags & match_multiline) || !islbreak(chr, (size_t)-1)) &&
-
600 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::space | std::ctype_base::punct, chr, chr_end) == chr_end;
-
601 if ((r && !m_invert) || (!r && m_invert)) {
-
602 this->interval.start = start;
-
603 return true;
-
604 }
-
605 }
-
606 this->interval.start = (this->interval.end = start) + 1;
-
607 return false;
-
608 }
-
609 };
+ + +
579#ifdef _UNICODE
+ +
581#else
+ +
583#endif
+
584
+
+ +
589 {
+
590 public:
+
591 sgml_space_or_punct_cp(bool invert = false, _In_ const std::locale& locale = std::locale()) :
+ +
593 {}
+
594
+
595 virtual bool match(
+
596 _In_reads_or_z_(end) const char* text,
+
597 _In_ size_t start = 0,
+
598 _In_ size_t end = (size_t)-1,
+
599 _In_ int flags = match_default)
+
600 {
+
601 assert(text || start >= end);
+
602 if (start < end && text[start]) {
+
603 wchar_t buf[3];
+
604 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
605 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
606 bool r =
+
607 ((flags & match_multiline) || !islbreak(chr, (size_t)-1)) &&
+
608 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::space | std::ctype_base::punct, chr, chr_end) == chr_end;
+
609 if ((r && !m_invert) || (!r && m_invert)) {
+
610 this->interval.start = start;
+
611 return true;
+
612 }
+
613 }
+
614 this->interval.start = (this->interval.end = start) + 1;
+
615 return false;
+
616 }
+
617 };
-
610
-
614 template <class T>
-
-
615 class basic_bol : public basic_parser<T>
-
616 {
-
617 public:
-
618 basic_bol(bool invert = false) : m_invert(invert) {}
-
619
-
620 virtual bool match(
-
621 _In_reads_or_z_(end) const T* text,
-
622 _In_ size_t start = 0,
-
623 _In_ size_t end = (size_t)-1,
-
624 _In_ int flags = match_default)
-
625 {
-
626 assert(text || start >= end);
-
627 bool r = start == 0 || (start <= end && islbreak(text[start - 1]));
-
628 if ((r && !m_invert) || (!r && m_invert)) {
-
629 this->interval.end = this->interval.start = start;
-
630 return true;
-
631 }
-
632 this->interval.start = (this->interval.end = start) + 1;
-
633 return false;
-
634 }
-
635
-
636 protected:
-
637 bool m_invert;
-
638 };
+
618
+
622 template <class T>
+
+
623 class basic_bol : public basic_parser<T>
+
624 {
+
625 public:
+
626 basic_bol(bool invert = false) : m_invert(invert) {}
+
627
+
628 virtual bool match(
+
629 _In_reads_or_z_(end) const T* text,
+
630 _In_ size_t start = 0,
+
631 _In_ size_t end = (size_t)-1,
+
632 _In_ int flags = match_default)
+
633 {
+
634 assert(text || start >= end);
+
635 bool r = start == 0 || (start <= end && islbreak(text[start - 1]));
+
636 if ((r && !m_invert) || (!r && m_invert)) {
+
637 this->interval.end = this->interval.start = start;
+
638 return true;
+
639 }
+
640 this->interval.start = (this->interval.end = start) + 1;
+
641 return false;
+
642 }
+
643
+
644 protected:
+
645 bool m_invert;
+
646 };
-
639
-
640 using bol = basic_bol<char>;
-
641 using wbol = basic_bol<wchar_t>;
-
642#ifdef _UNICODE
-
643 using tbol = wbol;
-
644#else
-
645 using tbol = bol;
-
646#endif
- -
648
-
652 template <class T>
-
-
653 class basic_eol : public basic_parser<T>
-
654 {
-
655 public:
-
656 basic_eol(bool invert = false) : m_invert(invert) {}
-
657
-
658 virtual bool match(
-
659 _In_reads_or_z_(end) const T* text,
-
660 _In_ size_t start = 0,
-
661 _In_ size_t end = (size_t)-1,
-
662 _In_ int flags = match_default)
-
663 {
-
664 assert(text || start >= end);
-
665 bool r = islbreak(text[start]);
-
666 if ((r && !m_invert) || (!r && m_invert)) {
-
667 this->interval.end = this->interval.start = start;
-
668 return true;
-
669 }
-
670 this->interval.start = (this->interval.end = start) + 1;
-
671 return false;
-
672 }
-
673
-
674 protected:
-
675 bool m_invert;
-
676 };
+
647
+
648 using bol = basic_bol<char>;
+
649 using wbol = basic_bol<wchar_t>;
+
650#ifdef _UNICODE
+
651 using tbol = wbol;
+
652#else
+
653 using tbol = bol;
+
654#endif
+ +
656
+
660 template <class T>
+
+
661 class basic_eol : public basic_parser<T>
+
662 {
+
663 public:
+
664 basic_eol(bool invert = false) : m_invert(invert) {}
+
665
+
666 virtual bool match(
+
667 _In_reads_or_z_(end) const T* text,
+
668 _In_ size_t start = 0,
+
669 _In_ size_t end = (size_t)-1,
+
670 _In_ int flags = match_default)
+
671 {
+
672 assert(text || start >= end);
+
673 bool r = islbreak(text[start]);
+
674 if ((r && !m_invert) || (!r && m_invert)) {
+
675 this->interval.end = this->interval.start = start;
+
676 return true;
+
677 }
+
678 this->interval.start = (this->interval.end = start) + 1;
+
679 return false;
+
680 }
+
681
+
682 protected:
+
683 bool m_invert;
+
684 };
-
677
-
678 using eol = basic_eol<char>;
-
679 using weol = basic_eol<wchar_t>;
-
680#ifdef _UNICODE
-
681 using teol = weol;
-
682#else
-
683 using teol = eol;
-
684#endif
- -
686
-
687 template <class T>
-
-
688 class basic_set : public basic_parser<T>
-
689 {
-
690 public:
-
691 basic_set(bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
692 basic_parser<T>(locale),
-
693 hit_offset((size_t)-1),
-
694 m_invert(invert)
-
695 {}
-
696
-
697 virtual bool match(
-
698 _In_reads_or_z_(end) const T* text,
-
699 _In_ size_t start = 0,
-
700 _In_ size_t end = (size_t)-1,
-
701 _In_ int flags = match_default) = 0;
-
702
-
703 virtual void invalidate()
-
704 {
-
705 hit_offset = (size_t)-1;
- -
707 }
-
708
-
709 public:
-
710 size_t hit_offset;
-
711
-
712 protected:
-
713 bool m_invert;
-
714 };
+
685
+
686 using eol = basic_eol<char>;
+
687 using weol = basic_eol<wchar_t>;
+
688#ifdef _UNICODE
+
689 using teol = weol;
+
690#else
+
691 using teol = eol;
+
692#endif
+ +
694
+
695 template <class T>
+
+
696 class basic_set : public basic_parser<T>
+
697 {
+
698 public:
+
699 basic_set(bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
700 basic_parser<T>(locale),
+
701 hit_offset((size_t)-1),
+
702 m_invert(invert)
+
703 {}
+
704
+
705 virtual bool match(
+
706 _In_reads_or_z_(end) const T* text,
+
707 _In_ size_t start = 0,
+
708 _In_ size_t end = (size_t)-1,
+
709 _In_ int flags = match_default) = 0;
+
710
+
711 virtual void invalidate()
+
712 {
+
713 hit_offset = (size_t)-1;
+ +
715 }
+
716
+
717 public:
+
718 size_t hit_offset;
+
719
+
720 protected:
+
721 bool m_invert;
+
722 };
-
715
-
719 template <class T>
-
-
720 class basic_cu_set : public basic_set<T>
-
721 {
-
722 public:
- -
724 _In_reads_or_z_(count) const T* set,
-
725 _In_ size_t count = (size_t)-1,
-
726 _In_ bool invert = false,
-
727 _In_ const std::locale& locale = std::locale()) :
-
728 basic_set<T>(invert, locale)
-
729 {
-
730 if (set)
-
731 m_set.assign(set, set + stdex::strnlen(set, count));
-
732 }
-
733
-
734 virtual bool match(
-
735 _In_reads_or_z_(end) const T* text,
-
736 _In_ size_t start = 0,
-
737 _In_ size_t end = (size_t)-1,
-
738 _In_ int flags = match_default)
-
739 {
-
740 assert(text || start >= end);
-
741 if (start < end && text[start]) {
-
742 const T* set = m_set.c_str();
-
743 size_t r = (flags & match_case_insensitive) ?
-
744 stdex::strnichr(set, m_set.size(), text[start], this->m_locale) :
-
745 stdex::strnchr(set, m_set.size(), text[start]);
-
746 if ((r != stdex::npos && !this->m_invert) || (r == stdex::npos && this->m_invert)) {
-
747 this->hit_offset = r;
-
748 this->interval.end = (this->interval.start = start) + 1;
-
749 return true;
-
750 }
-
751 }
-
752 this->hit_offset = (size_t)-1;
-
753 this->interval.start = (this->interval.end = start) + 1;
-
754 return false;
-
755 }
-
756
-
757 protected:
-
758 std::basic_string<T> m_set;
-
759 };
+
723
+
727 template <class T>
+
+
728 class basic_cu_set : public basic_set<T>
+
729 {
+
730 public:
+ +
732 _In_reads_or_z_(count) const T* set,
+
733 _In_ size_t count = (size_t)-1,
+
734 _In_ bool invert = false,
+
735 _In_ const std::locale& locale = std::locale()) :
+
736 basic_set<T>(invert, locale)
+
737 {
+
738 if (set)
+
739 m_set.assign(set, set + stdex::strnlen(set, count));
+
740 }
+
741
+
742 virtual bool match(
+
743 _In_reads_or_z_(end) const T* text,
+
744 _In_ size_t start = 0,
+
745 _In_ size_t end = (size_t)-1,
+
746 _In_ int flags = match_default)
+
747 {
+
748 assert(text || start >= end);
+
749 if (start < end && text[start]) {
+
750 const T* set = m_set.c_str();
+
751 size_t r = (flags & match_case_insensitive) ?
+
752 stdex::strnichr(set, m_set.size(), text[start], this->m_locale) :
+
753 stdex::strnchr(set, m_set.size(), text[start]);
+
754 if ((r != stdex::npos && !this->m_invert) || (r == stdex::npos && this->m_invert)) {
+
755 this->hit_offset = r;
+
756 this->interval.end = (this->interval.start = start) + 1;
+
757 return true;
+
758 }
+
759 }
+
760 this->hit_offset = (size_t)-1;
+
761 this->interval.start = (this->interval.end = start) + 1;
+
762 return false;
+
763 }
+
764
+
765 protected:
+
766 std::basic_string<T> m_set;
+
767 };
-
760
- - -
763#ifdef _UNICODE
-
764 using tcu_set = wcu_set;
-
765#else
-
766 using tcu_set = cu_set;
-
767#endif
768
-
-
772 class sgml_cp_set : public basic_set<char>
-
773 {
-
774 public:
-
775 sgml_cp_set(const char* set, size_t count = (size_t)-1, bool invert = false, _In_ const std::locale& locale = std::locale()) :
-
776 basic_set<char>(invert, locale)
-
777 {
-
778 if (set)
-
779 m_set = sgml2wstr(set, count);
-
780 }
-
781
-
782 virtual bool match(
-
783 _In_reads_or_z_(end) const char* text,
-
784 _In_ size_t start = 0,
-
785 _In_ size_t end = (size_t)-1,
-
786 _In_ int flags = match_default)
-
787 {
-
788 assert(text || start >= end);
-
789 if (start < end && text[start]) {
-
790 wchar_t buf[3];
-
791 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
792 const wchar_t* set = m_set.c_str();
-
793 size_t r = (flags & match_case_insensitive) ?
-
794 stdex::strnistr(set, m_set.size(), chr, m_locale) :
-
795 stdex::strnstr(set, m_set.size(), chr);
-
796 if ((r != stdex::npos && !m_invert) || (r == stdex::npos && m_invert)) {
-
797 hit_offset = r;
-
798 this->interval.start = start;
-
799 return true;
-
800 }
-
801 }
-
802 hit_offset = (size_t)-1;
-
803 this->interval.start = (this->interval.end = start) + 1;
-
804 return false;
-
805 }
-
806
-
807 protected:
-
808 std::wstring m_set;
-
809 };
+ + +
771#ifdef _UNICODE
+
772 using tcu_set = wcu_set;
+
773#else
+
774 using tcu_set = cu_set;
+
775#endif
+
776
+
+
780 class sgml_cp_set : public basic_set<char>
+
781 {
+
782 public:
+
783 sgml_cp_set(const char* set, size_t count = (size_t)-1, bool invert = false, _In_ const std::locale& locale = std::locale()) :
+
784 basic_set<char>(invert, locale)
+
785 {
+
786 if (set)
+
787 m_set = sgml2wstr(set, count);
+
788 }
+
789
+
790 virtual bool match(
+
791 _In_reads_or_z_(end) const char* text,
+
792 _In_ size_t start = 0,
+
793 _In_ size_t end = (size_t)-1,
+
794 _In_ int flags = match_default)
+
795 {
+
796 assert(text || start >= end);
+
797 if (start < end && text[start]) {
+
798 wchar_t buf[3];
+
799 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
800 const wchar_t* set = m_set.c_str();
+
801 size_t r = (flags & match_case_insensitive) ?
+
802 stdex::strnistr(set, m_set.size(), chr, m_locale) :
+
803 stdex::strnstr(set, m_set.size(), chr);
+
804 if ((r != stdex::npos && !m_invert) || (r == stdex::npos && m_invert)) {
+
805 hit_offset = r;
+
806 this->interval.start = start;
+
807 return true;
+
808 }
+
809 }
+
810 hit_offset = (size_t)-1;
+
811 this->interval.start = (this->interval.end = start) + 1;
+
812 return false;
+
813 }
+
814
+
815 protected:
+
816 std::wstring m_set;
+
817 };
-
810
-
814 template <class T>
-
-
815 class basic_string : public basic_parser<T>
-
816 {
-
817 public:
- -
819 _In_reads_or_z_(count) const T* str,
-
820 _In_ size_t count = (size_t)-1,
-
821 _In_ const std::locale& locale = std::locale()) :
-
822 basic_parser<T>(locale),
-
823 m_str(str, str + stdex::strnlen(str, count))
-
824 {}
-
825
-
826 virtual bool match(
-
827 _In_reads_or_z_(end) const T* text,
-
828 _In_ size_t start = 0,
-
829 _In_ size_t end = (size_t)-1,
-
830 _In_ int flags = match_default)
-
831 {
-
832 assert(text || start >= end);
-
833 size_t
-
834 m = m_str.size(),
-
835 n = std::min<size_t>(end - start, m);
-
836 bool r = ((flags & match_case_insensitive) ?
-
837 stdex::strnicmp(text + start, n, m_str.c_str(), m, this->m_locale) :
-
838 stdex::strncmp(text + start, n, m_str.c_str(), m)) == 0;
-
839 if (r) {
-
840 this->interval.end = (this->interval.start = start) + n;
-
841 return true;
-
842 }
-
843 this->interval.start = (this->interval.end = start) + 1;
-
844 return false;
-
845 }
-
846
-
847 protected:
-
848 std::basic_string<T> m_str;
-
849 };
+
818
+
822 template <class T>
+
+
823 class basic_string : public basic_parser<T>
+
824 {
+
825 public:
+ +
827 _In_reads_or_z_(count) const T* str,
+
828 _In_ size_t count = (size_t)-1,
+
829 _In_ const std::locale& locale = std::locale()) :
+
830 basic_parser<T>(locale),
+
831 m_str(str, str + stdex::strnlen(str, count))
+
832 {}
+
833
+
834 virtual bool match(
+
835 _In_reads_or_z_(end) const T* text,
+
836 _In_ size_t start = 0,
+
837 _In_ size_t end = (size_t)-1,
+
838 _In_ int flags = match_default)
+
839 {
+
840 assert(text || start >= end);
+
841 size_t
+
842 m = m_str.size(),
+
843 n = std::min<size_t>(end - start, m);
+
844 bool r = ((flags & match_case_insensitive) ?
+
845 stdex::strnicmp(text + start, n, m_str.c_str(), m, this->m_locale) :
+
846 stdex::strncmp(text + start, n, m_str.c_str(), m)) == 0;
+
847 if (r) {
+
848 this->interval.end = (this->interval.start = start) + n;
+
849 return true;
+
850 }
+
851 this->interval.start = (this->interval.end = start) + 1;
+
852 return false;
+
853 }
+
854
+
855 protected:
+
856 std::basic_string<T> m_str;
+
857 };
-
850
- - -
853#ifdef _UNICODE
-
854 using tstring = wstring;
-
855#else
-
856 using tstring = string;
-
857#endif
858
-
- -
863 {
-
864 public:
-
865 sgml_string(const char* str, size_t count = (size_t)-1, _In_ const std::locale& locale = std::locale()) :
-
866 sgml_parser(locale),
-
867 m_str(sgml2wstr(str, count))
-
868 {}
-
869
-
870 virtual bool match(
-
871 _In_reads_or_z_(end) const char* text,
-
872 _In_ size_t start = 0,
-
873 _In_ size_t end = (size_t)-1,
-
874 _In_ int flags = match_default)
-
875 {
-
876 assert(text || start >= end);
-
877 const wchar_t* str = m_str.c_str();
-
878 const bool case_insensitive = flags & match_case_insensitive ? true : false;
-
879 const auto& ctype = std::use_facet<std::ctype<wchar_t>>(m_locale);
-
880 for (this->interval.end = start;;) {
-
881 if (!*str) {
-
882 this->interval.start = start;
-
883 return true;
-
884 }
-
885 if (this->interval.end >= end || !text[this->interval.end]) {
-
886 this->interval.start = (this->interval.end = start) + 1;
-
887 return false;
-
888 }
-
889 wchar_t buf[3];
-
890 const wchar_t* chr = next_sgml_cp(text, this->interval.end, end, this->interval.end, buf);
-
891 for (; *chr; ++str, ++chr) {
-
892 if (!*str ||
-
893 (case_insensitive ? ctype.tolower(*str) != ctype.tolower(*chr) : *str != *chr))
-
894 {
-
895 this->interval.start = (this->interval.end = start) + 1;
-
896 return false;
-
897 }
-
898 }
-
899 }
-
900 }
-
901
-
902 protected:
-
903 std::wstring m_str;
-
904 };
+ + +
861#ifdef _UNICODE
+
862 using tstring = wstring;
+
863#else
+
864 using tstring = string;
+
865#endif
+
866
+
+ +
871 {
+
872 public:
+
873 sgml_string(const char* str, size_t count = (size_t)-1, _In_ const std::locale& locale = std::locale()) :
+
874 sgml_parser(locale),
+
875 m_str(sgml2wstr(str, count))
+
876 {}
+
877
+
878 virtual bool match(
+
879 _In_reads_or_z_(end) const char* text,
+
880 _In_ size_t start = 0,
+
881 _In_ size_t end = (size_t)-1,
+
882 _In_ int flags = match_default)
+
883 {
+
884 assert(text || start >= end);
+
885 const wchar_t* str = m_str.c_str();
+
886 const bool case_insensitive = flags & match_case_insensitive ? true : false;
+
887 const auto& ctype = std::use_facet<std::ctype<wchar_t>>(m_locale);
+
888 for (this->interval.end = start;;) {
+
889 if (!*str) {
+
890 this->interval.start = start;
+
891 return true;
+
892 }
+
893 if (this->interval.end >= end || !text[this->interval.end]) {
+
894 this->interval.start = (this->interval.end = start) + 1;
+
895 return false;
+
896 }
+
897 wchar_t buf[3];
+
898 const wchar_t* chr = next_sgml_cp(text, this->interval.end, end, this->interval.end, buf);
+
899 for (; *chr; ++str, ++chr) {
+
900 if (!*str ||
+
901 (case_insensitive ? ctype.tolower(*str) != ctype.tolower(*chr) : *str != *chr))
+
902 {
+
903 this->interval.start = (this->interval.end = start) + 1;
+
904 return false;
+
905 }
+
906 }
+
907 }
+
908 }
+
909
+
910 protected:
+
911 std::wstring m_str;
+
912 };
-
905
-
909 template <class T>
-
- -
911 {
-
912 public:
-
913 basic_iterations(const std::shared_ptr<basic_parser<T>>& el, size_t min_iterations = 0, size_t max_iterations = (size_t)-1, bool greedy = true) :
-
914 m_el(el),
- - - -
918 {}
-
919
-
920 virtual bool match(
-
921 _In_reads_or_z_(end) const T* text,
-
922 _In_ size_t start = 0,
-
923 _In_ size_t end = (size_t)-1,
-
924 _In_ int flags = match_default)
-
925 {
-
926 assert(text || start >= end);
-
927 this->interval.start = this->interval.end = start;
-
928 for (size_t i = 0; ; i++) {
-
929 if ((!m_greedy && i >= m_min_iterations) || i >= m_max_iterations)
-
930 return true;
-
931 if (!m_el->match(text, this->interval.end, end, flags)) {
-
932 if (i >= m_min_iterations)
-
933 return true;
-
934 break;
-
935 }
-
936 if (m_el->interval.end == this->interval.end) {
-
937 // Element did match, but the matching interval was empty. Quit instead of spinning.
+
913
+
917 template <class T>
+
+ +
919 {
+
920 public:
+
921 basic_iterations(const std::shared_ptr<basic_parser<T>>& el, size_t min_iterations = 0, size_t max_iterations = (size_t)-1, bool greedy = true) :
+
922 m_el(el),
+ + + +
926 {}
+
927
+
928 virtual bool match(
+
929 _In_reads_or_z_(end) const T* text,
+
930 _In_ size_t start = 0,
+
931 _In_ size_t end = (size_t)-1,
+
932 _In_ int flags = match_default)
+
933 {
+
934 assert(text || start >= end);
+
935 this->interval.start = this->interval.end = start;
+
936 for (size_t i = 0; ; i++) {
+
937 if ((!m_greedy && i >= m_min_iterations) || i >= m_max_iterations)
938 return true;
-
939 }
-
940 this->interval.end = m_el->interval.end;
-
941 }
-
942 this->interval.start = (this->interval.end = start) + 1;
-
943 return false;
-
944 }
-
945
-
946 protected:
-
947 std::shared_ptr<basic_parser<T>> m_el;
- - -
950 bool m_greedy;
-
951 };
+
939 if (!m_el->match(text, this->interval.end, end, flags)) {
+
940 if (i >= m_min_iterations)
+
941 return true;
+
942 break;
+
943 }
+
944 if (m_el->interval.end == this->interval.end) {
+
945 // Element did match, but the matching interval was empty. Quit instead of spinning.
+
946 return true;
+
947 }
+
948 this->interval.end = m_el->interval.end;
+
949 }
+
950 this->interval.start = (this->interval.end = start) + 1;
+
951 return false;
+
952 }
+
953
+
954 protected:
+
955 std::shared_ptr<basic_parser<T>> m_el;
+ + +
958 bool m_greedy;
+
959 };
-
952
- - -
955#ifdef _UNICODE
-
956 using titerations = witerations;
-
957#else
-
958 using titerations = iterations;
-
959#endif
- -
961
-
965 template <class T>
-
- -
967 {
-
968 protected:
-
969 parser_collection(_In_ const std::locale& locale) : basic_parser<T>(locale) {}
-
970
-
971 public:
- -
973 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el,
-
974 _In_ size_t count,
-
975 _In_ const std::locale& locale = std::locale()) :
-
976 basic_parser<T>(locale)
-
977 {
-
978 assert(el || !count);
-
979 m_collection.reserve(count);
-
980 for (size_t i = 0; i < count; i++)
-
981 m_collection.push_back(el[i]);
-
982 }
-
983
- -
985 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
-
986 _In_ const std::locale& locale = std::locale()) :
-
987 basic_parser<T>(locale),
-
988 m_collection(std::move(collection))
-
989 {}
-
990
-
991 virtual void invalidate()
-
992 {
-
993 for (auto& el: m_collection)
-
994 el->invalidate();
- -
996 }
-
997
-
998 protected:
-
999 std::vector<std::shared_ptr<basic_parser<T>>> m_collection;
-
1000 };
+
960
+ + +
963#ifdef _UNICODE
+
964 using titerations = witerations;
+
965#else
+
966 using titerations = iterations;
+
967#endif
+ +
969
+
973 template <class T>
+
+ +
975 {
+
976 protected:
+
977 parser_collection(_In_ const std::locale& locale) : basic_parser<T>(locale) {}
+
978
+
979 public:
+ +
981 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el,
+
982 _In_ size_t count,
+
983 _In_ const std::locale& locale = std::locale()) :
+
984 basic_parser<T>(locale)
+
985 {
+
986 assert(el || !count);
+
987 m_collection.reserve(count);
+
988 for (size_t i = 0; i < count; i++)
+
989 m_collection.push_back(el[i]);
+
990 }
+
991
+ +
993 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
+
994 _In_ const std::locale& locale = std::locale()) :
+
995 basic_parser<T>(locale),
+
996 m_collection(std::move(collection))
+
997 {}
+
998
+
999 virtual void invalidate()
+
1000 {
+
1001 for (auto& el: m_collection)
+
1002 el->invalidate();
+ +
1004 }
+
1005
+
1006 protected:
+
1007 std::vector<std::shared_ptr<basic_parser<T>>> m_collection;
+
1008 };
-
1001
-
1005 template <class T>
-
- -
1007 {
-
1008 public:
- -
1010 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el = nullptr,
-
1011 _In_ size_t count = 0,
-
1012 _In_ const std::locale& locale = std::locale()) :
-
1013 parser_collection<T>(el, count, locale)
-
1014 {}
-
1015
- -
1017 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
-
1018 _In_ const std::locale& locale = std::locale()) :
-
1019 parser_collection<T>(std::move(collection), locale)
-
1020 {}
-
1021
-
1022 virtual bool match(
-
1023 _In_reads_or_z_(end) const T* text,
-
1024 _In_ size_t start = 0,
-
1025 _In_ size_t end = (size_t)-1,
-
1026 _In_ int flags = match_default)
-
1027 {
-
1028 assert(text || start >= end);
-
1029 this->interval.end = start;
-
1030 for (auto i = this->m_collection.begin(); i != this->m_collection.end(); ++i) {
-
1031 if (!(*i)->match(text, this->interval.end, end, flags)) {
-
1032 for (++i; i != this->m_collection.end(); ++i)
-
1033 (*i)->invalidate();
-
1034 this->interval.start = (this->interval.end = start) + 1;
-
1035 return false;
-
1036 }
-
1037 this->interval.end = (*i)->interval.end;
-
1038 }
-
1039 this->interval.start = start;
-
1040 return true;
-
1041 }
-
1042 };
+
1009
+
1013 template <class T>
+
+ +
1015 {
+
1016 public:
+ +
1018 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el = nullptr,
+
1019 _In_ size_t count = 0,
+
1020 _In_ const std::locale& locale = std::locale()) :
+
1021 parser_collection<T>(el, count, locale)
+
1022 {}
+
1023
+ +
1025 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
+
1026 _In_ const std::locale& locale = std::locale()) :
+
1027 parser_collection<T>(std::move(collection), locale)
+
1028 {}
+
1029
+
1030 virtual bool match(
+
1031 _In_reads_or_z_(end) const T* text,
+
1032 _In_ size_t start = 0,
+
1033 _In_ size_t end = (size_t)-1,
+
1034 _In_ int flags = match_default)
+
1035 {
+
1036 assert(text || start >= end);
+
1037 this->interval.end = start;
+
1038 for (auto i = this->m_collection.begin(); i != this->m_collection.end(); ++i) {
+
1039 if (!(*i)->match(text, this->interval.end, end, flags)) {
+
1040 for (++i; i != this->m_collection.end(); ++i)
+
1041 (*i)->invalidate();
+
1042 this->interval.start = (this->interval.end = start) + 1;
+
1043 return false;
+
1044 }
+
1045 this->interval.end = (*i)->interval.end;
+
1046 }
+
1047 this->interval.start = start;
+
1048 return true;
+
1049 }
+
1050 };
-
1043
- - -
1046#ifdef _UNICODE
-
1047 using tsequence = wsequence;
-
1048#else
-
1049 using tsequence = sequence;
-
1050#endif
- -
1052
-
1056 template <class T>
-
- -
1058 {
-
1059 protected:
-
1060 basic_branch(_In_ const std::locale& locale) :
-
1061 parser_collection<T>(locale),
-
1062 hit_offset((size_t)-1)
-
1063 {}
-
1064
-
1065 public:
- -
1067 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el = nullptr,
-
1068 _In_ size_t count = 0,
-
1069 _In_ const std::locale& locale = std::locale()) :
-
1070 parser_collection<T>(el, count, locale),
-
1071 hit_offset((size_t)-1)
-
1072 {}
-
1073
+
1051
+ + +
1054#ifdef _UNICODE
+
1055 using tsequence = wsequence;
+
1056#else
+
1057 using tsequence = sequence;
+
1058#endif
+ +
1060
+
1064 template <class T>
+
+ +
1066 {
+
1067 protected:
+
1068 basic_branch(_In_ const std::locale& locale) :
+
1069 parser_collection<T>(locale),
+
1070 hit_offset((size_t)-1)
+
1071 {}
+
1072
+
1073 public:
-
1075 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
-
1076 _In_ const std::locale& locale = std::locale()) :
-
1077 parser_collection<T>(std::move(collection), locale),
-
1078 hit_offset((size_t)-1)
-
1079 {}
-
1080
-
1081 virtual bool match(
-
1082 _In_reads_or_z_(end) const T* text,
-
1083 _In_ size_t start = 0,
-
1084 _In_ size_t end = (size_t)-1,
-
1085 _In_ int flags = match_default)
-
1086 {
-
1087 assert(text || start >= end);
-
1088 hit_offset = 0;
-
1089 for (auto i = this->m_collection.begin(); i != this->m_collection.end(); ++i, ++hit_offset) {
-
1090 if ((*i)->match(text, start, end, flags)) {
-
1091 this->interval = (*i)->interval;
-
1092 for (++i; i != this->m_collection.end(); ++i)
-
1093 (*i)->invalidate();
-
1094 return true;
-
1095 }
-
1096 }
-
1097 hit_offset = (size_t)-1;
-
1098 this->interval.start = (this->interval.end = start) + 1;
-
1099 return false;
-
1100 }
-
1101
-
1102 virtual void invalidate()
-
1103 {
-
1104 hit_offset = (size_t)-1;
- -
1106 }
-
1107
-
1108 public:
-
1109 size_t hit_offset;
-
1110 };
+
1075 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el = nullptr,
+
1076 _In_ size_t count = 0,
+
1077 _In_ const std::locale& locale = std::locale()) :
+
1078 parser_collection<T>(el, count, locale),
+
1079 hit_offset((size_t)-1)
+
1080 {}
+
1081
+ +
1083 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
+
1084 _In_ const std::locale& locale = std::locale()) :
+
1085 parser_collection<T>(std::move(collection), locale),
+
1086 hit_offset((size_t)-1)
+
1087 {}
+
1088
+
1089 virtual bool match(
+
1090 _In_reads_or_z_(end) const T* text,
+
1091 _In_ size_t start = 0,
+
1092 _In_ size_t end = (size_t)-1,
+
1093 _In_ int flags = match_default)
+
1094 {
+
1095 assert(text || start >= end);
+
1096 hit_offset = 0;
+
1097 for (auto i = this->m_collection.begin(); i != this->m_collection.end(); ++i, ++hit_offset) {
+
1098 if ((*i)->match(text, start, end, flags)) {
+
1099 this->interval = (*i)->interval;
+
1100 for (++i; i != this->m_collection.end(); ++i)
+
1101 (*i)->invalidate();
+
1102 return true;
+
1103 }
+
1104 }
+
1105 hit_offset = (size_t)-1;
+
1106 this->interval.start = (this->interval.end = start) + 1;
+
1107 return false;
+
1108 }
+
1109
+
1110 virtual void invalidate()
+
1111 {
+
1112 hit_offset = (size_t)-1;
+ +
1114 }
+
1115
+
1116 public:
+
1117 size_t hit_offset;
+
1118 };
-
1111
-
1112 using branch = basic_branch<char>;
- -
1114#ifdef _UNICODE
-
1115 using tbranch = wbranch;
-
1116#else
-
1117 using tbranch = branch;
-
1118#endif
- -
1120
-
1124 template <class T, class T_parser = basic_string<T>>
-
- -
1126 {
-
1127 public:
-
1128 inline basic_string_branch(
-
1129 _In_reads_(count) const T* str_z = nullptr,
-
1130 _In_ size_t count = 0,
-
1131 _In_ const std::locale& locale = std::locale()) :
-
1132 basic_branch<T>(locale)
-
1133 {
-
1134 build(str_z, count);
-
1135 }
-
1136
-
1137 inline basic_string_branch(_In_z_ const T* str, ...) :
-
1138 basic_branch<T>(std::locale())
-
1139 {
-
1140 va_list params;
-
1141 va_start(params, str);
-
1142 build(str, params);
-
1143 va_end(params);
-
1144 }
-
1145
-
1146 inline basic_string_branch(_In_ const std::locale& locale, _In_z_ const T* str, ...) :
-
1147 basic_branch<T>(locale)
-
1148 {
-
1149 va_list params;
-
1150 va_start(params, str);
-
1151 build(str, params);
-
1152 va_end(params);
-
1153 }
-
1154
-
1155 protected:
-
1156 void build(_In_reads_(count) const T* str_z, _In_ size_t count)
-
1157 {
-
1158 assert(str_z || !count);
-
1159 if (count) {
-
1160 size_t offset, n;
-
1161 for (
-
1162 offset = n = 0;
-
1163 offset < count && str_z[offset];
-
1164 offset += stdex::strnlen(str_z + offset, count - offset) + 1, ++n);
-
1165 this->m_collection.reserve(n);
-
1166 for (
-
1167 offset = 0;
-
1168 offset < count && str_z[offset];
-
1169 offset += stdex::strnlen(str_z + offset, count - offset) + 1)
-
1170 this->m_collection.push_back(std::move(std::make_shared<T_parser>(str_z + offset, count - offset, this->m_locale)));
-
1171 }
-
1172 }
-
1173
-
1174 void build(_In_z_ const T* str, _In_ va_list params)
-
1175 {
-
1176 const T* p;
-
1177 for (
-
1178 this->m_collection.push_back(std::move(std::make_shared<T_parser>(str, (size_t)-1, this->m_locale)));
-
1179 (p = va_arg(params, const T*)) != nullptr;
-
1180 this->m_collection.push_back(std::move(std::make_shared<T_parser>(p, (size_t)-1, this->m_locale))));
-
1181 }
-
1182 };
+
1119
+
1120 using branch = basic_branch<char>;
+ +
1122#ifdef _UNICODE
+
1123 using tbranch = wbranch;
+
1124#else
+
1125 using tbranch = branch;
+
1126#endif
+ +
1128
+
1132 template <class T, class T_parser = basic_string<T>>
+
+ +
1134 {
+
1135 public:
+
1136 inline basic_string_branch(
+
1137 _In_reads_(count) const T* str_z = nullptr,
+
1138 _In_ size_t count = 0,
+
1139 _In_ const std::locale& locale = std::locale()) :
+
1140 basic_branch<T>(locale)
+
1141 {
+
1142 build(str_z, count);
+
1143 }
+
1144
+
1145 inline basic_string_branch(_In_z_ const T* str, ...) :
+
1146 basic_branch<T>(std::locale())
+
1147 {
+
1148 va_list params;
+
1149 va_start(params, str);
+
1150 build(str, params);
+
1151 va_end(params);
+
1152 }
+
1153
+
1154 inline basic_string_branch(_In_ const std::locale& locale, _In_z_ const T* str, ...) :
+
1155 basic_branch<T>(locale)
+
1156 {
+
1157 va_list params;
+
1158 va_start(params, str);
+
1159 build(str, params);
+
1160 va_end(params);
+
1161 }
+
1162
+
1163 protected:
+
1164 void build(_In_reads_(count) const T* str_z, _In_ size_t count)
+
1165 {
+
1166 assert(str_z || !count);
+
1167 if (count) {
+
1168 size_t offset, n;
+
1169 for (
+
1170 offset = n = 0;
+
1171 offset < count && str_z[offset];
+
1172 offset += stdex::strnlen(str_z + offset, count - offset) + 1, ++n);
+
1173 this->m_collection.reserve(n);
+
1174 for (
+
1175 offset = 0;
+
1176 offset < count && str_z[offset];
+
1177 offset += stdex::strnlen(str_z + offset, count - offset) + 1)
+
1178 this->m_collection.push_back(std::move(std::make_shared<T_parser>(str_z + offset, count - offset, this->m_locale)));
+
1179 }
+
1180 }
+
1181
+
1182 void build(_In_z_ const T* str, _In_ va_list params)
+
1183 {
+
1184 const T* p;
+
1185 for (
+
1186 this->m_collection.push_back(std::move(std::make_shared<T_parser>(str, (size_t)-1, this->m_locale)));
+
1187 (p = va_arg(params, const T*)) != nullptr;
+
1188 this->m_collection.push_back(std::move(std::make_shared<T_parser>(p, (size_t)-1, this->m_locale))));
+
1189 }
+
1190 };
-
1183
- - -
1186#ifdef _UNICODE
- -
1188#else
- -
1190#endif
- -
1192
-
1196 template <class T>
-
- -
1198 {
-
1199 public:
- -
1201 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el = nullptr,
-
1202 _In_ size_t count = 0,
-
1203 _In_ const std::locale& locale = std::locale()) :
-
1204 parser_collection<T>(el, count, locale)
-
1205 {}
-
1206
- -
1208 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
-
1209 _In_ const std::locale& locale = std::locale()) :
-
1210 parser_collection<T>(std::move(collection), locale)
-
1211 {}
-
1212
-
1213 virtual bool match(
-
1214 _In_reads_or_z_(end) const T* text,
-
1215 _In_ size_t start = 0,
-
1216 _In_ size_t end = (size_t)-1,
-
1217 _In_ int flags = match_default)
-
1218 {
-
1219 assert(text || start >= end);
-
1220 for (auto& el: this->m_collection)
-
1221 el->invalidate();
-
1222 if (match_recursively(text, start, end, flags)) {
-
1223 this->interval.start = start;
-
1224 return true;
-
1225 }
-
1226 this->interval.start = (this->interval.end = start) + 1;
-
1227 return false;
-
1228 }
-
1229
-
1230 protected:
-
1231 bool match_recursively(
-
1232 _In_reads_or_z_(end) const T* text,
-
1233 _In_ size_t start = 0,
-
1234 _In_ size_t end = (size_t)-1,
-
1235 _In_ int flags = match_default)
-
1236 {
-
1237 bool all_matched = true;
-
1238 for (auto& el: this->m_collection) {
-
1239 if (!el->interval) {
-
1240 // Element was not matched in permutatuion yet.
-
1241 all_matched = false;
-
1242 if (el->match(text, start, end, flags)) {
-
1243 // Element matched for the first time.
-
1244 if (match_recursively(text, el->interval.end, end, flags)) {
-
1245 // Rest of the elements matched too.
-
1246 return true;
-
1247 }
-
1248 el->invalidate();
-
1249 }
-
1250 }
-
1251 }
-
1252 if (all_matched) {
-
1253 this->interval.end = start;
-
1254 return true;
-
1255 }
-
1256 return false;
-
1257 }
-
1258 };
+
1191
+ + +
1194#ifdef _UNICODE
+ +
1196#else
+ +
1198#endif
+ +
1200
+
1204 template <class T>
+
+ +
1206 {
+
1207 public:
+ +
1209 _In_count_(count) const std::shared_ptr<basic_parser<T>>* el = nullptr,
+
1210 _In_ size_t count = 0,
+
1211 _In_ const std::locale& locale = std::locale()) :
+
1212 parser_collection<T>(el, count, locale)
+
1213 {}
+
1214
+ +
1216 _Inout_ std::vector<std::shared_ptr<basic_parser<T>>>&& collection,
+
1217 _In_ const std::locale& locale = std::locale()) :
+
1218 parser_collection<T>(std::move(collection), locale)
+
1219 {}
+
1220
+
1221 virtual bool match(
+
1222 _In_reads_or_z_(end) const T* text,
+
1223 _In_ size_t start = 0,
+
1224 _In_ size_t end = (size_t)-1,
+
1225 _In_ int flags = match_default)
+
1226 {
+
1227 assert(text || start >= end);
+
1228 for (auto& el: this->m_collection)
+
1229 el->invalidate();
+
1230 if (match_recursively(text, start, end, flags)) {
+
1231 this->interval.start = start;
+
1232 return true;
+
1233 }
+
1234 this->interval.start = (this->interval.end = start) + 1;
+
1235 return false;
+
1236 }
+
1237
+
1238 protected:
+
1239 bool match_recursively(
+
1240 _In_reads_or_z_(end) const T* text,
+
1241 _In_ size_t start = 0,
+
1242 _In_ size_t end = (size_t)-1,
+
1243 _In_ int flags = match_default)
+
1244 {
+
1245 bool all_matched = true;
+
1246 for (auto& el: this->m_collection) {
+
1247 if (!el->interval) {
+
1248 // Element was not matched in permutatuion yet.
+
1249 all_matched = false;
+
1250 if (el->match(text, start, end, flags)) {
+
1251 // Element matched for the first time.
+
1252 if (match_recursively(text, el->interval.end, end, flags)) {
+
1253 // Rest of the elements matched too.
+
1254 return true;
+
1255 }
+
1256 el->invalidate();
+
1257 }
+
1258 }
+
1259 }
+
1260 if (all_matched) {
+
1261 this->interval.end = start;
+
1262 return true;
+
1263 }
+
1264 return false;
+
1265 }
+
1266 };
-
1259
- - -
1262#ifdef _UNICODE
-
1263 using tpermutation = wpermutation;
-
1264#else
-
1265 using tpermutation = permutation;
-
1266#endif
- -
1268
-
1272 template <class T>
-
-
1273 class basic_integer : public basic_parser<T>
-
1274 {
-
1275 public:
-
1276 basic_integer(_In_ const std::locale& locale = std::locale()) :
-
1277 basic_parser<T>(locale),
-
1278 value(0)
-
1279 {}
-
1280
-
1281 virtual void invalidate()
-
1282 {
-
1283 value = 0;
- -
1285 }
-
1286
-
1287 public:
-
1288 size_t value;
-
1289 };
+
1267
+ + +
1270#ifdef _UNICODE
+
1271 using tpermutation = wpermutation;
+
1272#else
+
1273 using tpermutation = permutation;
+
1274#endif
+ +
1276
+
1280 template <class T>
+
+
1281 class basic_integer : public basic_parser<T>
+
1282 {
+
1283 public:
+
1284 basic_integer(_In_ const std::locale& locale = std::locale()) :
+
1285 basic_parser<T>(locale),
+
1286 value(0)
+
1287 {}
+
1288
+
1289 virtual void invalidate()
+
1290 {
+
1291 value = 0;
+ +
1293 }
+
1294
+
1295 public:
+
1296 size_t value;
+
1297 };
-
1290
-
1294 template <class T>
-
- -
1296 {
-
1297 public:
- -
1299 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
-
1300 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
-
1301 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
-
1302 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
-
1303 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
-
1304 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
-
1305 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
-
1306 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
-
1307 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
-
1308 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
-
1309 _In_ const std::locale& locale = std::locale()) :
-
1310 basic_integer<T>(locale),
-
1311 m_digit_0(digit_0),
-
1312 m_digit_1(digit_1),
-
1313 m_digit_2(digit_2),
-
1314 m_digit_3(digit_3),
-
1315 m_digit_4(digit_4),
-
1316 m_digit_5(digit_5),
-
1317 m_digit_6(digit_6),
-
1318 m_digit_7(digit_7),
-
1319 m_digit_8(digit_8),
-
1320 m_digit_9(digit_9)
-
1321 {}
-
1322
-
1323 virtual bool match(
-
1324 _In_reads_or_z_(end) const T* text,
-
1325 _In_ size_t start = 0,
-
1326 _In_ size_t end = (size_t)-1,
-
1327 _In_ int flags = match_default)
-
1328 {
-
1329 assert(text || start >= end);
-
1330 for (this->interval.end = start, this->value = 0; this->interval.end < end && text[this->interval.end];) {
-
1331 size_t dig;
-
1332 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; this->interval.end = m_digit_0->interval.end; }
-
1333 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; this->interval.end = m_digit_1->interval.end; }
-
1334 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; this->interval.end = m_digit_2->interval.end; }
-
1335 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; this->interval.end = m_digit_3->interval.end; }
-
1336 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; this->interval.end = m_digit_4->interval.end; }
-
1337 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; this->interval.end = m_digit_5->interval.end; }
-
1338 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; this->interval.end = m_digit_6->interval.end; }
-
1339 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; this->interval.end = m_digit_7->interval.end; }
-
1340 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; this->interval.end = m_digit_8->interval.end; }
-
1341 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; this->interval.end = m_digit_9->interval.end; }
-
1342 else break;
-
1343 this->value = this->value * 10 + dig;
-
1344 }
- -
1346 this->interval.start = start;
-
1347 return true;
-
1348 }
-
1349 this->interval.start = (this->interval.end = start) + 1;
-
1350 return false;
-
1351 }
-
1352
-
1353 protected:
-
1354 std::shared_ptr<basic_parser<T>>
-
1355 m_digit_0,
-
1356 m_digit_1,
-
1357 m_digit_2,
-
1358 m_digit_3,
-
1359 m_digit_4,
-
1360 m_digit_5,
-
1361 m_digit_6,
-
1362 m_digit_7,
-
1363 m_digit_8,
-
1364 m_digit_9;
-
1365 };
+
1298
+
1302 template <class T>
+
+ +
1304 {
+
1305 public:
+ +
1307 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
+
1308 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
+
1309 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
+
1310 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
+
1311 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
+
1312 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
+
1313 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
+
1314 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
+
1315 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
+
1316 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
+
1317 _In_ const std::locale& locale = std::locale()) :
+
1318 basic_integer<T>(locale),
+
1319 m_digit_0(digit_0),
+
1320 m_digit_1(digit_1),
+
1321 m_digit_2(digit_2),
+
1322 m_digit_3(digit_3),
+
1323 m_digit_4(digit_4),
+
1324 m_digit_5(digit_5),
+
1325 m_digit_6(digit_6),
+
1326 m_digit_7(digit_7),
+
1327 m_digit_8(digit_8),
+
1328 m_digit_9(digit_9)
+
1329 {}
+
1330
+
1331 virtual bool match(
+
1332 _In_reads_or_z_(end) const T* text,
+
1333 _In_ size_t start = 0,
+
1334 _In_ size_t end = (size_t)-1,
+
1335 _In_ int flags = match_default)
+
1336 {
+
1337 assert(text || start >= end);
+
1338 for (this->interval.end = start, this->value = 0; this->interval.end < end && text[this->interval.end];) {
+
1339 size_t dig;
+
1340 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; this->interval.end = m_digit_0->interval.end; }
+
1341 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; this->interval.end = m_digit_1->interval.end; }
+
1342 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; this->interval.end = m_digit_2->interval.end; }
+
1343 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; this->interval.end = m_digit_3->interval.end; }
+
1344 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; this->interval.end = m_digit_4->interval.end; }
+
1345 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; this->interval.end = m_digit_5->interval.end; }
+
1346 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; this->interval.end = m_digit_6->interval.end; }
+
1347 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; this->interval.end = m_digit_7->interval.end; }
+
1348 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; this->interval.end = m_digit_8->interval.end; }
+
1349 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; this->interval.end = m_digit_9->interval.end; }
+
1350 else break;
+
1351 this->value = this->value * 10 + dig;
+
1352 }
+ +
1354 this->interval.start = start;
+
1355 return true;
+
1356 }
+
1357 this->interval.start = (this->interval.end = start) + 1;
+
1358 return false;
+
1359 }
+
1360
+
1361 protected:
+
1362 std::shared_ptr<basic_parser<T>>
+
1363 m_digit_0,
+
1364 m_digit_1,
+
1365 m_digit_2,
+
1366 m_digit_3,
+
1367 m_digit_4,
+
1368 m_digit_5,
+
1369 m_digit_6,
+
1370 m_digit_7,
+
1371 m_digit_8,
+
1372 m_digit_9;
+
1373 };
-
1366
- - -
1369#ifdef _UNICODE
-
1370 using tinteger10 = winteger10;
-
1371#else
-
1372 using tinteger10 = integer10;
-
1373#endif
- -
1375
-
1379 template <class T>
-
- -
1381 {
-
1382 public:
- -
1384 _In_ const std::shared_ptr<basic_integer10<T>>& digits,
-
1385 _In_ const std::shared_ptr<basic_set<T>>& separator,
-
1386 _In_ const std::locale& locale = std::locale()) :
-
1387 basic_integer<T>(locale),
-
1388 digit_count(0),
-
1389 has_separators(false),
-
1390 m_digits(digits),
-
1391 m_separator(separator)
-
1392 {}
-
1393
-
1394 virtual bool match(
-
1395 _In_reads_or_z_(end) const T* text,
-
1396 _In_ size_t start = 0,
-
1397 _In_ size_t end = (size_t)-1,
-
1398 _In_ int flags = match_default)
-
1399 {
-
1400 assert(text || start >= end);
-
1401 if (m_digits->match(text, start, end, flags)) {
-
1402 // Leading part match.
-
1403 this->value = m_digits->value;
-
1404 digit_count = m_digits->interval.size();
-
1405 has_separators = false;
-
1406 this->interval.start = start;
-
1407 this->interval.end = m_digits->interval.end;
-
1408 if (m_digits->interval.size() <= 3) {
-
1409 // Maybe separated with thousand separators?
-
1410 size_t hit_offset = (size_t)-1;
-
1411 while (m_separator->match(text, this->interval.end, end, flags) &&
-
1412 (hit_offset == (size_t)-1 || hit_offset == m_separator->hit_offset) && // All separators must be the same, no mixing.
-
1413 m_digits->match(text, m_separator->interval.end, end, flags) &&
-
1414 m_digits->interval.size() == 3)
-
1415 {
-
1416 // Thousand separator and three-digit integer followed.
-
1417 this->value = this->value * 1000 + m_digits->value;
-
1418 digit_count += 3;
-
1419 has_separators = true;
-
1420 this->interval.end = m_digits->interval.end;
-
1421 hit_offset = m_separator->hit_offset;
-
1422 }
-
1423 }
-
1424
-
1425 return true;
-
1426 }
-
1427 this->value = 0;
-
1428 this->interval.start = (this->interval.end = start) + 1;
-
1429 return false;
-
1430 }
-
1431
-
1432 virtual void invalidate()
-
1433 {
-
1434 digit_count = 0;
-
1435 has_separators = false;
- -
1437 }
-
1438
-
1439 public:
- - -
1442
-
1443 protected:
-
1444 std::shared_ptr<basic_integer10<T>> m_digits;
-
1445 std::shared_ptr<basic_set<T>> m_separator;
-
1446 };
+
1374
+ + +
1377#ifdef _UNICODE
+
1378 using tinteger10 = winteger10;
+
1379#else
+
1380 using tinteger10 = integer10;
+
1381#endif
+ +
1383
+
1387 template <class T>
+
+ +
1389 {
+
1390 public:
+ +
1392 _In_ const std::shared_ptr<basic_integer10<T>>& digits,
+
1393 _In_ const std::shared_ptr<basic_set<T>>& separator,
+
1394 _In_ const std::locale& locale = std::locale()) :
+
1395 basic_integer<T>(locale),
+
1396 digit_count(0),
+
1397 has_separators(false),
+
1398 m_digits(digits),
+
1399 m_separator(separator)
+
1400 {}
+
1401
+
1402 virtual bool match(
+
1403 _In_reads_or_z_(end) const T* text,
+
1404 _In_ size_t start = 0,
+
1405 _In_ size_t end = (size_t)-1,
+
1406 _In_ int flags = match_default)
+
1407 {
+
1408 assert(text || start >= end);
+
1409 if (m_digits->match(text, start, end, flags)) {
+
1410 // Leading part match.
+
1411 this->value = m_digits->value;
+
1412 digit_count = m_digits->interval.size();
+
1413 has_separators = false;
+
1414 this->interval.start = start;
+
1415 this->interval.end = m_digits->interval.end;
+
1416 if (m_digits->interval.size() <= 3) {
+
1417 // Maybe separated with thousand separators?
+
1418 size_t hit_offset = (size_t)-1;
+
1419 while (m_separator->match(text, this->interval.end, end, flags) &&
+
1420 (hit_offset == (size_t)-1 || hit_offset == m_separator->hit_offset) && // All separators must be the same, no mixing.
+
1421 m_digits->match(text, m_separator->interval.end, end, flags) &&
+
1422 m_digits->interval.size() == 3)
+
1423 {
+
1424 // Thousand separator and three-digit integer followed.
+
1425 this->value = this->value * 1000 + m_digits->value;
+
1426 digit_count += 3;
+
1427 has_separators = true;
+
1428 this->interval.end = m_digits->interval.end;
+
1429 hit_offset = m_separator->hit_offset;
+
1430 }
+
1431 }
+
1432
+
1433 return true;
+
1434 }
+
1435 this->value = 0;
+
1436 this->interval.start = (this->interval.end = start) + 1;
+
1437 return false;
+
1438 }
+
1439
+
1440 virtual void invalidate()
+
1441 {
+
1442 digit_count = 0;
+
1443 has_separators = false;
+ +
1445 }
+
1446
+
1447 public:
+ + +
1450
+
1451 protected:
+
1452 std::shared_ptr<basic_integer10<T>> m_digits;
+
1453 std::shared_ptr<basic_set<T>> m_separator;
+
1454 };
-
1447
- - -
1450#ifdef _UNICODE
-
1451 using tinteger10ts = winteger10ts;
-
1452#else
-
1453 using tinteger10ts = integer10ts;
-
1454#endif
- -
1456
-
1460 template <class T>
-
- -
1462 {
-
1463 public:
- -
1465 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
-
1466 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
-
1467 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
-
1468 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
-
1469 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
-
1470 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
-
1471 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
-
1472 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
-
1473 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
-
1474 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
-
1475 _In_ const std::shared_ptr<basic_parser<T>>& digit_10,
-
1476 _In_ const std::shared_ptr<basic_parser<T>>& digit_11,
-
1477 _In_ const std::shared_ptr<basic_parser<T>>& digit_12,
-
1478 _In_ const std::shared_ptr<basic_parser<T>>& digit_13,
-
1479 _In_ const std::shared_ptr<basic_parser<T>>& digit_14,
-
1480 _In_ const std::shared_ptr<basic_parser<T>>& digit_15,
-
1481 _In_ const std::locale& locale = std::locale()) :
-
1482 basic_integer<T>(locale),
-
1483 m_digit_0(digit_0),
-
1484 m_digit_1(digit_1),
-
1485 m_digit_2(digit_2),
-
1486 m_digit_3(digit_3),
-
1487 m_digit_4(digit_4),
-
1488 m_digit_5(digit_5),
-
1489 m_digit_6(digit_6),
-
1490 m_digit_7(digit_7),
-
1491 m_digit_8(digit_8),
-
1492 m_digit_9(digit_9),
-
1493 m_digit_10(digit_10),
-
1494 m_digit_11(digit_11),
-
1495 m_digit_12(digit_12),
-
1496 m_digit_13(digit_13),
-
1497 m_digit_14(digit_14),
-
1498 m_digit_15(digit_15)
-
1499 {}
-
1500
-
1501 virtual bool match(
-
1502 _In_reads_or_z_(end) const T* text,
-
1503 _In_ size_t start = 0,
-
1504 _In_ size_t end = (size_t)-1,
-
1505 _In_ int flags = match_default)
-
1506 {
-
1507 assert(text || start >= end);
-
1508 for (this->interval.end = start, this->value = 0; this->interval.end < end && text[this->interval.end];) {
-
1509 size_t dig;
-
1510 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; this->interval.end = m_digit_0->interval.end; }
-
1511 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; this->interval.end = m_digit_1->interval.end; }
-
1512 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; this->interval.end = m_digit_2->interval.end; }
-
1513 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; this->interval.end = m_digit_3->interval.end; }
-
1514 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; this->interval.end = m_digit_4->interval.end; }
-
1515 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; this->interval.end = m_digit_5->interval.end; }
-
1516 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; this->interval.end = m_digit_6->interval.end; }
-
1517 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; this->interval.end = m_digit_7->interval.end; }
-
1518 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; this->interval.end = m_digit_8->interval.end; }
-
1519 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; this->interval.end = m_digit_9->interval.end; }
-
1520 else if (m_digit_10->match(text, this->interval.end, end, flags)) { dig = 10; this->interval.end = m_digit_10->interval.end; }
-
1521 else if (m_digit_11->match(text, this->interval.end, end, flags)) { dig = 11; this->interval.end = m_digit_11->interval.end; }
-
1522 else if (m_digit_12->match(text, this->interval.end, end, flags)) { dig = 12; this->interval.end = m_digit_12->interval.end; }
-
1523 else if (m_digit_13->match(text, this->interval.end, end, flags)) { dig = 13; this->interval.end = m_digit_13->interval.end; }
-
1524 else if (m_digit_14->match(text, this->interval.end, end, flags)) { dig = 14; this->interval.end = m_digit_14->interval.end; }
-
1525 else if (m_digit_15->match(text, this->interval.end, end, flags)) { dig = 15; this->interval.end = m_digit_15->interval.end; }
-
1526 else break;
-
1527 this->value = this->value * 16 + dig;
-
1528 }
- -
1530 this->interval.start = start;
-
1531 return true;
-
1532 }
-
1533 this->interval.start = (this->interval.end = start) + 1;
-
1534 return false;
-
1535 }
-
1536
-
1537 protected:
-
1538 std::shared_ptr<basic_parser<T>>
-
1539 m_digit_0,
-
1540 m_digit_1,
-
1541 m_digit_2,
-
1542 m_digit_3,
-
1543 m_digit_4,
-
1544 m_digit_5,
-
1545 m_digit_6,
-
1546 m_digit_7,
-
1547 m_digit_8,
-
1548 m_digit_9,
-
1549 m_digit_10,
-
1550 m_digit_11,
-
1551 m_digit_12,
-
1552 m_digit_13,
-
1553 m_digit_14,
-
1554 m_digit_15;
-
1555 };
+
1455
+ + +
1458#ifdef _UNICODE
+
1459 using tinteger10ts = winteger10ts;
+
1460#else
+
1461 using tinteger10ts = integer10ts;
+
1462#endif
+ +
1464
+
1468 template <class T>
+
+ +
1470 {
+
1471 public:
+ +
1473 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
+
1474 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
+
1475 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
+
1476 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
+
1477 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
+
1478 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
+
1479 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
+
1480 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
+
1481 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
+
1482 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
+
1483 _In_ const std::shared_ptr<basic_parser<T>>& digit_10,
+
1484 _In_ const std::shared_ptr<basic_parser<T>>& digit_11,
+
1485 _In_ const std::shared_ptr<basic_parser<T>>& digit_12,
+
1486 _In_ const std::shared_ptr<basic_parser<T>>& digit_13,
+
1487 _In_ const std::shared_ptr<basic_parser<T>>& digit_14,
+
1488 _In_ const std::shared_ptr<basic_parser<T>>& digit_15,
+
1489 _In_ const std::locale& locale = std::locale()) :
+
1490 basic_integer<T>(locale),
+
1491 m_digit_0(digit_0),
+
1492 m_digit_1(digit_1),
+
1493 m_digit_2(digit_2),
+
1494 m_digit_3(digit_3),
+
1495 m_digit_4(digit_4),
+
1496 m_digit_5(digit_5),
+
1497 m_digit_6(digit_6),
+
1498 m_digit_7(digit_7),
+
1499 m_digit_8(digit_8),
+
1500 m_digit_9(digit_9),
+
1501 m_digit_10(digit_10),
+
1502 m_digit_11(digit_11),
+
1503 m_digit_12(digit_12),
+
1504 m_digit_13(digit_13),
+
1505 m_digit_14(digit_14),
+
1506 m_digit_15(digit_15)
+
1507 {}
+
1508
+
1509 virtual bool match(
+
1510 _In_reads_or_z_(end) const T* text,
+
1511 _In_ size_t start = 0,
+
1512 _In_ size_t end = (size_t)-1,
+
1513 _In_ int flags = match_default)
+
1514 {
+
1515 assert(text || start >= end);
+
1516 for (this->interval.end = start, this->value = 0; this->interval.end < end && text[this->interval.end];) {
+
1517 size_t dig;
+
1518 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; this->interval.end = m_digit_0->interval.end; }
+
1519 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; this->interval.end = m_digit_1->interval.end; }
+
1520 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; this->interval.end = m_digit_2->interval.end; }
+
1521 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; this->interval.end = m_digit_3->interval.end; }
+
1522 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; this->interval.end = m_digit_4->interval.end; }
+
1523 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; this->interval.end = m_digit_5->interval.end; }
+
1524 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; this->interval.end = m_digit_6->interval.end; }
+
1525 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; this->interval.end = m_digit_7->interval.end; }
+
1526 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; this->interval.end = m_digit_8->interval.end; }
+
1527 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; this->interval.end = m_digit_9->interval.end; }
+
1528 else if (m_digit_10->match(text, this->interval.end, end, flags)) { dig = 10; this->interval.end = m_digit_10->interval.end; }
+
1529 else if (m_digit_11->match(text, this->interval.end, end, flags)) { dig = 11; this->interval.end = m_digit_11->interval.end; }
+
1530 else if (m_digit_12->match(text, this->interval.end, end, flags)) { dig = 12; this->interval.end = m_digit_12->interval.end; }
+
1531 else if (m_digit_13->match(text, this->interval.end, end, flags)) { dig = 13; this->interval.end = m_digit_13->interval.end; }
+
1532 else if (m_digit_14->match(text, this->interval.end, end, flags)) { dig = 14; this->interval.end = m_digit_14->interval.end; }
+
1533 else if (m_digit_15->match(text, this->interval.end, end, flags)) { dig = 15; this->interval.end = m_digit_15->interval.end; }
+
1534 else break;
+
1535 this->value = this->value * 16 + dig;
+
1536 }
+ +
1538 this->interval.start = start;
+
1539 return true;
+
1540 }
+
1541 this->interval.start = (this->interval.end = start) + 1;
+
1542 return false;
+
1543 }
+
1544
+
1545 protected:
+
1546 std::shared_ptr<basic_parser<T>>
+
1547 m_digit_0,
+
1548 m_digit_1,
+
1549 m_digit_2,
+
1550 m_digit_3,
+
1551 m_digit_4,
+
1552 m_digit_5,
+
1553 m_digit_6,
+
1554 m_digit_7,
+
1555 m_digit_8,
+
1556 m_digit_9,
+
1557 m_digit_10,
+
1558 m_digit_11,
+
1559 m_digit_12,
+
1560 m_digit_13,
+
1561 m_digit_14,
+
1562 m_digit_15;
+
1563 };
-
1556
- - -
1559#ifdef _UNICODE
-
1560 using tinteger16 = winteger16;
-
1561#else
-
1562 using tinteger16 = integer16;
-
1563#endif
- -
1565
-
1569 template <class T>
-
- -
1571 {
-
1572 public:
- -
1574 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
-
1575 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
-
1576 _In_ const std::shared_ptr<basic_parser<T>>& digit_10,
-
1577 _In_ const std::shared_ptr<basic_parser<T>>& digit_50,
-
1578 _In_ const std::shared_ptr<basic_parser<T>>& digit_100,
-
1579 _In_ const std::shared_ptr<basic_parser<T>>& digit_500,
-
1580 _In_ const std::shared_ptr<basic_parser<T>>& digit_1000,
-
1581 _In_ const std::shared_ptr<basic_parser<T>>& digit_5000,
-
1582 _In_ const std::shared_ptr<basic_parser<T>>& digit_10000,
-
1583 _In_ const std::locale& locale = std::locale()) :
-
1584 basic_integer<T>(locale),
-
1585 m_digit_1(digit_1),
-
1586 m_digit_5(digit_5),
-
1587 m_digit_10(digit_10),
-
1588 m_digit_50(digit_50),
-
1589 m_digit_100(digit_100),
-
1590 m_digit_500(digit_500),
-
1591 m_digit_1000(digit_1000),
-
1592 m_digit_5000(digit_5000),
-
1593 m_digit_10000(digit_10000)
-
1594 {}
-
1595
-
1596 virtual bool match(
-
1597 _In_reads_or_z_(end) const T* text,
-
1598 _In_ size_t start = 0,
-
1599 _In_ size_t end = (size_t)-1,
-
1600 _In_ int flags = match_default)
-
1601 {
-
1602 assert(text || start >= end);
-
1603 size_t
-
1604 dig[5] = { (size_t)-1, (size_t)-1, (size_t)-1, (size_t)-1, (size_t)-1 },
-
1605 end2;
-
1606
-
1607 for (this->interval.end = start, this->value = 0; this->interval.end < end && text[this->interval.end]; dig[3] = dig[2], dig[2] = dig[1], dig[1] = dig[0], this->interval.end = end2) {
-
1608 if (m_digit_1 && m_digit_1->match(text, this->interval.end, end, flags)) { dig[0] = 1; end2 = m_digit_1->interval.end; }
-
1609 else if (m_digit_5 && m_digit_5->match(text, this->interval.end, end, flags)) { dig[0] = 5; end2 = m_digit_5->interval.end; }
-
1610 else if (m_digit_10 && m_digit_10->match(text, this->interval.end, end, flags)) { dig[0] = 10; end2 = m_digit_10->interval.end; }
-
1611 else if (m_digit_50 && m_digit_50->match(text, this->interval.end, end, flags)) { dig[0] = 50; end2 = m_digit_50->interval.end; }
-
1612 else if (m_digit_100 && m_digit_100->match(text, this->interval.end, end, flags)) { dig[0] = 100; end2 = m_digit_100->interval.end; }
-
1613 else if (m_digit_500 && m_digit_500->match(text, this->interval.end, end, flags)) { dig[0] = 500; end2 = m_digit_500->interval.end; }
-
1614 else if (m_digit_1000 && m_digit_1000->match(text, this->interval.end, end, flags)) { dig[0] = 1000; end2 = m_digit_1000->interval.end; }
-
1615 else if (m_digit_5000 && m_digit_5000->match(text, this->interval.end, end, flags)) { dig[0] = 5000; end2 = m_digit_5000->interval.end; }
-
1616 else if (m_digit_10000 && m_digit_10000->match(text, this->interval.end, end, flags)) { dig[0] = 10000; end2 = m_digit_10000->interval.end; }
-
1617 else break;
-
1618
-
1619 // Store first digit.
-
1620 if (dig[4] == (size_t)-1) dig[4] = dig[0];
-
1621
-
1622 if (dig[3] == dig[2] && dig[2] == dig[1] && dig[1] == dig[0] && dig[0] != dig[4]) {
-
1623 // Same digit repeated four times. No-go, unless first digit. E.g. XIIII vs. XIV. MMMMMCD allowed, IIII also...
-
1624 break;
-
1625 }
-
1626 if (dig[0] <= dig[1]) {
-
1627 // Digit is less or equal previous one: add.
-
1628 this->value += dig[0];
-
1629 }
-
1630 else if (
-
1631 (dig[1] == 1 && (dig[0] == 5 || dig[0] == 10)) ||
-
1632 (dig[1] == 10 && (dig[0] == 50 || dig[0] == 100)) ||
-
1633 (dig[1] == 100 && (dig[0] == 500 || dig[0] == 1000)) ||
-
1634 (dig[1] == 1000 && (dig[0] == 5000 || dig[0] == 10000)))
-
1635 {
-
1636 // Digit is up to two orders bigger than previous one: subtract. But...
-
1637 if (dig[2] < dig[0]) {
-
1638 // Digit is also bigger than pre-previous one. E.g. VIX (V < X => invalid)
-
1639 break;
-
1640 }
-
1641 this->value -= dig[1]; // Cancel addition in the previous step.
-
1642 dig[0] -= dig[1]; // Combine last two digits.
-
1643 dig[1] = dig[2]; // The true previous digit is now pre-previous one. :)
-
1644 dig[2] = dig[3]; // The true pre-previous digit is now pre-pre-previous one. :)
-
1645 this->value += dig[0]; // Add combined value.
-
1646 }
-
1647 else {
-
1648 // New digit is too big than the previous one. E.g. VX (V < X => invalid)
-
1649 break;
-
1650 }
-
1651 }
-
1652 if (this->value) {
-
1653 this->interval.start = start;
-
1654 return true;
-
1655 }
-
1656 this->interval.start = (this->interval.end = start) + 1;
-
1657 return false;
-
1658 }
-
1659
-
1660 protected:
-
1661 std::shared_ptr<basic_parser<T>>
-
1662 m_digit_1,
-
1663 m_digit_5,
-
1664 m_digit_10,
-
1665 m_digit_50,
-
1666 m_digit_100,
-
1667 m_digit_500,
-
1668 m_digit_1000,
-
1669 m_digit_5000,
-
1670 m_digit_10000;
-
1671 };
+
1564
+ + +
1567#ifdef _UNICODE
+
1568 using tinteger16 = winteger16;
+
1569#else
+
1570 using tinteger16 = integer16;
+
1571#endif
+ +
1573
+
1577 template <class T>
+
+ +
1579 {
+
1580 public:
+ +
1582 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
+
1583 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
+
1584 _In_ const std::shared_ptr<basic_parser<T>>& digit_10,
+
1585 _In_ const std::shared_ptr<basic_parser<T>>& digit_50,
+
1586 _In_ const std::shared_ptr<basic_parser<T>>& digit_100,
+
1587 _In_ const std::shared_ptr<basic_parser<T>>& digit_500,
+
1588 _In_ const std::shared_ptr<basic_parser<T>>& digit_1000,
+
1589 _In_ const std::shared_ptr<basic_parser<T>>& digit_5000,
+
1590 _In_ const std::shared_ptr<basic_parser<T>>& digit_10000,
+
1591 _In_ const std::locale& locale = std::locale()) :
+
1592 basic_integer<T>(locale),
+
1593 m_digit_1(digit_1),
+
1594 m_digit_5(digit_5),
+
1595 m_digit_10(digit_10),
+
1596 m_digit_50(digit_50),
+
1597 m_digit_100(digit_100),
+
1598 m_digit_500(digit_500),
+
1599 m_digit_1000(digit_1000),
+
1600 m_digit_5000(digit_5000),
+
1601 m_digit_10000(digit_10000)
+
1602 {}
+
1603
+
1604 virtual bool match(
+
1605 _In_reads_or_z_(end) const T* text,
+
1606 _In_ size_t start = 0,
+
1607 _In_ size_t end = (size_t)-1,
+
1608 _In_ int flags = match_default)
+
1609 {
+
1610 assert(text || start >= end);
+
1611 size_t
+
1612 dig[5] = { (size_t)-1, (size_t)-1, (size_t)-1, (size_t)-1, (size_t)-1 },
+
1613 end2;
+
1614
+
1615 for (this->interval.end = start, this->value = 0; this->interval.end < end && text[this->interval.end]; dig[3] = dig[2], dig[2] = dig[1], dig[1] = dig[0], this->interval.end = end2) {
+
1616 if (m_digit_1 && m_digit_1->match(text, this->interval.end, end, flags)) { dig[0] = 1; end2 = m_digit_1->interval.end; }
+
1617 else if (m_digit_5 && m_digit_5->match(text, this->interval.end, end, flags)) { dig[0] = 5; end2 = m_digit_5->interval.end; }
+
1618 else if (m_digit_10 && m_digit_10->match(text, this->interval.end, end, flags)) { dig[0] = 10; end2 = m_digit_10->interval.end; }
+
1619 else if (m_digit_50 && m_digit_50->match(text, this->interval.end, end, flags)) { dig[0] = 50; end2 = m_digit_50->interval.end; }
+
1620 else if (m_digit_100 && m_digit_100->match(text, this->interval.end, end, flags)) { dig[0] = 100; end2 = m_digit_100->interval.end; }
+
1621 else if (m_digit_500 && m_digit_500->match(text, this->interval.end, end, flags)) { dig[0] = 500; end2 = m_digit_500->interval.end; }
+
1622 else if (m_digit_1000 && m_digit_1000->match(text, this->interval.end, end, flags)) { dig[0] = 1000; end2 = m_digit_1000->interval.end; }
+
1623 else if (m_digit_5000 && m_digit_5000->match(text, this->interval.end, end, flags)) { dig[0] = 5000; end2 = m_digit_5000->interval.end; }
+
1624 else if (m_digit_10000 && m_digit_10000->match(text, this->interval.end, end, flags)) { dig[0] = 10000; end2 = m_digit_10000->interval.end; }
+
1625 else break;
+
1626
+
1627 // Store first digit.
+
1628 if (dig[4] == (size_t)-1) dig[4] = dig[0];
+
1629
+
1630 if (dig[3] == dig[2] && dig[2] == dig[1] && dig[1] == dig[0] && dig[0] != dig[4]) {
+
1631 // Same digit repeated four times. No-go, unless first digit. E.g. XIIII vs. XIV. MMMMMCD allowed, IIII also...
+
1632 break;
+
1633 }
+
1634 if (dig[0] <= dig[1]) {
+
1635 // Digit is less or equal previous one: add.
+
1636 this->value += dig[0];
+
1637 }
+
1638 else if (
+
1639 (dig[1] == 1 && (dig[0] == 5 || dig[0] == 10)) ||
+
1640 (dig[1] == 10 && (dig[0] == 50 || dig[0] == 100)) ||
+
1641 (dig[1] == 100 && (dig[0] == 500 || dig[0] == 1000)) ||
+
1642 (dig[1] == 1000 && (dig[0] == 5000 || dig[0] == 10000)))
+
1643 {
+
1644 // Digit is up to two orders bigger than previous one: subtract. But...
+
1645 if (dig[2] < dig[0]) {
+
1646 // Digit is also bigger than pre-previous one. E.g. VIX (V < X => invalid)
+
1647 break;
+
1648 }
+
1649 this->value -= dig[1]; // Cancel addition in the previous step.
+
1650 dig[0] -= dig[1]; // Combine last two digits.
+
1651 dig[1] = dig[2]; // The true previous digit is now pre-previous one. :)
+
1652 dig[2] = dig[3]; // The true pre-previous digit is now pre-pre-previous one. :)
+
1653 this->value += dig[0]; // Add combined value.
+
1654 }
+
1655 else {
+
1656 // New digit is too big than the previous one. E.g. VX (V < X => invalid)
+
1657 break;
+
1658 }
+
1659 }
+
1660 if (this->value) {
+
1661 this->interval.start = start;
+
1662 return true;
+
1663 }
+
1664 this->interval.start = (this->interval.end = start) + 1;
+
1665 return false;
+
1666 }
+
1667
+
1668 protected:
+
1669 std::shared_ptr<basic_parser<T>>
+
1670 m_digit_1,
+
1671 m_digit_5,
+
1672 m_digit_10,
+
1673 m_digit_50,
+
1674 m_digit_100,
+
1675 m_digit_500,
+
1676 m_digit_1000,
+
1677 m_digit_5000,
+
1678 m_digit_10000;
+
1679 };
-
1672
- - -
1675#ifdef _UNICODE
- -
1677#else
- -
1679#endif
- -
1681
-
1685 template <class T>
-
- -
1687 {
-
1688 public:
- -
1690 _In_ const std::shared_ptr<basic_parser<T>>& _numerator,
-
1691 _In_ const std::shared_ptr<basic_parser<T>>& _fraction_line,
-
1692 _In_ const std::shared_ptr<basic_parser<T>>& _denominator,
-
1693 _In_ const std::locale& locale = std::locale()) :
-
1694 basic_parser<T>(locale),
-
1695 numerator(_numerator),
-
1696 fraction_line(_fraction_line),
-
1697 denominator(_denominator)
-
1698 {}
-
1699
-
1700 virtual bool match(
-
1701 _In_reads_or_z_(end) const T* text,
-
1702 _In_ size_t start = 0,
-
1703 _In_ size_t end = (size_t)-1,
-
1704 _In_ int flags = match_default)
-
1705 {
-
1706 assert(text || start >= end);
-
1707 if (numerator->match(text, start, end, flags) &&
-
1708 fraction_line->match(text, numerator->interval.end, end, flags) &&
-
1709 denominator->match(text, fraction_line->interval.end, end, flags))
-
1710 {
-
1711 this->interval.start = start;
-
1712 this->interval.end = denominator->interval.end;
-
1713 return true;
-
1714 }
-
1715 numerator->invalidate();
-
1716 fraction_line->invalidate();
-
1717 denominator->invalidate();
-
1718 this->interval.start = (this->interval.end = start) + 1;
-
1719 return false;
-
1720 }
-
1721
-
1722 virtual void invalidate()
-
1723 {
-
1724 numerator->invalidate();
-
1725 fraction_line->invalidate();
-
1726 denominator->invalidate();
- +
1680
+ + +
1683#ifdef _UNICODE
+ +
1685#else
+ +
1687#endif
+ +
1689
+
1693 template <class T>
+
+ +
1695 {
+
1696 public:
+ +
1698 _In_ const std::shared_ptr<basic_parser<T>>& _numerator,
+
1699 _In_ const std::shared_ptr<basic_parser<T>>& _fraction_line,
+
1700 _In_ const std::shared_ptr<basic_parser<T>>& _denominator,
+
1701 _In_ const std::locale& locale = std::locale()) :
+
1702 basic_parser<T>(locale),
+
1703 numerator(_numerator),
+
1704 fraction_line(_fraction_line),
+
1705 denominator(_denominator)
+
1706 {}
+
1707
+
1708 virtual bool match(
+
1709 _In_reads_or_z_(end) const T* text,
+
1710 _In_ size_t start = 0,
+
1711 _In_ size_t end = (size_t)-1,
+
1712 _In_ int flags = match_default)
+
1713 {
+
1714 assert(text || start >= end);
+
1715 if (numerator->match(text, start, end, flags) &&
+
1716 fraction_line->match(text, numerator->interval.end, end, flags) &&
+
1717 denominator->match(text, fraction_line->interval.end, end, flags))
+
1718 {
+
1719 this->interval.start = start;
+
1720 this->interval.end = denominator->interval.end;
+
1721 return true;
+
1722 }
+
1723 numerator->invalidate();
+
1724 fraction_line->invalidate();
+
1725 denominator->invalidate();
+
1726 this->interval.start = (this->interval.end = start) + 1;
+
1727 return false;
1728 }
1729
-
1730 public:
-
1731 std::shared_ptr<basic_parser<T>> numerator;
-
1732 std::shared_ptr<basic_parser<T>> fraction_line;
-
1733 std::shared_ptr<basic_parser<T>> denominator;
-
1734 };
+
1730 virtual void invalidate()
+
1731 {
+
1732 numerator->invalidate();
+
1733 fraction_line->invalidate();
+
1734 denominator->invalidate();
+ +
1736 }
+
1737
+
1738 public:
+
1739 std::shared_ptr<basic_parser<T>> numerator;
+
1740 std::shared_ptr<basic_parser<T>> fraction_line;
+
1741 std::shared_ptr<basic_parser<T>> denominator;
+
1742 };
-
1735
- - -
1738#ifdef _UNICODE
-
1739 using tfraction = wfraction;
-
1740#else
-
1741 using tfraction = fraction;
-
1742#endif
- -
1744
-
1748 template <class T>
-
-
1749 class basic_score : public basic_parser<T>
-
1750 {
-
1751 public:
- -
1753 _In_ const std::shared_ptr<basic_parser<T>>& _home,
-
1754 _In_ const std::shared_ptr<basic_parser<T>>& _separator,
-
1755 _In_ const std::shared_ptr<basic_parser<T>>& _guest,
-
1756 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
1757 _In_ const std::locale& locale = std::locale()) :
-
1758 basic_parser<T>(locale),
-
1759 home(_home),
-
1760 separator(_separator),
-
1761 guest(_guest),
-
1762 m_space(space)
-
1763 {}
-
1764
-
1765 virtual bool match(
-
1766 _In_reads_or_z_(end) const T* text,
-
1767 _In_ size_t start = 0,
-
1768 _In_ size_t end = (size_t)-1,
-
1769 _In_ int flags = match_default)
-
1770 {
-
1771 assert(text || start >= end);
-
1772 this->interval.end = start;
-
1773
-
1774 const int space_match_flags = flags & ~match_multiline; // Spaces in score must never be broken in new line.
-
1775
-
1776 if (home->match(text, this->interval.end, end, flags))
-
1777 this->interval.end = home->interval.end;
-
1778 else
-
1779 goto end;
-
1780
-
1781 for (; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
1782
-
1783 if (separator->match(text, this->interval.end, end, flags))
-
1784 this->interval.end = separator->interval.end;
-
1785 else
-
1786 goto end;
-
1787
-
1788 for (; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
1789
-
1790 if (guest->match(text, this->interval.end, end, flags))
-
1791 this->interval.end = guest->interval.end;
-
1792 else
-
1793 goto end;
-
1794
-
1795 this->interval.start = start;
-
1796 return true;
+
1743
+ + +
1746#ifdef _UNICODE
+
1747 using tfraction = wfraction;
+
1748#else
+
1749 using tfraction = fraction;
+
1750#endif
+ +
1752
+
1756 template <class T>
+
+
1757 class basic_score : public basic_parser<T>
+
1758 {
+
1759 public:
+ +
1761 _In_ const std::shared_ptr<basic_parser<T>>& _home,
+
1762 _In_ const std::shared_ptr<basic_parser<T>>& _separator,
+
1763 _In_ const std::shared_ptr<basic_parser<T>>& _guest,
+
1764 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
1765 _In_ const std::locale& locale = std::locale()) :
+
1766 basic_parser<T>(locale),
+
1767 home(_home),
+
1768 separator(_separator),
+
1769 guest(_guest),
+
1770 m_space(space)
+
1771 {}
+
1772
+
1773 virtual bool match(
+
1774 _In_reads_or_z_(end) const T* text,
+
1775 _In_ size_t start = 0,
+
1776 _In_ size_t end = (size_t)-1,
+
1777 _In_ int flags = match_default)
+
1778 {
+
1779 assert(text || start >= end);
+
1780 this->interval.end = start;
+
1781
+
1782 const int space_match_flags = flags & ~match_multiline; // Spaces in score must never be broken in new line.
+
1783
+
1784 if (home->match(text, this->interval.end, end, flags))
+
1785 this->interval.end = home->interval.end;
+
1786 else
+
1787 goto end;
+
1788
+
1789 for (; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
1790
+
1791 if (separator->match(text, this->interval.end, end, flags))
+
1792 this->interval.end = separator->interval.end;
+
1793 else
+
1794 goto end;
+
1795
+
1796 for (; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
1797
-
1798 end:
-
1799 home->invalidate();
-
1800 separator->invalidate();
-
1801 guest->invalidate();
-
1802 this->interval.start = (this->interval.end = start) + 1;
-
1803 return false;
-
1804 }
+
1798 if (guest->match(text, this->interval.end, end, flags))
+
1799 this->interval.end = guest->interval.end;
+
1800 else
+
1801 goto end;
+
1802
+
1803 this->interval.start = start;
+
1804 return true;
1805
-
1806 virtual void invalidate()
-
1807 {
-
1808 home->invalidate();
-
1809 separator->invalidate();
-
1810 guest->invalidate();
- +
1806 end:
+
1807 home->invalidate();
+
1808 separator->invalidate();
+
1809 guest->invalidate();
+
1810 this->interval.start = (this->interval.end = start) + 1;
+
1811 return false;
1812 }
1813
-
1814 public:
-
1815 std::shared_ptr<basic_parser<T>> home;
-
1816 std::shared_ptr<basic_parser<T>> separator;
-
1817 std::shared_ptr<basic_parser<T>> guest;
-
1818
-
1819 protected:
-
1820 std::shared_ptr<basic_parser<T>> m_space;
-
1821 };
+
1814 virtual void invalidate()
+
1815 {
+
1816 home->invalidate();
+
1817 separator->invalidate();
+
1818 guest->invalidate();
+ +
1820 }
+
1821
+
1822 public:
+
1823 std::shared_ptr<basic_parser<T>> home;
+
1824 std::shared_ptr<basic_parser<T>> separator;
+
1825 std::shared_ptr<basic_parser<T>> guest;
+
1826
+
1827 protected:
+
1828 std::shared_ptr<basic_parser<T>> m_space;
+
1829 };
-
1822
-
1823 using score = basic_score<char>;
- -
1825#ifdef _UNICODE
-
1826 using tscore = wscore;
-
1827#else
-
1828 using tscore = score;
-
1829#endif
- -
1831
-
1835 template <class T>
-
- -
1837 {
-
1838 public:
- -
1840 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
-
1841 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
-
1842 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
-
1843 _In_ const std::shared_ptr<basic_parser<T>>& _number,
-
1844 _In_ const std::locale& locale = std::locale()) :
-
1845 basic_parser<T>(locale),
- - - - -
1850 {}
-
1851
-
1852 virtual bool match(
-
1853 _In_reads_or_z_(end) const T* text,
-
1854 _In_ size_t start = 0,
-
1855 _In_ size_t end = (size_t)-1,
-
1856 _In_ int flags = match_default)
-
1857 {
-
1858 assert(text || start >= end);
-
1859 this->interval.end = start;
-
1860 if (positive_sign && positive_sign->match(text, this->interval.end, end, flags)) {
-
1861 this->interval.end = positive_sign->interval.end;
-
1862 if (negative_sign) negative_sign->invalidate();
-
1863 if (special_sign) special_sign->invalidate();
-
1864 }
-
1865 else if (negative_sign && negative_sign->match(text, this->interval.end, end, flags)) {
-
1866 this->interval.end = negative_sign->interval.end;
-
1867 if (positive_sign) positive_sign->invalidate();
-
1868 if (special_sign) special_sign->invalidate();
-
1869 }
-
1870 else if (special_sign && special_sign->match(text, this->interval.end, end, flags)) {
-
1871 this->interval.end = special_sign->interval.end;
-
1872 if (positive_sign) positive_sign->invalidate();
-
1873 if (negative_sign) negative_sign->invalidate();
-
1874 }
-
1875 else {
-
1876 if (positive_sign) positive_sign->invalidate();
-
1877 if (negative_sign) negative_sign->invalidate();
-
1878 if (special_sign) special_sign->invalidate();
-
1879 }
-
1880 if (number->match(text, this->interval.end, end, flags)) {
-
1881 this->interval.start = start;
-
1882 this->interval.end = number->interval.end;
-
1883 return true;
-
1884 }
-
1885 if (positive_sign) positive_sign->invalidate();
-
1886 if (negative_sign) negative_sign->invalidate();
-
1887 if (special_sign) special_sign->invalidate();
-
1888 number->invalidate();
-
1889 this->interval.start = (this->interval.end = start) + 1;
-
1890 return false;
-
1891 }
-
1892
-
1893 virtual void invalidate()
-
1894 {
-
1895 if (positive_sign) positive_sign->invalidate();
-
1896 if (negative_sign) negative_sign->invalidate();
-
1897 if (special_sign) special_sign->invalidate();
-
1898 number->invalidate();
- -
1900 }
-
1901
-
1902 public:
-
1903 std::shared_ptr<basic_parser<T>> positive_sign;
-
1904 std::shared_ptr<basic_parser<T>> negative_sign;
-
1905 std::shared_ptr<basic_parser<T>> special_sign;
-
1906 std::shared_ptr<basic_parser<T>> number;
-
1907 };
+
1830
+
1831 using score = basic_score<char>;
+ +
1833#ifdef _UNICODE
+
1834 using tscore = wscore;
+
1835#else
+
1836 using tscore = score;
+
1837#endif
+ +
1839
+
1843 template <class T>
+
+ +
1845 {
+
1846 public:
+ +
1848 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
+
1849 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
+
1850 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
+
1851 _In_ const std::shared_ptr<basic_parser<T>>& _number,
+
1852 _In_ const std::locale& locale = std::locale()) :
+
1853 basic_parser<T>(locale),
+ + + + +
1858 {}
+
1859
+
1860 virtual bool match(
+
1861 _In_reads_or_z_(end) const T* text,
+
1862 _In_ size_t start = 0,
+
1863 _In_ size_t end = (size_t)-1,
+
1864 _In_ int flags = match_default)
+
1865 {
+
1866 assert(text || start >= end);
+
1867 this->interval.end = start;
+
1868 if (positive_sign && positive_sign->match(text, this->interval.end, end, flags)) {
+
1869 this->interval.end = positive_sign->interval.end;
+
1870 if (negative_sign) negative_sign->invalidate();
+
1871 if (special_sign) special_sign->invalidate();
+
1872 }
+
1873 else if (negative_sign && negative_sign->match(text, this->interval.end, end, flags)) {
+
1874 this->interval.end = negative_sign->interval.end;
+
1875 if (positive_sign) positive_sign->invalidate();
+
1876 if (special_sign) special_sign->invalidate();
+
1877 }
+
1878 else if (special_sign && special_sign->match(text, this->interval.end, end, flags)) {
+
1879 this->interval.end = special_sign->interval.end;
+
1880 if (positive_sign) positive_sign->invalidate();
+
1881 if (negative_sign) negative_sign->invalidate();
+
1882 }
+
1883 else {
+
1884 if (positive_sign) positive_sign->invalidate();
+
1885 if (negative_sign) negative_sign->invalidate();
+
1886 if (special_sign) special_sign->invalidate();
+
1887 }
+
1888 if (number->match(text, this->interval.end, end, flags)) {
+
1889 this->interval.start = start;
+
1890 this->interval.end = number->interval.end;
+
1891 return true;
+
1892 }
+
1893 if (positive_sign) positive_sign->invalidate();
+
1894 if (negative_sign) negative_sign->invalidate();
+
1895 if (special_sign) special_sign->invalidate();
+
1896 number->invalidate();
+
1897 this->interval.start = (this->interval.end = start) + 1;
+
1898 return false;
+
1899 }
+
1900
+
1901 virtual void invalidate()
+
1902 {
+
1903 if (positive_sign) positive_sign->invalidate();
+
1904 if (negative_sign) negative_sign->invalidate();
+
1905 if (special_sign) special_sign->invalidate();
+
1906 number->invalidate();
+ +
1908 }
+
1909
+
1910 public:
+
1911 std::shared_ptr<basic_parser<T>> positive_sign;
+
1912 std::shared_ptr<basic_parser<T>> negative_sign;
+
1913 std::shared_ptr<basic_parser<T>> special_sign;
+
1914 std::shared_ptr<basic_parser<T>> number;
+
1915 };
-
1908
- - -
1911#ifdef _UNICODE
- -
1913#else
- -
1915#endif
- -
1917
-
1921 template <class T>
-
- -
1923 {
-
1924 public:
- -
1926 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
-
1927 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
-
1928 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
-
1929 _In_ const std::shared_ptr<basic_parser<T>>& _integer,
-
1930 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
1931 _In_ const std::shared_ptr<basic_parser<T>>& _fraction,
-
1932 _In_ const std::locale& locale = std::locale()) :
-
1933 basic_parser<T>(locale),
- - - - - -
1939 m_space(space)
-
1940 {}
-
1941
-
1942 virtual bool match(
-
1943 _In_reads_or_z_(end) const T* text,
-
1944 _In_ size_t start = 0,
-
1945 _In_ size_t end = (size_t)-1,
-
1946 _In_ int flags = match_default)
-
1947 {
-
1948 assert(text || start >= end);
-
1949 this->interval.end = start;
-
1950
-
1951 if (positive_sign && positive_sign->match(text, this->interval.end, end, flags)) {
-
1952 this->interval.end = positive_sign->interval.end;
-
1953 if (negative_sign) negative_sign->invalidate();
-
1954 if (special_sign) special_sign->invalidate();
-
1955 }
-
1956 else if (negative_sign && negative_sign->match(text, this->interval.end, end, flags)) {
-
1957 this->interval.end = negative_sign->interval.end;
-
1958 if (positive_sign) positive_sign->invalidate();
-
1959 if (special_sign) special_sign->invalidate();
-
1960 }
-
1961 else if (special_sign && special_sign->match(text, this->interval.end, end, flags)) {
-
1962 this->interval.end = special_sign->interval.end;
-
1963 if (positive_sign) positive_sign->invalidate();
-
1964 if (negative_sign) negative_sign->invalidate();
-
1965 }
-
1966 else {
-
1967 if (positive_sign) positive_sign->invalidate();
-
1968 if (negative_sign) negative_sign->invalidate();
-
1969 if (special_sign) special_sign->invalidate();
-
1970 }
-
1971
-
1972 // Check for <integer> <fraction>
-
1973 const int space_match_flags = flags & ~match_multiline; // Spaces in fractions must never be broken in new line.
-
1974 if (integer->match(text, this->interval.end, end, flags) &&
-
1975 m_space->match(text, integer->interval.end, end, space_match_flags))
-
1976 {
-
1977 for (this->interval.end = m_space->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
1978 if (fraction->match(text, this->interval.end, end, flags)) {
-
1979 this->interval.start = start;
-
1980 this->interval.end = fraction->interval.end;
-
1981 return true;
-
1982 }
-
1983 fraction->invalidate();
-
1984 this->interval.start = start;
-
1985 this->interval.end = integer->interval.end;
-
1986 return true;
-
1987 }
-
1988
-
1989 // Check for <fraction>
-
1990 if (fraction->match(text, this->interval.end, end, flags)) {
-
1991 integer->invalidate();
+
1916
+ + +
1919#ifdef _UNICODE
+ +
1921#else
+ +
1923#endif
+ +
1925
+
1929 template <class T>
+
+ +
1931 {
+
1932 public:
+ +
1934 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
+
1935 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
+
1936 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
+
1937 _In_ const std::shared_ptr<basic_parser<T>>& _integer,
+
1938 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
1939 _In_ const std::shared_ptr<basic_parser<T>>& _fraction,
+
1940 _In_ const std::locale& locale = std::locale()) :
+
1941 basic_parser<T>(locale),
+ + + + + +
1947 m_space(space)
+
1948 {}
+
1949
+
1950 virtual bool match(
+
1951 _In_reads_or_z_(end) const T* text,
+
1952 _In_ size_t start = 0,
+
1953 _In_ size_t end = (size_t)-1,
+
1954 _In_ int flags = match_default)
+
1955 {
+
1956 assert(text || start >= end);
+
1957 this->interval.end = start;
+
1958
+
1959 if (positive_sign && positive_sign->match(text, this->interval.end, end, flags)) {
+
1960 this->interval.end = positive_sign->interval.end;
+
1961 if (negative_sign) negative_sign->invalidate();
+
1962 if (special_sign) special_sign->invalidate();
+
1963 }
+
1964 else if (negative_sign && negative_sign->match(text, this->interval.end, end, flags)) {
+
1965 this->interval.end = negative_sign->interval.end;
+
1966 if (positive_sign) positive_sign->invalidate();
+
1967 if (special_sign) special_sign->invalidate();
+
1968 }
+
1969 else if (special_sign && special_sign->match(text, this->interval.end, end, flags)) {
+
1970 this->interval.end = special_sign->interval.end;
+
1971 if (positive_sign) positive_sign->invalidate();
+
1972 if (negative_sign) negative_sign->invalidate();
+
1973 }
+
1974 else {
+
1975 if (positive_sign) positive_sign->invalidate();
+
1976 if (negative_sign) negative_sign->invalidate();
+
1977 if (special_sign) special_sign->invalidate();
+
1978 }
+
1979
+
1980 // Check for <integer> <fraction>
+
1981 const int space_match_flags = flags & ~match_multiline; // Spaces in fractions must never be broken in new line.
+
1982 if (integer->match(text, this->interval.end, end, flags) &&
+
1983 m_space->match(text, integer->interval.end, end, space_match_flags))
+
1984 {
+
1985 for (this->interval.end = m_space->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
1986 if (fraction->match(text, this->interval.end, end, flags)) {
+
1987 this->interval.start = start;
+
1988 this->interval.end = fraction->interval.end;
+
1989 return true;
+
1990 }
+
1991 fraction->invalidate();
1992 this->interval.start = start;
-
1993 this->interval.end = fraction->interval.end;
+
1993 this->interval.end = integer->interval.end;
1994 return true;
1995 }
1996
-
1997 // Check for <integer>
-
1998 if (integer->match(text, this->interval.end, end, flags)) {
-
1999 fraction->invalidate();
+
1997 // Check for <fraction>
+
1998 if (fraction->match(text, this->interval.end, end, flags)) {
+
1999 integer->invalidate();
2000 this->interval.start = start;
-
2001 this->interval.end = integer->interval.end;
+
2001 this->interval.end = fraction->interval.end;
2002 return true;
2003 }
2004
-
2005 if (positive_sign) positive_sign->invalidate();
-
2006 if (negative_sign) negative_sign->invalidate();
-
2007 if (special_sign) special_sign->invalidate();
-
2008 integer->invalidate();
-
2009 fraction->invalidate();
-
2010 this->interval.start = (this->interval.end = start) + 1;
-
2011 return false;
-
2012 }
-
2013
-
2014 virtual void invalidate()
-
2015 {
-
2016 if (positive_sign) positive_sign->invalidate();
-
2017 if (negative_sign) negative_sign->invalidate();
-
2018 if (special_sign) special_sign->invalidate();
-
2019 integer->invalidate();
-
2020 fraction->invalidate();
- -
2022 }
-
2023
-
2024 public:
-
2025 std::shared_ptr<basic_parser<T>> positive_sign;
-
2026 std::shared_ptr<basic_parser<T>> negative_sign;
-
2027 std::shared_ptr<basic_parser<T>> special_sign;
-
2028 std::shared_ptr<basic_parser<T>> integer;
-
2029 std::shared_ptr<basic_parser<T>> fraction;
-
2030
-
2031 protected:
-
2032 std::shared_ptr<basic_parser<T>> m_space;
-
2033 };
+
2005 // Check for <integer>
+
2006 if (integer->match(text, this->interval.end, end, flags)) {
+
2007 fraction->invalidate();
+
2008 this->interval.start = start;
+
2009 this->interval.end = integer->interval.end;
+
2010 return true;
+
2011 }
+
2012
+
2013 if (positive_sign) positive_sign->invalidate();
+
2014 if (negative_sign) negative_sign->invalidate();
+
2015 if (special_sign) special_sign->invalidate();
+
2016 integer->invalidate();
+
2017 fraction->invalidate();
+
2018 this->interval.start = (this->interval.end = start) + 1;
+
2019 return false;
+
2020 }
+
2021
+
2022 virtual void invalidate()
+
2023 {
+
2024 if (positive_sign) positive_sign->invalidate();
+
2025 if (negative_sign) negative_sign->invalidate();
+
2026 if (special_sign) special_sign->invalidate();
+
2027 integer->invalidate();
+
2028 fraction->invalidate();
+ +
2030 }
+
2031
+
2032 public:
+
2033 std::shared_ptr<basic_parser<T>> positive_sign;
+
2034 std::shared_ptr<basic_parser<T>> negative_sign;
+
2035 std::shared_ptr<basic_parser<T>> special_sign;
+
2036 std::shared_ptr<basic_parser<T>> integer;
+
2037 std::shared_ptr<basic_parser<T>> fraction;
+
2038
+
2039 protected:
+
2040 std::shared_ptr<basic_parser<T>> m_space;
+
2041 };
-
2034
- - -
2037#ifdef _UNICODE
- -
2039#else
- -
2041#endif
- -
2043
-
2047 template <class T>
-
- -
2049 {
-
2050 public:
- -
2052 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
-
2053 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
-
2054 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
-
2055 _In_ const std::shared_ptr<basic_integer<T>>& _integer,
-
2056 _In_ const std::shared_ptr<basic_parser<T>>& _decimal_separator,
-
2057 _In_ const std::shared_ptr<basic_integer<T>>& _decimal,
-
2058 _In_ const std::shared_ptr<basic_parser<T>>& _exponent_symbol,
-
2059 _In_ const std::shared_ptr<basic_parser<T>>& _positive_exp_sign,
-
2060 _In_ const std::shared_ptr<basic_parser<T>>& _negative_exp_sign,
-
2061 _In_ const std::shared_ptr<basic_integer<T>>& _exponent,
-
2062 _In_ const std::locale& locale = std::locale()) :
-
2063 basic_parser<T>(locale),
- - - - - - - - - - -
2074 value(std::numeric_limits<double>::quiet_NaN())
-
2075 {}
-
2076
-
2077 virtual bool match(
-
2078 _In_reads_or_z_(end) const T* text,
-
2079 _In_ size_t start = 0,
-
2080 _In_ size_t end = (size_t)-1,
-
2081 _In_ int flags = match_default)
-
2082 {
-
2083 assert(text || start >= end);
-
2084 this->interval.end = start;
-
2085
-
2086 if (positive_sign && positive_sign->match(text, this->interval.end, end, flags)) {
-
2087 this->interval.end = positive_sign->interval.end;
-
2088 if (negative_sign) negative_sign->invalidate();
-
2089 if (special_sign) special_sign->invalidate();
-
2090 }
-
2091 else if (negative_sign && negative_sign->match(text, this->interval.end, end, flags)) {
-
2092 this->interval.end = negative_sign->interval.end;
-
2093 if (positive_sign) positive_sign->invalidate();
-
2094 if (special_sign) special_sign->invalidate();
-
2095 }
-
2096 else if (special_sign && special_sign->match(text, this->interval.end, end, flags)) {
-
2097 this->interval.end = special_sign->interval.end;
-
2098 if (positive_sign) positive_sign->invalidate();
-
2099 if (negative_sign) negative_sign->invalidate();
-
2100 }
-
2101 else {
-
2102 if (positive_sign) positive_sign->invalidate();
-
2103 if (negative_sign) negative_sign->invalidate();
-
2104 if (special_sign) special_sign->invalidate();
-
2105 }
-
2106
-
2107 if (integer->match(text, this->interval.end, end, flags))
-
2108 this->interval.end = integer->interval.end;
-
2109
-
2110 if (decimal_separator->match(text, this->interval.end, end, flags) &&
- -
2112 this->interval.end = decimal->interval.end;
-
2113 else {
-
2114 decimal_separator->invalidate();
-
2115 decimal->invalidate();
-
2116 }
+
2042
+ + +
2045#ifdef _UNICODE
+ +
2047#else
+ +
2049#endif
+ +
2051
+
2055 template <class T>
+
+ +
2057 {
+
2058 public:
+ +
2060 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
+
2061 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
+
2062 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
+
2063 _In_ const std::shared_ptr<basic_integer<T>>& _integer,
+
2064 _In_ const std::shared_ptr<basic_parser<T>>& _decimal_separator,
+
2065 _In_ const std::shared_ptr<basic_integer<T>>& _decimal,
+
2066 _In_ const std::shared_ptr<basic_parser<T>>& _exponent_symbol,
+
2067 _In_ const std::shared_ptr<basic_parser<T>>& _positive_exp_sign,
+
2068 _In_ const std::shared_ptr<basic_parser<T>>& _negative_exp_sign,
+
2069 _In_ const std::shared_ptr<basic_integer<T>>& _exponent,
+
2070 _In_ const std::locale& locale = std::locale()) :
+
2071 basic_parser<T>(locale),
+ + + + + + + + + + +
2082 value(std::numeric_limits<double>::quiet_NaN())
+
2083 {}
+
2084
+
2085 virtual bool match(
+
2086 _In_reads_or_z_(end) const T* text,
+
2087 _In_ size_t start = 0,
+
2088 _In_ size_t end = (size_t)-1,
+
2089 _In_ int flags = match_default)
+
2090 {
+
2091 assert(text || start >= end);
+
2092 this->interval.end = start;
+
2093
+
2094 if (positive_sign && positive_sign->match(text, this->interval.end, end, flags)) {
+
2095 this->interval.end = positive_sign->interval.end;
+
2096 if (negative_sign) negative_sign->invalidate();
+
2097 if (special_sign) special_sign->invalidate();
+
2098 }
+
2099 else if (negative_sign && negative_sign->match(text, this->interval.end, end, flags)) {
+
2100 this->interval.end = negative_sign->interval.end;
+
2101 if (positive_sign) positive_sign->invalidate();
+
2102 if (special_sign) special_sign->invalidate();
+
2103 }
+
2104 else if (special_sign && special_sign->match(text, this->interval.end, end, flags)) {
+
2105 this->interval.end = special_sign->interval.end;
+
2106 if (positive_sign) positive_sign->invalidate();
+
2107 if (negative_sign) negative_sign->invalidate();
+
2108 }
+
2109 else {
+
2110 if (positive_sign) positive_sign->invalidate();
+
2111 if (negative_sign) negative_sign->invalidate();
+
2112 if (special_sign) special_sign->invalidate();
+
2113 }
+
2114
+
2115 if (integer->match(text, this->interval.end, end, flags))
+
2116 this->interval.end = integer->interval.end;
2117
-
2118 if (integer->interval.empty() &&
-
2119 decimal->interval.empty())
-
2120 {
-
2121 // No integer part, no decimal part.
-
2122 if (positive_sign) positive_sign->invalidate();
-
2123 if (negative_sign) negative_sign->invalidate();
-
2124 if (special_sign) special_sign->invalidate();
-
2125 integer->invalidate();
-
2126 decimal_separator->invalidate();
-
2127 decimal->invalidate();
-
2128 if (exponent_symbol) exponent_symbol->invalidate();
-
2129 if (positive_exp_sign) positive_exp_sign->invalidate();
-
2130 if (negative_exp_sign) negative_exp_sign->invalidate();
-
2131 if (exponent) exponent->invalidate();
-
2132 this->interval.start = (this->interval.end = start) + 1;
-
2133 return false;
-
2134 }
-
2135
-
2136 if (exponent_symbol && exponent_symbol->match(text, this->interval.end, end, flags) &&
- - -
2139 (exponent && exponent->match(text, exponent_symbol->interval.end, end, flags))))
-
2140 {
-
2141 this->interval.end = exponent->interval.end;
-
2142 if (negative_exp_sign) negative_exp_sign->invalidate();
-
2143 }
-
2144 else if (exponent_symbol && exponent_symbol->match(text, this->interval.end, end, flags) &&
- - -
2147 {
-
2148 this->interval.end = exponent->interval.end;
-
2149 if (positive_exp_sign) positive_exp_sign->invalidate();
-
2150 }
-
2151 else {
-
2152 if (exponent_symbol) exponent_symbol->invalidate();
-
2153 if (positive_exp_sign) positive_exp_sign->invalidate();
-
2154 if (negative_exp_sign) negative_exp_sign->invalidate();
-
2155 if (exponent) exponent->invalidate();
-
2156 }
-
2157
-
2158 value = (double)integer->value;
-
2159 if (decimal->interval)
-
2160 value += (double)decimal->value * pow(10.0, -(double)decimal->interval.size());
-
2161 if (negative_sign && negative_sign->interval)
-
2162 value = -value;
-
2163 if (exponent && exponent->interval) {
-
2164 double e = (double)exponent->value;
-
2165 if (negative_exp_sign && negative_exp_sign->interval)
-
2166 e = -e;
-
2167 value *= pow(10.0, e);
-
2168 }
-
2169
-
2170 this->interval.start = start;
-
2171 return true;
-
2172 }
-
2173
-
2174 virtual void invalidate()
-
2175 {
-
2176 if (positive_sign) positive_sign->invalidate();
-
2177 if (negative_sign) negative_sign->invalidate();
-
2178 if (special_sign) special_sign->invalidate();
-
2179 integer->invalidate();
-
2180 decimal_separator->invalidate();
-
2181 decimal->invalidate();
-
2182 if (exponent_symbol) exponent_symbol->invalidate();
-
2183 if (positive_exp_sign) positive_exp_sign->invalidate();
-
2184 if (negative_exp_sign) negative_exp_sign->invalidate();
-
2185 if (exponent) exponent->invalidate();
-
2186 value = std::numeric_limits<double>::quiet_NaN();
- -
2188 }
-
2189
-
2190 public:
-
2191 std::shared_ptr<basic_parser<T>> positive_sign;
-
2192 std::shared_ptr<basic_parser<T>> negative_sign;
-
2193 std::shared_ptr<basic_parser<T>> special_sign;
-
2194 std::shared_ptr<basic_integer<T>> integer;
-
2195 std::shared_ptr<basic_parser<T>> decimal_separator;
-
2196 std::shared_ptr<basic_integer<T>> decimal;
-
2197 std::shared_ptr<basic_parser<T>> exponent_symbol;
-
2198 std::shared_ptr<basic_parser<T>> positive_exp_sign;
-
2199 std::shared_ptr<basic_parser<T>> negative_exp_sign;
-
2200 std::shared_ptr<basic_integer<T>> exponent;
-
2201 double value;
-
2202 };
+
2118 if (decimal_separator->match(text, this->interval.end, end, flags) &&
+ +
2120 this->interval.end = decimal->interval.end;
+
2121 else {
+
2122 decimal_separator->invalidate();
+
2123 decimal->invalidate();
+
2124 }
+
2125
+
2126 if (integer->interval.empty() &&
+
2127 decimal->interval.empty())
+
2128 {
+
2129 // No integer part, no decimal part.
+
2130 if (positive_sign) positive_sign->invalidate();
+
2131 if (negative_sign) negative_sign->invalidate();
+
2132 if (special_sign) special_sign->invalidate();
+
2133 integer->invalidate();
+
2134 decimal_separator->invalidate();
+
2135 decimal->invalidate();
+
2136 if (exponent_symbol) exponent_symbol->invalidate();
+
2137 if (positive_exp_sign) positive_exp_sign->invalidate();
+
2138 if (negative_exp_sign) negative_exp_sign->invalidate();
+
2139 if (exponent) exponent->invalidate();
+
2140 this->interval.start = (this->interval.end = start) + 1;
+
2141 return false;
+
2142 }
+
2143
+
2144 if (exponent_symbol && exponent_symbol->match(text, this->interval.end, end, flags) &&
+ + +
2147 (exponent && exponent->match(text, exponent_symbol->interval.end, end, flags))))
+
2148 {
+
2149 this->interval.end = exponent->interval.end;
+
2150 if (negative_exp_sign) negative_exp_sign->invalidate();
+
2151 }
+
2152 else if (exponent_symbol && exponent_symbol->match(text, this->interval.end, end, flags) &&
+ + +
2155 {
+
2156 this->interval.end = exponent->interval.end;
+
2157 if (positive_exp_sign) positive_exp_sign->invalidate();
+
2158 }
+
2159 else {
+
2160 if (exponent_symbol) exponent_symbol->invalidate();
+
2161 if (positive_exp_sign) positive_exp_sign->invalidate();
+
2162 if (negative_exp_sign) negative_exp_sign->invalidate();
+
2163 if (exponent) exponent->invalidate();
+
2164 }
+
2165
+
2166 value = (double)integer->value;
+
2167 if (decimal->interval)
+
2168 value += (double)decimal->value * pow(10.0, -(double)decimal->interval.size());
+
2169 if (negative_sign && negative_sign->interval)
+
2170 value = -value;
+
2171 if (exponent && exponent->interval) {
+
2172 double e = (double)exponent->value;
+
2173 if (negative_exp_sign && negative_exp_sign->interval)
+
2174 e = -e;
+
2175 value *= pow(10.0, e);
+
2176 }
+
2177
+
2178 this->interval.start = start;
+
2179 return true;
+
2180 }
+
2181
+
2182 virtual void invalidate()
+
2183 {
+
2184 if (positive_sign) positive_sign->invalidate();
+
2185 if (negative_sign) negative_sign->invalidate();
+
2186 if (special_sign) special_sign->invalidate();
+
2187 integer->invalidate();
+
2188 decimal_separator->invalidate();
+
2189 decimal->invalidate();
+
2190 if (exponent_symbol) exponent_symbol->invalidate();
+
2191 if (positive_exp_sign) positive_exp_sign->invalidate();
+
2192 if (negative_exp_sign) negative_exp_sign->invalidate();
+
2193 if (exponent) exponent->invalidate();
+
2194 value = std::numeric_limits<double>::quiet_NaN();
+ +
2196 }
+
2197
+
2198 public:
+
2199 std::shared_ptr<basic_parser<T>> positive_sign;
+
2200 std::shared_ptr<basic_parser<T>> negative_sign;
+
2201 std::shared_ptr<basic_parser<T>> special_sign;
+
2202 std::shared_ptr<basic_integer<T>> integer;
+
2203 std::shared_ptr<basic_parser<T>> decimal_separator;
+
2204 std::shared_ptr<basic_integer<T>> decimal;
+
2205 std::shared_ptr<basic_parser<T>> exponent_symbol;
+
2206 std::shared_ptr<basic_parser<T>> positive_exp_sign;
+
2207 std::shared_ptr<basic_parser<T>> negative_exp_sign;
+
2208 std::shared_ptr<basic_integer<T>> exponent;
+
2209 double value;
+
2210 };
-
2203
- - -
2206#ifdef _UNICODE
- -
2208#else
- -
2210#endif
- -
2212
-
2216 template <class T>
-
- -
2218 {
-
2219 public:
- -
2221 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
-
2222 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
-
2223 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
-
2224 _In_ const std::shared_ptr<basic_parser<T>>& _currency,
-
2225 _In_ const std::shared_ptr<basic_parser<T>>& _integer,
-
2226 _In_ const std::shared_ptr<basic_parser<T>>& _decimal_separator,
-
2227 _In_ const std::shared_ptr<basic_parser<T>>& _decimal,
-
2228 _In_ const std::locale& locale = std::locale()) :
-
2229 basic_parser<T>(locale),
- - - - - - - -
2237 {}
-
2238
-
2239 virtual bool match(
-
2240 _In_reads_or_z_(end) const T* text,
-
2241 _In_ size_t start = 0,
-
2242 _In_ size_t end = (size_t)-1,
-
2243 _In_ int flags = match_default)
-
2244 {
-
2245 assert(text || start >= end);
-
2246 this->interval.end = start;
-
2247
-
2248 if (positive_sign->match(text, this->interval.end, end, flags)) {
-
2249 this->interval.end = positive_sign->interval.end;
-
2250 if (negative_sign) negative_sign->invalidate();
-
2251 if (special_sign) special_sign->invalidate();
-
2252 }
-
2253 else if (negative_sign->match(text, this->interval.end, end, flags)) {
-
2254 this->interval.end = negative_sign->interval.end;
-
2255 if (positive_sign) positive_sign->invalidate();
-
2256 if (special_sign) special_sign->invalidate();
-
2257 }
-
2258 else if (special_sign->match(text, this->interval.end, end, flags)) {
-
2259 this->interval.end = special_sign->interval.end;
-
2260 if (positive_sign) positive_sign->invalidate();
-
2261 if (negative_sign) negative_sign->invalidate();
-
2262 }
-
2263 else {
-
2264 if (positive_sign) positive_sign->invalidate();
-
2265 if (negative_sign) negative_sign->invalidate();
-
2266 if (special_sign) special_sign->invalidate();
-
2267 }
-
2268
-
2269 if (currency->match(text, this->interval.end, end, flags))
-
2270 this->interval.end = currency->interval.end;
+
2211
+ + +
2214#ifdef _UNICODE
+ +
2216#else
+ +
2218#endif
+ +
2220
+
2224 template <class T>
+
+ +
2226 {
+
2227 public:
+ +
2229 _In_ const std::shared_ptr<basic_parser<T>>& _positive_sign,
+
2230 _In_ const std::shared_ptr<basic_parser<T>>& _negative_sign,
+
2231 _In_ const std::shared_ptr<basic_parser<T>>& _special_sign,
+
2232 _In_ const std::shared_ptr<basic_parser<T>>& _currency,
+
2233 _In_ const std::shared_ptr<basic_parser<T>>& _integer,
+
2234 _In_ const std::shared_ptr<basic_parser<T>>& _decimal_separator,
+
2235 _In_ const std::shared_ptr<basic_parser<T>>& _decimal,
+
2236 _In_ const std::locale& locale = std::locale()) :
+
2237 basic_parser<T>(locale),
+ + + + + + + +
2245 {}
+
2246
+
2247 virtual bool match(
+
2248 _In_reads_or_z_(end) const T* text,
+
2249 _In_ size_t start = 0,
+
2250 _In_ size_t end = (size_t)-1,
+
2251 _In_ int flags = match_default)
+
2252 {
+
2253 assert(text || start >= end);
+
2254 this->interval.end = start;
+
2255
+
2256 if (positive_sign->match(text, this->interval.end, end, flags)) {
+
2257 this->interval.end = positive_sign->interval.end;
+
2258 if (negative_sign) negative_sign->invalidate();
+
2259 if (special_sign) special_sign->invalidate();
+
2260 }
+
2261 else if (negative_sign->match(text, this->interval.end, end, flags)) {
+
2262 this->interval.end = negative_sign->interval.end;
+
2263 if (positive_sign) positive_sign->invalidate();
+
2264 if (special_sign) special_sign->invalidate();
+
2265 }
+
2266 else if (special_sign->match(text, this->interval.end, end, flags)) {
+
2267 this->interval.end = special_sign->interval.end;
+
2268 if (positive_sign) positive_sign->invalidate();
+
2269 if (negative_sign) negative_sign->invalidate();
+
2270 }
2271 else {
2272 if (positive_sign) positive_sign->invalidate();
2273 if (negative_sign) negative_sign->invalidate();
2274 if (special_sign) special_sign->invalidate();
-
2275 integer->invalidate();
-
2276 decimal_separator->invalidate();
-
2277 decimal->invalidate();
-
2278 this->interval.start = (this->interval.end = start) + 1;
-
2279 return false;
-
2280 }
-
2281
-
2282 if (integer->match(text, this->interval.end, end, flags))
-
2283 this->interval.end = integer->interval.end;
-
2284 if (decimal_separator->match(text, this->interval.end, end, flags) &&
- -
2286 this->interval.end = decimal->interval.end;
-
2287 else {
-
2288 decimal_separator->invalidate();
-
2289 decimal->invalidate();
-
2290 }
-
2291
-
2292 if (integer->interval.empty() &&
-
2293 decimal->interval.empty())
-
2294 {
-
2295 // No integer part, no decimal part.
-
2296 if (positive_sign) positive_sign->invalidate();
-
2297 if (negative_sign) negative_sign->invalidate();
-
2298 if (special_sign) special_sign->invalidate();
-
2299 currency->invalidate();
-
2300 integer->invalidate();
-
2301 decimal_separator->invalidate();
-
2302 decimal->invalidate();
-
2303 this->interval.start = (this->interval.end = start) + 1;
-
2304 return false;
-
2305 }
-
2306
-
2307 this->interval.start = start;
-
2308 return true;
-
2309 }
-
2310
-
2311 virtual void invalidate()
-
2312 {
-
2313 if (positive_sign) positive_sign->invalidate();
-
2314 if (negative_sign) negative_sign->invalidate();
-
2315 if (special_sign) special_sign->invalidate();
-
2316 currency->invalidate();
-
2317 integer->invalidate();
-
2318 decimal_separator->invalidate();
-
2319 decimal->invalidate();
- -
2321 }
-
2322
-
2323 public:
-
2324 std::shared_ptr<basic_parser<T>> positive_sign;
-
2325 std::shared_ptr<basic_parser<T>> negative_sign;
-
2326 std::shared_ptr<basic_parser<T>> special_sign;
-
2327 std::shared_ptr<basic_parser<T>> currency;
-
2328 std::shared_ptr<basic_parser<T>> integer;
-
2329 std::shared_ptr<basic_parser<T>> decimal_separator;
-
2330 std::shared_ptr<basic_parser<T>> decimal;
-
2331 };
+
2275 }
+
2276
+
2277 if (currency->match(text, this->interval.end, end, flags))
+
2278 this->interval.end = currency->interval.end;
+
2279 else {
+
2280 if (positive_sign) positive_sign->invalidate();
+
2281 if (negative_sign) negative_sign->invalidate();
+
2282 if (special_sign) special_sign->invalidate();
+
2283 integer->invalidate();
+
2284 decimal_separator->invalidate();
+
2285 decimal->invalidate();
+
2286 this->interval.start = (this->interval.end = start) + 1;
+
2287 return false;
+
2288 }
+
2289
+
2290 if (integer->match(text, this->interval.end, end, flags))
+
2291 this->interval.end = integer->interval.end;
+
2292 if (decimal_separator->match(text, this->interval.end, end, flags) &&
+ +
2294 this->interval.end = decimal->interval.end;
+
2295 else {
+
2296 decimal_separator->invalidate();
+
2297 decimal->invalidate();
+
2298 }
+
2299
+
2300 if (integer->interval.empty() &&
+
2301 decimal->interval.empty())
+
2302 {
+
2303 // No integer part, no decimal part.
+
2304 if (positive_sign) positive_sign->invalidate();
+
2305 if (negative_sign) negative_sign->invalidate();
+
2306 if (special_sign) special_sign->invalidate();
+
2307 currency->invalidate();
+
2308 integer->invalidate();
+
2309 decimal_separator->invalidate();
+
2310 decimal->invalidate();
+
2311 this->interval.start = (this->interval.end = start) + 1;
+
2312 return false;
+
2313 }
+
2314
+
2315 this->interval.start = start;
+
2316 return true;
+
2317 }
+
2318
+
2319 virtual void invalidate()
+
2320 {
+
2321 if (positive_sign) positive_sign->invalidate();
+
2322 if (negative_sign) negative_sign->invalidate();
+
2323 if (special_sign) special_sign->invalidate();
+
2324 currency->invalidate();
+
2325 integer->invalidate();
+
2326 decimal_separator->invalidate();
+
2327 decimal->invalidate();
+ +
2329 }
+
2330
+
2331 public:
+
2332 std::shared_ptr<basic_parser<T>> positive_sign;
+
2333 std::shared_ptr<basic_parser<T>> negative_sign;
+
2334 std::shared_ptr<basic_parser<T>> special_sign;
+
2335 std::shared_ptr<basic_parser<T>> currency;
+
2336 std::shared_ptr<basic_parser<T>> integer;
+
2337 std::shared_ptr<basic_parser<T>> decimal_separator;
+
2338 std::shared_ptr<basic_parser<T>> decimal;
+
2339 };
-
2332
- - -
2335#ifdef _UNICODE
- -
2337#else
- -
2339#endif
- -
2341
-
2345 template <class T>
-
- -
2347 {
-
2348 public:
- -
2350 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
-
2351 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
-
2352 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
-
2353 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
-
2354 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
-
2355 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
-
2356 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
-
2357 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
-
2358 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
-
2359 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
-
2360 _In_ const std::shared_ptr<basic_parser<T>>& separator,
-
2361 _In_ const std::locale& locale = std::locale()) :
-
2362 basic_parser<T>(locale),
-
2363 m_digit_0(digit_0),
-
2364 m_digit_1(digit_1),
-
2365 m_digit_2(digit_2),
-
2366 m_digit_3(digit_3),
-
2367 m_digit_4(digit_4),
-
2368 m_digit_5(digit_5),
-
2369 m_digit_6(digit_6),
-
2370 m_digit_7(digit_7),
-
2371 m_digit_8(digit_8),
-
2372 m_digit_9(digit_9),
-
2373 m_separator(separator)
-
2374 {
-
2375 value.s_addr = 0;
-
2376 }
-
2377
-
2378 virtual bool match(
-
2379 _In_reads_or_z_(end) const T* text,
-
2380 _In_ size_t start = 0,
-
2381 _In_ size_t end = (size_t)-1,
-
2382 _In_ int flags = match_default)
-
2383 {
-
2384 assert(text || start >= end);
-
2385 this->interval.end = start;
-
2386 value.s_addr = 0;
-
2387
-
2388 size_t i;
-
2389 for (i = 0; i < 4; i++) {
-
2390 if (i) {
-
2391 if (m_separator->match(text, this->interval.end, end, flags))
-
2392 this->interval.end = m_separator->interval.end;
-
2393 else
-
2394 goto error;
-
2395 }
-
2396
-
2397 components[i].start = this->interval.end;
-
2398 bool is_empty = true;
-
2399 size_t x;
-
2400 for (x = 0; this->interval.end < end && text[this->interval.end];) {
-
2401 size_t dig, digit_end;
-
2402 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; digit_end = m_digit_0->interval.end; }
-
2403 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; digit_end = m_digit_1->interval.end; }
-
2404 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; digit_end = m_digit_2->interval.end; }
-
2405 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; digit_end = m_digit_3->interval.end; }
-
2406 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; digit_end = m_digit_4->interval.end; }
-
2407 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; digit_end = m_digit_5->interval.end; }
-
2408 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; digit_end = m_digit_6->interval.end; }
-
2409 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; digit_end = m_digit_7->interval.end; }
-
2410 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; digit_end = m_digit_8->interval.end; }
-
2411 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; digit_end = m_digit_9->interval.end; }
-
2412 else break;
-
2413 size_t x_n = x * 10 + dig;
-
2414 if (x_n <= 255) {
-
2415 x = x_n;
-
2416 this->interval.end = digit_end;
-
2417 is_empty = false;
-
2418 }
-
2419 else
-
2420 break;
-
2421 }
-
2422 if (is_empty)
-
2423 goto error;
-
2424 components[i].end = this->interval.end;
-
2425 value.s_addr = (value.s_addr << 8) | (uint8_t)x;
-
2426 }
-
2427 if (i < 4)
-
2428 goto error;
-
2429
-
2430 this->interval.start = start;
-
2431 return true;
-
2432
-
2433 error:
-
2434 components[0].start = 1;
-
2435 components[0].end = 0;
-
2436 components[1].start = 1;
-
2437 components[1].end = 0;
-
2438 components[2].start = 1;
-
2439 components[2].end = 0;
-
2440 components[3].start = 1;
-
2441 components[3].end = 0;
-
2442 value.s_addr = 0;
-
2443 this->interval.start = (this->interval.end = start) + 1;
-
2444 return false;
-
2445 }
-
2446
-
2447 virtual void invalidate()
-
2448 {
-
2449 components[0].start = 1;
-
2450 components[0].end = 0;
-
2451 components[1].start = 1;
-
2452 components[1].end = 0;
-
2453 components[2].start = 1;
-
2454 components[2].end = 0;
-
2455 components[3].start = 1;
-
2456 components[3].end = 0;
-
2457 value.s_addr = 0;
- -
2459 }
-
2460
-
2461 public:
- - -
2464
-
2465 protected:
-
2466 std::shared_ptr<basic_parser<T>>
-
2467 m_digit_0,
-
2468 m_digit_1,
-
2469 m_digit_2,
-
2470 m_digit_3,
-
2471 m_digit_4,
-
2472 m_digit_5,
-
2473 m_digit_6,
-
2474 m_digit_7,
-
2475 m_digit_8,
-
2476 m_digit_9;
-
2477 std::shared_ptr<basic_parser<T>> m_separator;
-
2478 };
+
2340
+ + +
2343#ifdef _UNICODE
+ +
2345#else
+ +
2347#endif
+ +
2349
+
2353 template <class T>
+
+ +
2355 {
+
2356 public:
+ +
2358 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
+
2359 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
+
2360 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
+
2361 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
+
2362 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
+
2363 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
+
2364 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
+
2365 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
+
2366 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
+
2367 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
+
2368 _In_ const std::shared_ptr<basic_parser<T>>& separator,
+
2369 _In_ const std::locale& locale = std::locale()) :
+
2370 basic_parser<T>(locale),
+
2371 m_digit_0(digit_0),
+
2372 m_digit_1(digit_1),
+
2373 m_digit_2(digit_2),
+
2374 m_digit_3(digit_3),
+
2375 m_digit_4(digit_4),
+
2376 m_digit_5(digit_5),
+
2377 m_digit_6(digit_6),
+
2378 m_digit_7(digit_7),
+
2379 m_digit_8(digit_8),
+
2380 m_digit_9(digit_9),
+
2381 m_separator(separator)
+
2382 {
+
2383 value.s_addr = 0;
+
2384 }
+
2385
+
2386 virtual bool match(
+
2387 _In_reads_or_z_(end) const T* text,
+
2388 _In_ size_t start = 0,
+
2389 _In_ size_t end = (size_t)-1,
+
2390 _In_ int flags = match_default)
+
2391 {
+
2392 assert(text || start >= end);
+
2393 this->interval.end = start;
+
2394 value.s_addr = 0;
+
2395
+
2396 size_t i;
+
2397 for (i = 0; i < 4; i++) {
+
2398 if (i) {
+
2399 if (m_separator->match(text, this->interval.end, end, flags))
+
2400 this->interval.end = m_separator->interval.end;
+
2401 else
+
2402 goto error;
+
2403 }
+
2404
+
2405 components[i].start = this->interval.end;
+
2406 bool is_empty = true;
+
2407 size_t x;
+
2408 for (x = 0; this->interval.end < end && text[this->interval.end];) {
+
2409 size_t dig, digit_end;
+
2410 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; digit_end = m_digit_0->interval.end; }
+
2411 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; digit_end = m_digit_1->interval.end; }
+
2412 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; digit_end = m_digit_2->interval.end; }
+
2413 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; digit_end = m_digit_3->interval.end; }
+
2414 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; digit_end = m_digit_4->interval.end; }
+
2415 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; digit_end = m_digit_5->interval.end; }
+
2416 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; digit_end = m_digit_6->interval.end; }
+
2417 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; digit_end = m_digit_7->interval.end; }
+
2418 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; digit_end = m_digit_8->interval.end; }
+
2419 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; digit_end = m_digit_9->interval.end; }
+
2420 else break;
+
2421 size_t x_n = x * 10 + dig;
+
2422 if (x_n <= 255) {
+
2423 x = x_n;
+
2424 this->interval.end = digit_end;
+
2425 is_empty = false;
+
2426 }
+
2427 else
+
2428 break;
+
2429 }
+
2430 if (is_empty)
+
2431 goto error;
+
2432 components[i].end = this->interval.end;
+
2433 value.s_addr = (value.s_addr << 8) | (uint8_t)x;
+
2434 }
+
2435 if (i < 4)
+
2436 goto error;
+
2437
+
2438 this->interval.start = start;
+
2439 return true;
+
2440
+
2441 error:
+
2442 components[0].start = 1;
+
2443 components[0].end = 0;
+
2444 components[1].start = 1;
+
2445 components[1].end = 0;
+
2446 components[2].start = 1;
+
2447 components[2].end = 0;
+
2448 components[3].start = 1;
+
2449 components[3].end = 0;
+
2450 value.s_addr = 0;
+
2451 this->interval.start = (this->interval.end = start) + 1;
+
2452 return false;
+
2453 }
+
2454
+
2455 virtual void invalidate()
+
2456 {
+
2457 components[0].start = 1;
+
2458 components[0].end = 0;
+
2459 components[1].start = 1;
+
2460 components[1].end = 0;
+
2461 components[2].start = 1;
+
2462 components[2].end = 0;
+
2463 components[3].start = 1;
+
2464 components[3].end = 0;
+
2465 value.s_addr = 0;
+ +
2467 }
+
2468
+
2469 public:
+ + +
2472
+
2473 protected:
+
2474 std::shared_ptr<basic_parser<T>>
+
2475 m_digit_0,
+
2476 m_digit_1,
+
2477 m_digit_2,
+
2478 m_digit_3,
+
2479 m_digit_4,
+
2480 m_digit_5,
+
2481 m_digit_6,
+
2482 m_digit_7,
+
2483 m_digit_8,
+
2484 m_digit_9;
+
2485 std::shared_ptr<basic_parser<T>> m_separator;
+
2486 };
-
2479
- - -
2482#ifdef _UNICODE
- -
2484#else
- -
2486#endif
- -
2488
-
2492 template <class T>
-
- -
2494 {
-
2495 public:
-
2496 basic_ipv6_scope_id_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
2497
-
2498 virtual bool match(
-
2499 _In_reads_or_z_(end) const T* text,
-
2500 _In_ size_t start = 0,
-
2501 _In_ size_t end = (size_t)-1,
-
2502 _In_ int flags = match_default)
-
2503 {
-
2504 assert(text || start >= end);
-
2505 if (start < end && text[start]) {
-
2506 if (text[start] == '-' ||
-
2507 text[start] == '_' ||
-
2508 text[start] == ':' ||
-
2509 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
-
2510 {
-
2511 this->interval.end = (this->interval.start = start) + 1;
-
2512 return true;
-
2513 }
-
2514 }
-
2515 this->interval.start = (this->interval.end = start) + 1;
-
2516 return false;
-
2517 }
-
2518 };
+
2487
+ + +
2490#ifdef _UNICODE
+ +
2492#else
+ +
2494#endif
+ +
2496
+
2500 template <class T>
+
+ +
2502 {
+
2503 public:
+
2504 basic_ipv6_scope_id_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
2505
+
2506 virtual bool match(
+
2507 _In_reads_or_z_(end) const T* text,
+
2508 _In_ size_t start = 0,
+
2509 _In_ size_t end = (size_t)-1,
+
2510 _In_ int flags = match_default)
+
2511 {
+
2512 assert(text || start >= end);
+
2513 if (start < end && text[start]) {
+
2514 if (text[start] == '-' ||
+
2515 text[start] == '_' ||
+
2516 text[start] == ':' ||
+
2517 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
+
2518 {
+
2519 this->interval.end = (this->interval.start = start) + 1;
+
2520 return true;
+
2521 }
+
2522 }
+
2523 this->interval.start = (this->interval.end = start) + 1;
+
2524 return false;
+
2525 }
+
2526 };
-
2519
- - -
2522#ifdef _UNICODE
- -
2524#else
- -
2526#endif
2527
-
- -
2532 {
-
2533 public:
-
2534 sgml_ipv6_scope_id_char(_In_ const std::locale& locale = std::locale()) : sgml_parser(locale) {}
+ + +
2530#ifdef _UNICODE
+ +
2532#else
+ +
2534#endif
2535
-
2536 virtual bool match(
-
2537 _In_reads_or_z_(end) const char* text,
-
2538 _In_ size_t start = 0,
-
2539 _In_ size_t end = (size_t)-1,
-
2540 _In_ int flags = match_default)
-
2541 {
-
2542 assert(text || start >= end);
-
2543 if (start < end && text[start]) {
-
2544 wchar_t buf[3];
-
2545 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
2546 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
2547 if (((chr[0] == L'-' ||
-
2548 chr[0] == L'_' ||
-
2549 chr[0] == L':') && chr[1] == 0) ||
-
2550 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
-
2551 {
-
2552 this->interval.start = start;
-
2553 return true;
-
2554 }
-
2555 }
-
2556 this->interval.start = (this->interval.end = start) + 1;
-
2557 return false;
-
2558 }
-
2559 };
+
+ +
2540 {
+
2541 public:
+
2542 sgml_ipv6_scope_id_char(_In_ const std::locale& locale = std::locale()) : sgml_parser(locale) {}
+
2543
+
2544 virtual bool match(
+
2545 _In_reads_or_z_(end) const char* text,
+
2546 _In_ size_t start = 0,
+
2547 _In_ size_t end = (size_t)-1,
+
2548 _In_ int flags = match_default)
+
2549 {
+
2550 assert(text || start >= end);
+
2551 if (start < end && text[start]) {
+
2552 wchar_t buf[3];
+
2553 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
2554 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
2555 if (((chr[0] == L'-' ||
+
2556 chr[0] == L'_' ||
+
2557 chr[0] == L':') && chr[1] == 0) ||
+
2558 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
+
2559 {
+
2560 this->interval.start = start;
+
2561 return true;
+
2562 }
+
2563 }
+
2564 this->interval.start = (this->interval.end = start) + 1;
+
2565 return false;
+
2566 }
+
2567 };
-
2560
-
2564 template <class T>
-
- -
2566 {
-
2567 public:
- -
2569 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
-
2570 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
-
2571 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
-
2572 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
-
2573 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
-
2574 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
-
2575 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
-
2576 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
-
2577 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
-
2578 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
-
2579 _In_ const std::shared_ptr<basic_parser<T>>& digit_10,
-
2580 _In_ const std::shared_ptr<basic_parser<T>>& digit_11,
-
2581 _In_ const std::shared_ptr<basic_parser<T>>& digit_12,
-
2582 _In_ const std::shared_ptr<basic_parser<T>>& digit_13,
-
2583 _In_ const std::shared_ptr<basic_parser<T>>& digit_14,
-
2584 _In_ const std::shared_ptr<basic_parser<T>>& digit_15,
-
2585 _In_ const std::shared_ptr<basic_parser<T>>& separator,
-
2586 _In_ const std::shared_ptr<basic_parser<T>>& scope_id_separator = nullptr,
-
2587 _In_ const std::shared_ptr<basic_parser<T>>& _scope_id = nullptr,
-
2588 _In_ const std::locale& locale = std::locale()) :
-
2589 basic_parser<T>(locale),
-
2590 m_digit_0(digit_0),
-
2591 m_digit_1(digit_1),
-
2592 m_digit_2(digit_2),
-
2593 m_digit_3(digit_3),
-
2594 m_digit_4(digit_4),
-
2595 m_digit_5(digit_5),
-
2596 m_digit_6(digit_6),
-
2597 m_digit_7(digit_7),
-
2598 m_digit_8(digit_8),
-
2599 m_digit_9(digit_9),
-
2600 m_digit_10(digit_10),
-
2601 m_digit_11(digit_11),
-
2602 m_digit_12(digit_12),
-
2603 m_digit_13(digit_13),
-
2604 m_digit_14(digit_14),
-
2605 m_digit_15(digit_15),
-
2606 m_separator(separator),
-
2607 m_scope_id_separator(scope_id_separator),
- -
2609 {
-
2610 memset(&value, 0, sizeof(value));
-
2611 }
-
2612
-
2613 virtual bool match(
-
2614 _In_reads_or_z_(end) const T* text,
-
2615 _In_ size_t start = 0,
-
2616 _In_ size_t end = (size_t)-1,
-
2617 _In_ int flags = match_default)
-
2618 {
-
2619 assert(text || start >= end);
-
2620 this->interval.end = start;
-
2621 memset(&value, 0, sizeof(value));
-
2622
-
2623 size_t i, compaction_i = (size_t)-1, compaction_start = start;
-
2624 for (i = 0; i < 8; i++) {
-
2625 bool is_empty = true;
-
2626
-
2627 if (m_separator->match(text, this->interval.end, end, flags)) {
-
2628 if (m_separator->match(text, m_separator->interval.end, end, flags)) {
-
2629 // :: found
-
2630 if (compaction_i == (size_t)-1) {
-
2631 // Zero compaction start
-
2632 compaction_i = i;
-
2633 compaction_start = m_separator->interval.start;
-
2634 this->interval.end = m_separator->interval.end;
-
2635 }
-
2636 else {
-
2637 // More than one zero compaction
-
2638 break;
-
2639 }
-
2640 }
-
2641 else if (i) {
-
2642 // Inner : found
-
2643 this->interval.end = m_separator->interval.end;
-
2644 }
-
2645 else {
-
2646 // Leading : found
-
2647 goto error;
+
2568
+
2572 template <class T>
+
+ +
2574 {
+
2575 public:
+ +
2577 _In_ const std::shared_ptr<basic_parser<T>>& digit_0,
+
2578 _In_ const std::shared_ptr<basic_parser<T>>& digit_1,
+
2579 _In_ const std::shared_ptr<basic_parser<T>>& digit_2,
+
2580 _In_ const std::shared_ptr<basic_parser<T>>& digit_3,
+
2581 _In_ const std::shared_ptr<basic_parser<T>>& digit_4,
+
2582 _In_ const std::shared_ptr<basic_parser<T>>& digit_5,
+
2583 _In_ const std::shared_ptr<basic_parser<T>>& digit_6,
+
2584 _In_ const std::shared_ptr<basic_parser<T>>& digit_7,
+
2585 _In_ const std::shared_ptr<basic_parser<T>>& digit_8,
+
2586 _In_ const std::shared_ptr<basic_parser<T>>& digit_9,
+
2587 _In_ const std::shared_ptr<basic_parser<T>>& digit_10,
+
2588 _In_ const std::shared_ptr<basic_parser<T>>& digit_11,
+
2589 _In_ const std::shared_ptr<basic_parser<T>>& digit_12,
+
2590 _In_ const std::shared_ptr<basic_parser<T>>& digit_13,
+
2591 _In_ const std::shared_ptr<basic_parser<T>>& digit_14,
+
2592 _In_ const std::shared_ptr<basic_parser<T>>& digit_15,
+
2593 _In_ const std::shared_ptr<basic_parser<T>>& separator,
+
2594 _In_ const std::shared_ptr<basic_parser<T>>& scope_id_separator = nullptr,
+
2595 _In_ const std::shared_ptr<basic_parser<T>>& _scope_id = nullptr,
+
2596 _In_ const std::locale& locale = std::locale()) :
+
2597 basic_parser<T>(locale),
+
2598 m_digit_0(digit_0),
+
2599 m_digit_1(digit_1),
+
2600 m_digit_2(digit_2),
+
2601 m_digit_3(digit_3),
+
2602 m_digit_4(digit_4),
+
2603 m_digit_5(digit_5),
+
2604 m_digit_6(digit_6),
+
2605 m_digit_7(digit_7),
+
2606 m_digit_8(digit_8),
+
2607 m_digit_9(digit_9),
+
2608 m_digit_10(digit_10),
+
2609 m_digit_11(digit_11),
+
2610 m_digit_12(digit_12),
+
2611 m_digit_13(digit_13),
+
2612 m_digit_14(digit_14),
+
2613 m_digit_15(digit_15),
+
2614 m_separator(separator),
+
2615 m_scope_id_separator(scope_id_separator),
+ +
2617 {
+
2618 memset(&value, 0, sizeof(value));
+
2619 }
+
2620
+
2621 virtual bool match(
+
2622 _In_reads_or_z_(end) const T* text,
+
2623 _In_ size_t start = 0,
+
2624 _In_ size_t end = (size_t)-1,
+
2625 _In_ int flags = match_default)
+
2626 {
+
2627 assert(text || start >= end);
+
2628 this->interval.end = start;
+
2629 memset(&value, 0, sizeof(value));
+
2630
+
2631 size_t i, compaction_i = (size_t)-1, compaction_start = start;
+
2632 for (i = 0; i < 8; i++) {
+
2633 bool is_empty = true;
+
2634
+
2635 if (m_separator->match(text, this->interval.end, end, flags)) {
+
2636 if (m_separator->match(text, m_separator->interval.end, end, flags)) {
+
2637 // :: found
+
2638 if (compaction_i == (size_t)-1) {
+
2639 // Zero compaction start
+
2640 compaction_i = i;
+
2641 compaction_start = m_separator->interval.start;
+
2642 this->interval.end = m_separator->interval.end;
+
2643 }
+
2644 else {
+
2645 // More than one zero compaction
+
2646 break;
+
2647 }
2648 }
-
2649 }
-
2650 else if (i) {
-
2651 // : missing
-
2652 break;
-
2653 }
-
2654
-
2655 components[i].start = this->interval.end;
-
2656 size_t x;
-
2657 for (x = 0; this->interval.end < end && text[this->interval.end];) {
-
2658 size_t dig, digit_end;
-
2659 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; digit_end = m_digit_0->interval.end; }
-
2660 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; digit_end = m_digit_1->interval.end; }
-
2661 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; digit_end = m_digit_2->interval.end; }
-
2662 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; digit_end = m_digit_3->interval.end; }
-
2663 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; digit_end = m_digit_4->interval.end; }
-
2664 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; digit_end = m_digit_5->interval.end; }
-
2665 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; digit_end = m_digit_6->interval.end; }
-
2666 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; digit_end = m_digit_7->interval.end; }
-
2667 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; digit_end = m_digit_8->interval.end; }
-
2668 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; digit_end = m_digit_9->interval.end; }
-
2669 else if (m_digit_10->match(text, this->interval.end, end, flags)) { dig = 10; digit_end = m_digit_10->interval.end; }
-
2670 else if (m_digit_11->match(text, this->interval.end, end, flags)) { dig = 11; digit_end = m_digit_11->interval.end; }
-
2671 else if (m_digit_12->match(text, this->interval.end, end, flags)) { dig = 12; digit_end = m_digit_12->interval.end; }
-
2672 else if (m_digit_13->match(text, this->interval.end, end, flags)) { dig = 13; digit_end = m_digit_13->interval.end; }
-
2673 else if (m_digit_14->match(text, this->interval.end, end, flags)) { dig = 14; digit_end = m_digit_14->interval.end; }
-
2674 else if (m_digit_15->match(text, this->interval.end, end, flags)) { dig = 15; digit_end = m_digit_15->interval.end; }
-
2675 else break;
-
2676 size_t x_n = x * 16 + dig;
-
2677 if (x_n <= 0xffff) {
-
2678 x = x_n;
-
2679 this->interval.end = digit_end;
-
2680 is_empty = false;
-
2681 }
-
2682 else
-
2683 break;
-
2684 }
-
2685 if (is_empty) {
-
2686 if (compaction_i != (size_t)-1) {
-
2687 // Zero compaction active: no sweat.
-
2688 break;
+
2649 else if (i) {
+
2650 // Inner : found
+
2651 this->interval.end = m_separator->interval.end;
+
2652 }
+
2653 else {
+
2654 // Leading : found
+
2655 goto error;
+
2656 }
+
2657 }
+
2658 else if (i) {
+
2659 // : missing
+
2660 break;
+
2661 }
+
2662
+
2663 components[i].start = this->interval.end;
+
2664 size_t x;
+
2665 for (x = 0; this->interval.end < end && text[this->interval.end];) {
+
2666 size_t dig, digit_end;
+
2667 if (m_digit_0->match(text, this->interval.end, end, flags)) { dig = 0; digit_end = m_digit_0->interval.end; }
+
2668 else if (m_digit_1->match(text, this->interval.end, end, flags)) { dig = 1; digit_end = m_digit_1->interval.end; }
+
2669 else if (m_digit_2->match(text, this->interval.end, end, flags)) { dig = 2; digit_end = m_digit_2->interval.end; }
+
2670 else if (m_digit_3->match(text, this->interval.end, end, flags)) { dig = 3; digit_end = m_digit_3->interval.end; }
+
2671 else if (m_digit_4->match(text, this->interval.end, end, flags)) { dig = 4; digit_end = m_digit_4->interval.end; }
+
2672 else if (m_digit_5->match(text, this->interval.end, end, flags)) { dig = 5; digit_end = m_digit_5->interval.end; }
+
2673 else if (m_digit_6->match(text, this->interval.end, end, flags)) { dig = 6; digit_end = m_digit_6->interval.end; }
+
2674 else if (m_digit_7->match(text, this->interval.end, end, flags)) { dig = 7; digit_end = m_digit_7->interval.end; }
+
2675 else if (m_digit_8->match(text, this->interval.end, end, flags)) { dig = 8; digit_end = m_digit_8->interval.end; }
+
2676 else if (m_digit_9->match(text, this->interval.end, end, flags)) { dig = 9; digit_end = m_digit_9->interval.end; }
+
2677 else if (m_digit_10->match(text, this->interval.end, end, flags)) { dig = 10; digit_end = m_digit_10->interval.end; }
+
2678 else if (m_digit_11->match(text, this->interval.end, end, flags)) { dig = 11; digit_end = m_digit_11->interval.end; }
+
2679 else if (m_digit_12->match(text, this->interval.end, end, flags)) { dig = 12; digit_end = m_digit_12->interval.end; }
+
2680 else if (m_digit_13->match(text, this->interval.end, end, flags)) { dig = 13; digit_end = m_digit_13->interval.end; }
+
2681 else if (m_digit_14->match(text, this->interval.end, end, flags)) { dig = 14; digit_end = m_digit_14->interval.end; }
+
2682 else if (m_digit_15->match(text, this->interval.end, end, flags)) { dig = 15; digit_end = m_digit_15->interval.end; }
+
2683 else break;
+
2684 size_t x_n = x * 16 + dig;
+
2685 if (x_n <= 0xffff) {
+
2686 x = x_n;
+
2687 this->interval.end = digit_end;
+
2688 is_empty = false;
2689 }
-
2690 goto error;
-
2691 }
-
2692 components[i].end = this->interval.end;
-
2693 this->value.s6_words[i] = (uint16_t)x;
-
2694 }
-
2695
-
2696 if (compaction_i != (size_t)-1) {
-
2697 // Align components right due to zero compaction.
-
2698 size_t j, k;
-
2699 for (j = 8, k = i; k > compaction_i;) {
-
2700 this->value.s6_words[--j] = this->value.s6_words[--k];
- -
2702 }
-
2703 for (; j > compaction_i;) {
-
2704 this->value.s6_words[--j] = 0;
-
2705 components[j].start =
- -
2707 }
-
2708 }
-
2709 else if (i < 8)
-
2710 goto error;
-
2711
-
2712 if (m_scope_id_separator && m_scope_id_separator->match(text, this->interval.end, end, flags) &&
-
2713 scope_id && scope_id->match(text, m_scope_id_separator->interval.end, end, flags))
-
2714 this->interval.end = scope_id->interval.end;
-
2715 else if (scope_id)
-
2716 scope_id->invalidate();
-
2717
-
2718 this->interval.start = start;
-
2719 return true;
-
2720
-
2721 error:
-
2722 components[0].start = 1;
-
2723 components[0].end = 0;
-
2724 components[1].start = 1;
-
2725 components[1].end = 0;
-
2726 components[2].start = 1;
-
2727 components[2].end = 0;
-
2728 components[3].start = 1;
-
2729 components[3].end = 0;
-
2730 components[4].start = 1;
-
2731 components[4].end = 0;
-
2732 components[5].start = 1;
-
2733 components[5].end = 0;
-
2734 components[6].start = 1;
-
2735 components[6].end = 0;
-
2736 components[7].start = 1;
-
2737 components[7].end = 0;
-
2738 memset(&value, 0, sizeof(value));
-
2739 if (scope_id) scope_id->invalidate();
-
2740 this->interval.start = (this->interval.end = start) + 1;
-
2741 return false;
-
2742 }
-
2743
-
2744 virtual void invalidate()
-
2745 {
-
2746 components[0].start = 1;
-
2747 components[0].end = 0;
-
2748 components[1].start = 1;
-
2749 components[1].end = 0;
-
2750 components[2].start = 1;
-
2751 components[2].end = 0;
-
2752 components[3].start = 1;
-
2753 components[3].end = 0;
-
2754 components[4].start = 1;
-
2755 components[4].end = 0;
-
2756 components[5].start = 1;
-
2757 components[5].end = 0;
-
2758 components[6].start = 1;
-
2759 components[6].end = 0;
-
2760 components[7].start = 1;
-
2761 components[7].end = 0;
-
2762 memset(&value, 0, sizeof(value));
-
2763 if (scope_id) scope_id->invalidate();
- -
2765 }
-
2766
-
2767 public:
- - -
2770 std::shared_ptr<basic_parser<T>> scope_id;
-
2771
-
2772 protected:
-
2773 std::shared_ptr<basic_parser<T>>
-
2774 m_digit_0,
-
2775 m_digit_1,
-
2776 m_digit_2,
-
2777 m_digit_3,
-
2778 m_digit_4,
-
2779 m_digit_5,
-
2780 m_digit_6,
-
2781 m_digit_7,
-
2782 m_digit_8,
-
2783 m_digit_9,
-
2784 m_digit_10,
-
2785 m_digit_11,
-
2786 m_digit_12,
-
2787 m_digit_13,
-
2788 m_digit_14,
-
2789 m_digit_15;
-
2790 std::shared_ptr<basic_parser<T>> m_separator, m_scope_id_separator;
-
2791 };
+
2690 else
+
2691 break;
+
2692 }
+
2693 if (is_empty) {
+
2694 if (compaction_i != (size_t)-1) {
+
2695 // Zero compaction active: no sweat.
+
2696 break;
+
2697 }
+
2698 goto error;
+
2699 }
+
2700 components[i].end = this->interval.end;
+
2701 this->value.s6_words[i] = (uint16_t)x;
+
2702 }
+
2703
+
2704 if (compaction_i != (size_t)-1) {
+
2705 // Align components right due to zero compaction.
+
2706 size_t j, k;
+
2707 for (j = 8, k = i; k > compaction_i;) {
+
2708 this->value.s6_words[--j] = this->value.s6_words[--k];
+ +
2710 }
+
2711 for (; j > compaction_i;) {
+
2712 this->value.s6_words[--j] = 0;
+
2713 components[j].start =
+ +
2715 }
+
2716 }
+
2717 else if (i < 8)
+
2718 goto error;
+
2719
+
2720 if (m_scope_id_separator && m_scope_id_separator->match(text, this->interval.end, end, flags) &&
+
2721 scope_id && scope_id->match(text, m_scope_id_separator->interval.end, end, flags))
+
2722 this->interval.end = scope_id->interval.end;
+
2723 else if (scope_id)
+
2724 scope_id->invalidate();
+
2725
+
2726 this->interval.start = start;
+
2727 return true;
+
2728
+
2729 error:
+
2730 components[0].start = 1;
+
2731 components[0].end = 0;
+
2732 components[1].start = 1;
+
2733 components[1].end = 0;
+
2734 components[2].start = 1;
+
2735 components[2].end = 0;
+
2736 components[3].start = 1;
+
2737 components[3].end = 0;
+
2738 components[4].start = 1;
+
2739 components[4].end = 0;
+
2740 components[5].start = 1;
+
2741 components[5].end = 0;
+
2742 components[6].start = 1;
+
2743 components[6].end = 0;
+
2744 components[7].start = 1;
+
2745 components[7].end = 0;
+
2746 memset(&value, 0, sizeof(value));
+
2747 if (scope_id) scope_id->invalidate();
+
2748 this->interval.start = (this->interval.end = start) + 1;
+
2749 return false;
+
2750 }
+
2751
+
2752 virtual void invalidate()
+
2753 {
+
2754 components[0].start = 1;
+
2755 components[0].end = 0;
+
2756 components[1].start = 1;
+
2757 components[1].end = 0;
+
2758 components[2].start = 1;
+
2759 components[2].end = 0;
+
2760 components[3].start = 1;
+
2761 components[3].end = 0;
+
2762 components[4].start = 1;
+
2763 components[4].end = 0;
+
2764 components[5].start = 1;
+
2765 components[5].end = 0;
+
2766 components[6].start = 1;
+
2767 components[6].end = 0;
+
2768 components[7].start = 1;
+
2769 components[7].end = 0;
+
2770 memset(&value, 0, sizeof(value));
+
2771 if (scope_id) scope_id->invalidate();
+ +
2773 }
+
2774
+
2775 public:
+ + +
2778 std::shared_ptr<basic_parser<T>> scope_id;
+
2779
+
2780 protected:
+
2781 std::shared_ptr<basic_parser<T>>
+
2782 m_digit_0,
+
2783 m_digit_1,
+
2784 m_digit_2,
+
2785 m_digit_3,
+
2786 m_digit_4,
+
2787 m_digit_5,
+
2788 m_digit_6,
+
2789 m_digit_7,
+
2790 m_digit_8,
+
2791 m_digit_9,
+
2792 m_digit_10,
+
2793 m_digit_11,
+
2794 m_digit_12,
+
2795 m_digit_13,
+
2796 m_digit_14,
+
2797 m_digit_15;
+
2798 std::shared_ptr<basic_parser<T>> m_separator, m_scope_id_separator;
+
2799 };
-
2792
- - -
2795#ifdef _UNICODE
- -
2797#else
- -
2799#endif
- -
2801
-
2805 template <class T>
-
- -
2807 {
-
2808 public:
- -
2810 _In_ bool allow_idn,
-
2811 _In_ const std::locale& locale = std::locale()) :
-
2812 basic_parser<T>(locale),
-
2813 m_allow_idn(allow_idn),
-
2814 allow_on_edge(true)
-
2815 {}
-
2816
-
2817 virtual bool match(
-
2818 _In_reads_or_z_(end) const T* text,
-
2819 _In_ size_t start = 0,
-
2820 _In_ size_t end = (size_t)-1,
-
2821 _In_ int flags = match_default)
-
2822 {
-
2823 assert(text || start >= end);
-
2824 if (start < end && text[start]) {
-
2825 if (('A' <= text[start] && text[start] <= 'Z') ||
-
2826 ('a' <= text[start] && text[start] <= 'z') ||
-
2827 ('0' <= text[start] && text[start] <= '9'))
-
2828 allow_on_edge = true;
-
2829 else if (text[start] == '-')
-
2830 allow_on_edge = false;
-
2831 else if (m_allow_idn && std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
-
2832 allow_on_edge = true;
-
2833 else {
-
2834 this->interval.start = (this->interval.end = start) + 1;
-
2835 return false;
-
2836 }
-
2837 this->interval.end = (this->interval.start = start) + 1;
-
2838 return true;
-
2839 }
-
2840 this->interval.start = (this->interval.end = start) + 1;
-
2841 return false;
-
2842 }
-
2843
-
2844 public:
- -
2846
-
2847 protected:
-
2848 bool m_allow_idn;
-
2849 };
+
2800
+ + +
2803#ifdef _UNICODE
+ +
2805#else
+ +
2807#endif
+ +
2809
+
2813 template <class T>
+
+ +
2815 {
+
2816 public:
+ +
2818 _In_ bool allow_idn,
+
2819 _In_ const std::locale& locale = std::locale()) :
+
2820 basic_parser<T>(locale),
+
2821 m_allow_idn(allow_idn),
+
2822 allow_on_edge(true)
+
2823 {}
+
2824
+
2825 virtual bool match(
+
2826 _In_reads_or_z_(end) const T* text,
+
2827 _In_ size_t start = 0,
+
2828 _In_ size_t end = (size_t)-1,
+
2829 _In_ int flags = match_default)
+
2830 {
+
2831 assert(text || start >= end);
+
2832 if (start < end && text[start]) {
+
2833 if (('A' <= text[start] && text[start] <= 'Z') ||
+
2834 ('a' <= text[start] && text[start] <= 'z') ||
+
2835 ('0' <= text[start] && text[start] <= '9'))
+
2836 allow_on_edge = true;
+
2837 else if (text[start] == '-')
+
2838 allow_on_edge = false;
+
2839 else if (m_allow_idn && std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
+
2840 allow_on_edge = true;
+
2841 else {
+
2842 this->interval.start = (this->interval.end = start) + 1;
+
2843 return false;
+
2844 }
+
2845 this->interval.end = (this->interval.start = start) + 1;
+
2846 return true;
+
2847 }
+
2848 this->interval.start = (this->interval.end = start) + 1;
+
2849 return false;
+
2850 }
+
2851
+
2852 public:
+ +
2854
+
2855 protected:
+
2856 bool m_allow_idn;
+
2857 };
-
2850
- - -
2853#ifdef _UNICODE
- -
2855#else
- -
2857#endif
2858
-
- -
2863 {
-
2864 public:
- -
2866 _In_ bool allow_idn,
-
2867 _In_ const std::locale& locale = std::locale()) :
- -
2869 {}
-
2870
-
2871 virtual bool match(
-
2872 _In_reads_or_z_(end) const char* text,
-
2873 _In_ size_t start = 0,
-
2874 _In_ size_t end = (size_t)-1,
-
2875 _In_ int flags = match_default)
-
2876 {
-
2877 assert(text || start >= end);
-
2878 if (start < end && text[start]) {
-
2879 wchar_t buf[3];
-
2880 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
2881 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
2882 if ((('A' <= chr[0] && chr[0] <= 'Z') ||
-
2883 ('a' <= chr[0] && chr[0] <= 'z') ||
-
2884 ('0' <= chr[0] && chr[0] <= '9')) && chr[1] == 0)
-
2885 allow_on_edge = true;
-
2886 else if (chr[0] == '-' && chr[1] == 0)
-
2887 allow_on_edge = false;
-
2888 else if (m_allow_idn && std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
-
2889 allow_on_edge = true;
-
2890 else {
-
2891 this->interval.start = (this->interval.end = start) + 1;
-
2892 return false;
-
2893 }
-
2894 this->interval.start = start;
-
2895 return true;
-
2896 }
-
2897 this->interval.start = (this->interval.end = start) + 1;
-
2898 return false;
-
2899 }
-
2900 };
+ + +
2861#ifdef _UNICODE
+ +
2863#else
+ +
2865#endif
+
2866
+
+ +
2871 {
+
2872 public:
+ +
2874 _In_ bool allow_idn,
+
2875 _In_ const std::locale& locale = std::locale()) :
+ +
2877 {}
+
2878
+
2879 virtual bool match(
+
2880 _In_reads_or_z_(end) const char* text,
+
2881 _In_ size_t start = 0,
+
2882 _In_ size_t end = (size_t)-1,
+
2883 _In_ int flags = match_default)
+
2884 {
+
2885 assert(text || start >= end);
+
2886 if (start < end && text[start]) {
+
2887 wchar_t buf[3];
+
2888 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
2889 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
2890 if ((('A' <= chr[0] && chr[0] <= 'Z') ||
+
2891 ('a' <= chr[0] && chr[0] <= 'z') ||
+
2892 ('0' <= chr[0] && chr[0] <= '9')) && chr[1] == 0)
+
2893 allow_on_edge = true;
+
2894 else if (chr[0] == '-' && chr[1] == 0)
+
2895 allow_on_edge = false;
+
2896 else if (m_allow_idn && std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
+
2897 allow_on_edge = true;
+
2898 else {
+
2899 this->interval.start = (this->interval.end = start) + 1;
+
2900 return false;
+
2901 }
+
2902 this->interval.start = start;
+
2903 return true;
+
2904 }
+
2905 this->interval.start = (this->interval.end = start) + 1;
+
2906 return false;
+
2907 }
+
2908 };
-
2901
-
2905 template <class T>
-
- -
2907 {
-
2908 public:
- -
2910 _In_ bool allow_absolute,
-
2911 _In_ const std::shared_ptr<basic_dns_domain_char<T>>& domain_char,
-
2912 _In_ const std::shared_ptr<basic_parser<T>>& separator,
-
2913 _In_ const std::locale& locale = std::locale()) :
-
2914 basic_parser<T>(locale),
- -
2916 m_domain_char(domain_char),
-
2917 m_separator(separator)
-
2918 {}
-
2919
-
2920 virtual bool match(
-
2921 _In_reads_or_z_(end) const T* text,
-
2922 _In_ size_t start = 0,
-
2923 _In_ size_t end = (size_t)-1,
-
2924 _In_ int flags = match_default)
-
2925 {
-
2926 assert(text || start >= end);
-
2927 size_t i = start, count;
-
2928 for (count = 0; i < end && text[i] && count < 127; count++) {
-
2929 if (m_domain_char->match(text, i, end, flags) &&
-
2930 m_domain_char->allow_on_edge)
-
2931 {
-
2932 // Domain start
-
2933 this->interval.end = i = m_domain_char->interval.end;
-
2934 while (i < end && text[i]) {
-
2935 if (m_domain_char->allow_on_edge &&
-
2936 m_separator->match(text, i, end, flags))
-
2937 {
-
2938 // Domain end
-
2939 if (m_allow_absolute)
-
2940 this->interval.end = i = m_separator->interval.end;
-
2941 else {
-
2942 this->interval.end = i;
-
2943 i = m_separator->interval.end;
-
2944 }
-
2945 break;
-
2946 }
-
2947 if (m_domain_char->match(text, i, end, flags)) {
-
2948 if (m_domain_char->allow_on_edge)
-
2949 this->interval.end = i = m_domain_char->interval.end;
-
2950 else
-
2951 i = m_domain_char->interval.end;
-
2952 }
-
2953 else {
-
2954 this->interval.start = start;
-
2955 return true;
-
2956 }
-
2957 }
-
2958 }
-
2959 else
-
2960 break;
-
2961 }
-
2962 if (count) {
-
2963 this->interval.start = start;
-
2964 return true;
-
2965 }
-
2966 this->interval.start = (this->interval.end = start) + 1;
-
2967 return false;
-
2968 }
-
2969
-
2970 protected:
- -
2972 std::shared_ptr<basic_dns_domain_char<T>> m_domain_char;
-
2973 std::shared_ptr<basic_parser<T>> m_separator;
-
2974 };
+
2909
+
2913 template <class T>
+
+ +
2915 {
+
2916 public:
+ +
2918 _In_ bool allow_absolute,
+
2919 _In_ const std::shared_ptr<basic_dns_domain_char<T>>& domain_char,
+
2920 _In_ const std::shared_ptr<basic_parser<T>>& separator,
+
2921 _In_ const std::locale& locale = std::locale()) :
+
2922 basic_parser<T>(locale),
+ +
2924 m_domain_char(domain_char),
+
2925 m_separator(separator)
+
2926 {}
+
2927
+
2928 virtual bool match(
+
2929 _In_reads_or_z_(end) const T* text,
+
2930 _In_ size_t start = 0,
+
2931 _In_ size_t end = (size_t)-1,
+
2932 _In_ int flags = match_default)
+
2933 {
+
2934 assert(text || start >= end);
+
2935 size_t i = start, count;
+
2936 for (count = 0; i < end && text[i] && count < 127; count++) {
+
2937 if (m_domain_char->match(text, i, end, flags) &&
+
2938 m_domain_char->allow_on_edge)
+
2939 {
+
2940 // Domain start
+
2941 this->interval.end = i = m_domain_char->interval.end;
+
2942 while (i < end && text[i]) {
+
2943 if (m_domain_char->allow_on_edge &&
+
2944 m_separator->match(text, i, end, flags))
+
2945 {
+
2946 // Domain end
+
2947 if (m_allow_absolute)
+
2948 this->interval.end = i = m_separator->interval.end;
+
2949 else {
+
2950 this->interval.end = i;
+
2951 i = m_separator->interval.end;
+
2952 }
+
2953 break;
+
2954 }
+
2955 if (m_domain_char->match(text, i, end, flags)) {
+
2956 if (m_domain_char->allow_on_edge)
+
2957 this->interval.end = i = m_domain_char->interval.end;
+
2958 else
+
2959 i = m_domain_char->interval.end;
+
2960 }
+
2961 else {
+
2962 this->interval.start = start;
+
2963 return true;
+
2964 }
+
2965 }
+
2966 }
+
2967 else
+
2968 break;
+
2969 }
+
2970 if (count) {
+
2971 this->interval.start = start;
+
2972 return true;
+
2973 }
+
2974 this->interval.start = (this->interval.end = start) + 1;
+
2975 return false;
+
2976 }
+
2977
+
2978 protected:
+ +
2980 std::shared_ptr<basic_dns_domain_char<T>> m_domain_char;
+
2981 std::shared_ptr<basic_parser<T>> m_separator;
+
2982 };
-
2975
- - -
2978#ifdef _UNICODE
-
2979 using tdns_name = wdns_name;
-
2980#else
-
2981 using tdns_name = dns_name;
-
2982#endif
- -
2984
-
2988 template <class T>
-
- -
2990 {
-
2991 public:
-
2992 basic_url_username_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
2993
-
2994 virtual bool match(
-
2995 _In_reads_or_z_(end) const T* text,
-
2996 _In_ size_t start = 0,
-
2997 _In_ size_t end = (size_t)-1,
-
2998 _In_ int flags = match_default)
-
2999 {
-
3000 assert(text || start >= end);
-
3001 if (start < end && text[start]) {
-
3002 if (text[start] == '-' ||
-
3003 text[start] == '.' ||
-
3004 text[start] == '_' ||
-
3005 text[start] == '~' ||
-
3006 text[start] == '%' ||
-
3007 text[start] == '!' ||
-
3008 text[start] == '$' ||
-
3009 text[start] == '&' ||
-
3010 text[start] == '\'' ||
-
3011 //text[start] == '(' ||
-
3012 //text[start] == ')' ||
-
3013 text[start] == '*' ||
-
3014 text[start] == '+' ||
-
3015 text[start] == ',' ||
-
3016 text[start] == ';' ||
-
3017 text[start] == '=' ||
-
3018 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
-
3019 {
-
3020 this->interval.end = (this->interval.start = start) + 1;
-
3021 return true;
-
3022 }
-
3023 }
-
3024 this->interval.start = (this->interval.end = start) + 1;
-
3025 return false;
-
3026 }
-
3027 };
+
2983
+ + +
2986#ifdef _UNICODE
+
2987 using tdns_name = wdns_name;
+
2988#else
+
2989 using tdns_name = dns_name;
+
2990#endif
+ +
2992
+
2996 template <class T>
+
+ +
2998 {
+
2999 public:
+
3000 basic_url_username_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
3001
+
3002 virtual bool match(
+
3003 _In_reads_or_z_(end) const T* text,
+
3004 _In_ size_t start = 0,
+
3005 _In_ size_t end = (size_t)-1,
+
3006 _In_ int flags = match_default)
+
3007 {
+
3008 assert(text || start >= end);
+
3009 if (start < end && text[start]) {
+
3010 if (text[start] == '-' ||
+
3011 text[start] == '.' ||
+
3012 text[start] == '_' ||
+
3013 text[start] == '~' ||
+
3014 text[start] == '%' ||
+
3015 text[start] == '!' ||
+
3016 text[start] == '$' ||
+
3017 text[start] == '&' ||
+
3018 text[start] == '\'' ||
+
3019 //text[start] == '(' ||
+
3020 //text[start] == ')' ||
+
3021 text[start] == '*' ||
+
3022 text[start] == '+' ||
+
3023 text[start] == ',' ||
+
3024 text[start] == ';' ||
+
3025 text[start] == '=' ||
+
3026 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
+
3027 {
+
3028 this->interval.end = (this->interval.start = start) + 1;
+
3029 return true;
+
3030 }
+
3031 }
+
3032 this->interval.start = (this->interval.end = start) + 1;
+
3033 return false;
+
3034 }
+
3035 };
-
3028
- - -
3031#ifdef _UNICODE
- -
3033#else
- -
3035#endif
3036
-
- -
3041 {
-
3042 public:
-
3043 sgml_url_username_char(_In_ const std::locale& locale = std::locale()) : basic_url_username_char<char>(locale) {}
+ + +
3039#ifdef _UNICODE
+ +
3041#else
+ +
3043#endif
3044
-
3045 virtual bool match(
-
3046 _In_reads_or_z_(end) const char* text,
-
3047 _In_ size_t start = 0,
-
3048 _In_ size_t end = (size_t)-1,
-
3049 _In_ int flags = match_default)
-
3050 {
-
3051 assert(text || start >= end);
-
3052 if (start < end && text[start]) {
-
3053 wchar_t buf[3];
-
3054 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
3055 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
3056 if (((chr[0] == L'-' ||
-
3057 chr[0] == L'.' ||
-
3058 chr[0] == L'_' ||
-
3059 chr[0] == L'~' ||
-
3060 chr[0] == L'%' ||
-
3061 chr[0] == L'!' ||
-
3062 chr[0] == L'$' ||
-
3063 chr[0] == L'&' ||
-
3064 chr[0] == L'\'' ||
-
3065 //chr[0] == L'(' ||
-
3066 //chr[0] == L')' ||
-
3067 chr[0] == L'*' ||
-
3068 chr[0] == L'+' ||
-
3069 chr[0] == L',' ||
-
3070 chr[0] == L';' ||
-
3071 chr[0] == L'=') && chr[1] == 0) ||
-
3072 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
-
3073 {
-
3074 this->interval.start = start;
-
3075 return true;
-
3076 }
-
3077 }
-
3078
-
3079 this->interval.start = (this->interval.end = start) + 1;
-
3080 return false;
-
3081 }
-
3082 };
+
+ +
3049 {
+
3050 public:
+
3051 sgml_url_username_char(_In_ const std::locale& locale = std::locale()) : basic_url_username_char<char>(locale) {}
+
3052
+
3053 virtual bool match(
+
3054 _In_reads_or_z_(end) const char* text,
+
3055 _In_ size_t start = 0,
+
3056 _In_ size_t end = (size_t)-1,
+
3057 _In_ int flags = match_default)
+
3058 {
+
3059 assert(text || start >= end);
+
3060 if (start < end && text[start]) {
+
3061 wchar_t buf[3];
+
3062 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
3063 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
3064 if (((chr[0] == L'-' ||
+
3065 chr[0] == L'.' ||
+
3066 chr[0] == L'_' ||
+
3067 chr[0] == L'~' ||
+
3068 chr[0] == L'%' ||
+
3069 chr[0] == L'!' ||
+
3070 chr[0] == L'$' ||
+
3071 chr[0] == L'&' ||
+
3072 chr[0] == L'\'' ||
+
3073 //chr[0] == L'(' ||
+
3074 //chr[0] == L')' ||
+
3075 chr[0] == L'*' ||
+
3076 chr[0] == L'+' ||
+
3077 chr[0] == L',' ||
+
3078 chr[0] == L';' ||
+
3079 chr[0] == L'=') && chr[1] == 0) ||
+
3080 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
+
3081 {
+
3082 this->interval.start = start;
+
3083 return true;
+
3084 }
+
3085 }
+
3086
+
3087 this->interval.start = (this->interval.end = start) + 1;
+
3088 return false;
+
3089 }
+
3090 };
-
3083
-
3087 template <class T>
-
- -
3089 {
-
3090 public:
-
3091 basic_url_password_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
3092
-
3093 virtual bool match(
-
3094 _In_reads_or_z_(end) const T* text,
-
3095 _In_ size_t start = 0,
-
3096 _In_ size_t end = (size_t)-1,
-
3097 _In_ int flags = match_default)
-
3098 {
-
3099 assert(text || start >= end);
-
3100 if (start < end && text[start]) {
-
3101 if (text[start] == '-' ||
-
3102 text[start] == '.' ||
-
3103 text[start] == '_' ||
-
3104 text[start] == '~' ||
-
3105 text[start] == '%' ||
-
3106 text[start] == '!' ||
-
3107 text[start] == '$' ||
-
3108 text[start] == '&' ||
-
3109 text[start] == '\'' ||
-
3110 text[start] == '(' ||
-
3111 text[start] == ')' ||
-
3112 text[start] == '*' ||
-
3113 text[start] == '+' ||
-
3114 text[start] == ',' ||
-
3115 text[start] == ';' ||
-
3116 text[start] == '=' ||
-
3117 text[start] == ':' ||
-
3118 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
-
3119 {
-
3120 this->interval.end = (this->interval.start = start) + 1;
-
3121 return true;
-
3122 }
-
3123 }
-
3124 this->interval.start = (this->interval.end = start) + 1;
-
3125 return false;
-
3126 }
-
3127 };
+
3091
+
3095 template <class T>
+
+ +
3097 {
+
3098 public:
+
3099 basic_url_password_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
3100
+
3101 virtual bool match(
+
3102 _In_reads_or_z_(end) const T* text,
+
3103 _In_ size_t start = 0,
+
3104 _In_ size_t end = (size_t)-1,
+
3105 _In_ int flags = match_default)
+
3106 {
+
3107 assert(text || start >= end);
+
3108 if (start < end && text[start]) {
+
3109 if (text[start] == '-' ||
+
3110 text[start] == '.' ||
+
3111 text[start] == '_' ||
+
3112 text[start] == '~' ||
+
3113 text[start] == '%' ||
+
3114 text[start] == '!' ||
+
3115 text[start] == '$' ||
+
3116 text[start] == '&' ||
+
3117 text[start] == '\'' ||
+
3118 text[start] == '(' ||
+
3119 text[start] == ')' ||
+
3120 text[start] == '*' ||
+
3121 text[start] == '+' ||
+
3122 text[start] == ',' ||
+
3123 text[start] == ';' ||
+
3124 text[start] == '=' ||
+
3125 text[start] == ':' ||
+
3126 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
+
3127 {
+
3128 this->interval.end = (this->interval.start = start) + 1;
+
3129 return true;
+
3130 }
+
3131 }
+
3132 this->interval.start = (this->interval.end = start) + 1;
+
3133 return false;
+
3134 }
+
3135 };
-
3128
- - -
3131#ifdef _UNICODE
- -
3133#else
- -
3135#endif
3136
-
- -
3141 {
-
3142 public:
-
3143 sgml_url_password_char(_In_ const std::locale& locale = std::locale()) : basic_url_password_char<char>(locale) {}
+ + +
3139#ifdef _UNICODE
+ +
3141#else
+ +
3143#endif
3144
-
3145 virtual bool match(
-
3146 _In_reads_or_z_(end) const char* text,
-
3147 _In_ size_t start = 0,
-
3148 _In_ size_t end = (size_t)-1,
-
3149 _In_ int flags = match_default)
-
3150 {
-
3151 assert(text || start >= end);
-
3152 if (start < end && text[start]) {
-
3153 wchar_t buf[3];
-
3154 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
3155 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
3156 if (((chr[0] == L'-' ||
-
3157 chr[0] == L'.' ||
-
3158 chr[0] == L'_' ||
-
3159 chr[0] == L'~' ||
-
3160 chr[0] == L'%' ||
-
3161 chr[0] == L'!' ||
-
3162 chr[0] == L'$' ||
-
3163 chr[0] == L'&' ||
-
3164 chr[0] == L'\'' ||
-
3165 chr[0] == L'(' ||
-
3166 chr[0] == L')' ||
-
3167 chr[0] == L'*' ||
-
3168 chr[0] == L'+' ||
-
3169 chr[0] == L',' ||
-
3170 chr[0] == L';' ||
-
3171 chr[0] == L'=' ||
-
3172 chr[0] == L':') && chr[1] == 0) ||
-
3173 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
-
3174 {
-
3175 this->interval.start = start;
-
3176 return true;
-
3177 }
-
3178 }
-
3179 this->interval.start = (this->interval.end = start) + 1;
-
3180 return false;
-
3181 }
-
3182 };
+
+ +
3149 {
+
3150 public:
+
3151 sgml_url_password_char(_In_ const std::locale& locale = std::locale()) : basic_url_password_char<char>(locale) {}
+
3152
+
3153 virtual bool match(
+
3154 _In_reads_or_z_(end) const char* text,
+
3155 _In_ size_t start = 0,
+
3156 _In_ size_t end = (size_t)-1,
+
3157 _In_ int flags = match_default)
+
3158 {
+
3159 assert(text || start >= end);
+
3160 if (start < end && text[start]) {
+
3161 wchar_t buf[3];
+
3162 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
3163 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
3164 if (((chr[0] == L'-' ||
+
3165 chr[0] == L'.' ||
+
3166 chr[0] == L'_' ||
+
3167 chr[0] == L'~' ||
+
3168 chr[0] == L'%' ||
+
3169 chr[0] == L'!' ||
+
3170 chr[0] == L'$' ||
+
3171 chr[0] == L'&' ||
+
3172 chr[0] == L'\'' ||
+
3173 chr[0] == L'(' ||
+
3174 chr[0] == L')' ||
+
3175 chr[0] == L'*' ||
+
3176 chr[0] == L'+' ||
+
3177 chr[0] == L',' ||
+
3178 chr[0] == L';' ||
+
3179 chr[0] == L'=' ||
+
3180 chr[0] == L':') && chr[1] == 0) ||
+
3181 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
+
3182 {
+
3183 this->interval.start = start;
+
3184 return true;
+
3185 }
+
3186 }
+
3187 this->interval.start = (this->interval.end = start) + 1;
+
3188 return false;
+
3189 }
+
3190 };
-
3183
-
3187 template <class T>
-
- -
3189 {
-
3190 public:
-
3191 basic_url_path_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
3192
-
3193 virtual bool match(
-
3194 _In_reads_or_z_(end) const T* text,
-
3195 _In_ size_t start = 0,
-
3196 _In_ size_t end = (size_t)-1,
-
3197 _In_ int flags = match_default)
-
3198 {
-
3199 assert(text || start >= end);
-
3200 if (start < end && text[start]) {
-
3201 if (text[start] == '/' ||
-
3202 text[start] == '-' ||
-
3203 text[start] == '.' ||
-
3204 text[start] == '_' ||
-
3205 text[start] == '~' ||
-
3206 text[start] == '%' ||
-
3207 text[start] == '!' ||
-
3208 text[start] == '$' ||
-
3209 text[start] == '&' ||
-
3210 text[start] == '\'' ||
-
3211 text[start] == '(' ||
-
3212 text[start] == ')' ||
-
3213 text[start] == '*' ||
-
3214 text[start] == '+' ||
-
3215 text[start] == ',' ||
-
3216 text[start] == ';' ||
-
3217 text[start] == '=' ||
-
3218 text[start] == ':' ||
-
3219 text[start] == '@' ||
-
3220 text[start] == '?' ||
-
3221 text[start] == '#' ||
-
3222 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
-
3223 {
-
3224 this->interval.end = (this->interval.start = start) + 1;
-
3225 return true;
-
3226 }
-
3227 }
-
3228 this->interval.start = (this->interval.end = start) + 1;
-
3229 return false;
-
3230 }
-
3231 };
+
3191
+
3195 template <class T>
+
+ +
3197 {
+
3198 public:
+
3199 basic_url_path_char(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
3200
+
3201 virtual bool match(
+
3202 _In_reads_or_z_(end) const T* text,
+
3203 _In_ size_t start = 0,
+
3204 _In_ size_t end = (size_t)-1,
+
3205 _In_ int flags = match_default)
+
3206 {
+
3207 assert(text || start >= end);
+
3208 if (start < end && text[start]) {
+
3209 if (text[start] == '/' ||
+
3210 text[start] == '-' ||
+
3211 text[start] == '.' ||
+
3212 text[start] == '_' ||
+
3213 text[start] == '~' ||
+
3214 text[start] == '%' ||
+
3215 text[start] == '!' ||
+
3216 text[start] == '$' ||
+
3217 text[start] == '&' ||
+
3218 text[start] == '\'' ||
+
3219 text[start] == '(' ||
+
3220 text[start] == ')' ||
+
3221 text[start] == '*' ||
+
3222 text[start] == '+' ||
+
3223 text[start] == ',' ||
+
3224 text[start] == ';' ||
+
3225 text[start] == '=' ||
+
3226 text[start] == ':' ||
+
3227 text[start] == '@' ||
+
3228 text[start] == '?' ||
+
3229 text[start] == '#' ||
+
3230 std::use_facet<std::ctype<T>>(this->m_locale).is(std::ctype_base::alnum, text[start]))
+
3231 {
+
3232 this->interval.end = (this->interval.start = start) + 1;
+
3233 return true;
+
3234 }
+
3235 }
+
3236 this->interval.start = (this->interval.end = start) + 1;
+
3237 return false;
+
3238 }
+
3239 };
-
3232
- - -
3235#ifdef _UNICODE
- -
3237#else
- -
3239#endif
3240
-
- -
3245 {
-
3246 public:
-
3247 sgml_url_path_char(_In_ const std::locale& locale = std::locale()) : basic_url_path_char<char>(locale) {}
+ + +
3243#ifdef _UNICODE
+ +
3245#else
+ +
3247#endif
3248
-
3249 virtual bool match(
-
3250 _In_reads_or_z_(end) const char* text,
-
3251 _In_ size_t start = 0,
-
3252 _In_ size_t end = (size_t)-1,
-
3253 _In_ int flags = match_default)
-
3254 {
-
3255 assert(text || start >= end);
-
3256 if (start < end && text[start]) {
-
3257 wchar_t buf[3];
-
3258 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
-
3259 const wchar_t* chr_end = chr + stdex::strlen(chr);
-
3260 if (((chr[0] == L'/' ||
-
3261 chr[0] == L'-' ||
-
3262 chr[0] == L'.' ||
-
3263 chr[0] == L'_' ||
-
3264 chr[0] == L'~' ||
-
3265 chr[0] == L'%' ||
-
3266 chr[0] == L'!' ||
-
3267 chr[0] == L'$' ||
-
3268 chr[0] == L'&' ||
-
3269 chr[0] == L'\'' ||
-
3270 chr[0] == L'(' ||
-
3271 chr[0] == L')' ||
-
3272 chr[0] == L'*' ||
-
3273 chr[0] == L'+' ||
-
3274 chr[0] == L',' ||
-
3275 chr[0] == L';' ||
-
3276 chr[0] == L'=' ||
-
3277 chr[0] == L':' ||
-
3278 chr[0] == L'@' ||
-
3279 chr[0] == L'?' ||
-
3280 chr[0] == L'#') && chr[1] == 0) ||
-
3281 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
-
3282 {
-
3283 this->interval.start = start;
-
3284 return true;
-
3285 }
-
3286 }
-
3287 this->interval.start = (this->interval.end = start) + 1;
-
3288 return false;
-
3289 }
-
3290 };
+
+ +
3253 {
+
3254 public:
+
3255 sgml_url_path_char(_In_ const std::locale& locale = std::locale()) : basic_url_path_char<char>(locale) {}
+
3256
+
3257 virtual bool match(
+
3258 _In_reads_or_z_(end) const char* text,
+
3259 _In_ size_t start = 0,
+
3260 _In_ size_t end = (size_t)-1,
+
3261 _In_ int flags = match_default)
+
3262 {
+
3263 assert(text || start >= end);
+
3264 if (start < end && text[start]) {
+
3265 wchar_t buf[3];
+
3266 const wchar_t* chr = next_sgml_cp(text, start, end, this->interval.end, buf);
+
3267 const wchar_t* chr_end = chr + stdex::strlen(chr);
+
3268 if (((chr[0] == L'/' ||
+
3269 chr[0] == L'-' ||
+
3270 chr[0] == L'.' ||
+
3271 chr[0] == L'_' ||
+
3272 chr[0] == L'~' ||
+
3273 chr[0] == L'%' ||
+
3274 chr[0] == L'!' ||
+
3275 chr[0] == L'$' ||
+
3276 chr[0] == L'&' ||
+
3277 chr[0] == L'\'' ||
+
3278 chr[0] == L'(' ||
+
3279 chr[0] == L')' ||
+
3280 chr[0] == L'*' ||
+
3281 chr[0] == L'+' ||
+
3282 chr[0] == L',' ||
+
3283 chr[0] == L';' ||
+
3284 chr[0] == L'=' ||
+
3285 chr[0] == L':' ||
+
3286 chr[0] == L'@' ||
+
3287 chr[0] == L'?' ||
+
3288 chr[0] == L'#') && chr[1] == 0) ||
+
3289 std::use_facet<std::ctype<wchar_t>>(m_locale).scan_not(std::ctype_base::alnum, chr, chr_end) == chr_end)
+
3290 {
+
3291 this->interval.start = start;
+
3292 return true;
+
3293 }
+
3294 }
+
3295 this->interval.start = (this->interval.end = start) + 1;
+
3296 return false;
+
3297 }
+
3298 };
-
3291
-
3295 template <class T>
-
- -
3297 {
-
3298 public:
- -
3300 _In_ const std::shared_ptr<basic_parser<T>>& path_char,
-
3301 _In_ const std::shared_ptr<basic_parser<T>>& query_start,
-
3302 _In_ const std::shared_ptr<basic_parser<T>>& bookmark_start,
-
3303 _In_ const std::locale& locale = std::locale()) :
-
3304 basic_parser<T>(locale),
-
3305 m_path_char(path_char),
-
3306 m_query_start(query_start),
-
3307 m_bookmark_start(bookmark_start)
-
3308 {}
-
3309
-
3310 virtual bool match(
-
3311 _In_reads_or_z_(end) const T* text,
-
3312 _In_ size_t start = 0,
-
3313 _In_ size_t end = (size_t)-1,
-
3314 _In_ int flags = match_default)
-
3315 {
-
3316 assert(text || start >= end);
+
3299
+
3303 template <class T>
+
+ +
3305 {
+
3306 public:
+ +
3308 _In_ const std::shared_ptr<basic_parser<T>>& path_char,
+
3309 _In_ const std::shared_ptr<basic_parser<T>>& query_start,
+
3310 _In_ const std::shared_ptr<basic_parser<T>>& bookmark_start,
+
3311 _In_ const std::locale& locale = std::locale()) :
+
3312 basic_parser<T>(locale),
+
3313 m_path_char(path_char),
+
3314 m_query_start(query_start),
+
3315 m_bookmark_start(bookmark_start)
+
3316 {}
3317
-
3318 this->interval.end = start;
-
3319 path.start = start;
-
3320 query.start = 1;
-
3321 query.end = 0;
-
3322 bookmark.start = 1;
-
3323 bookmark.end = 0;
-
3324
-
3325 for (;;) {
-
3326 if (this->interval.end >= end || !text[this->interval.end])
-
3327 break;
-
3328 if (m_query_start->match(text, this->interval.end, end, flags)) {
-
3329 path.end = this->interval.end;
-
3330 query.start = this->interval.end = m_query_start->interval.end;
-
3331 for (;;) {
-
3332 if (this->interval.end >= end || !text[this->interval.end]) {
-
3333 query.end = this->interval.end;
-
3334 break;
-
3335 }
-
3336 if (m_bookmark_start->match(text, this->interval.end, end, flags)) {
-
3337 query.end = this->interval.end;
-
3338 bookmark.start = this->interval.end = m_bookmark_start->interval.end;
-
3339 for (;;) {
-
3340 if (this->interval.end >= end || !text[this->interval.end]) {
-
3341 bookmark.end = this->interval.end;
-
3342 break;
-
3343 }
-
3344 if (m_path_char->match(text, this->interval.end, end, flags))
-
3345 this->interval.end = m_path_char->interval.end;
-
3346 else {
-
3347 bookmark.end = this->interval.end;
-
3348 break;
-
3349 }
-
3350 }
-
3351 this->interval.start = start;
-
3352 return true;
-
3353 }
-
3354 if (m_path_char->match(text, this->interval.end, end, flags))
-
3355 this->interval.end = m_path_char->interval.end;
-
3356 else {
-
3357 query.end = this->interval.end;
-
3358 break;
-
3359 }
-
3360 }
-
3361 this->interval.start = start;
-
3362 return true;
-
3363 }
-
3364 if (m_bookmark_start->match(text, this->interval.end, end, flags)) {
-
3365 path.end = this->interval.end;
-
3366 bookmark.start = this->interval.end = m_bookmark_start->interval.end;
-
3367 for (;;) {
-
3368 if (this->interval.end >= end || !text[this->interval.end]) {
-
3369 bookmark.end = this->interval.end;
-
3370 break;
-
3371 }
-
3372 if (m_path_char->match(text, this->interval.end, end, flags))
-
3373 this->interval.end = m_path_char->interval.end;
-
3374 else {
-
3375 bookmark.end = this->interval.end;
-
3376 break;
-
3377 }
-
3378 }
-
3379 this->interval.start = start;
-
3380 return true;
-
3381 }
-
3382 if (m_path_char->match(text, this->interval.end, end, flags))
-
3383 this->interval.end = m_path_char->interval.end;
-
3384 else
-
3385 break;
-
3386 }
-
3387
- -
3389 path.end = this->interval.end;
-
3390 this->interval.start = start;
-
3391 return true;
-
3392 }
-
3393
-
3394 path.start = 1;
-
3395 path.end = 0;
-
3396 bookmark.start = 1;
-
3397 bookmark.end = 0;
-
3398 this->interval.start = (this->interval.end = start) + 1;
-
3399 return false;
-
3400 }
+
3318 virtual bool match(
+
3319 _In_reads_or_z_(end) const T* text,
+
3320 _In_ size_t start = 0,
+
3321 _In_ size_t end = (size_t)-1,
+
3322 _In_ int flags = match_default)
+
3323 {
+
3324 assert(text || start >= end);
+
3325
+
3326 this->interval.end = start;
+
3327 path.start = start;
+
3328 query.start = 1;
+
3329 query.end = 0;
+
3330 bookmark.start = 1;
+
3331 bookmark.end = 0;
+
3332
+
3333 for (;;) {
+
3334 if (this->interval.end >= end || !text[this->interval.end])
+
3335 break;
+
3336 if (m_query_start->match(text, this->interval.end, end, flags)) {
+
3337 path.end = this->interval.end;
+
3338 query.start = this->interval.end = m_query_start->interval.end;
+
3339 for (;;) {
+
3340 if (this->interval.end >= end || !text[this->interval.end]) {
+
3341 query.end = this->interval.end;
+
3342 break;
+
3343 }
+
3344 if (m_bookmark_start->match(text, this->interval.end, end, flags)) {
+
3345 query.end = this->interval.end;
+
3346 bookmark.start = this->interval.end = m_bookmark_start->interval.end;
+
3347 for (;;) {
+
3348 if (this->interval.end >= end || !text[this->interval.end]) {
+
3349 bookmark.end = this->interval.end;
+
3350 break;
+
3351 }
+
3352 if (m_path_char->match(text, this->interval.end, end, flags))
+
3353 this->interval.end = m_path_char->interval.end;
+
3354 else {
+
3355 bookmark.end = this->interval.end;
+
3356 break;
+
3357 }
+
3358 }
+
3359 this->interval.start = start;
+
3360 return true;
+
3361 }
+
3362 if (m_path_char->match(text, this->interval.end, end, flags))
+
3363 this->interval.end = m_path_char->interval.end;
+
3364 else {
+
3365 query.end = this->interval.end;
+
3366 break;
+
3367 }
+
3368 }
+
3369 this->interval.start = start;
+
3370 return true;
+
3371 }
+
3372 if (m_bookmark_start->match(text, this->interval.end, end, flags)) {
+
3373 path.end = this->interval.end;
+
3374 bookmark.start = this->interval.end = m_bookmark_start->interval.end;
+
3375 for (;;) {
+
3376 if (this->interval.end >= end || !text[this->interval.end]) {
+
3377 bookmark.end = this->interval.end;
+
3378 break;
+
3379 }
+
3380 if (m_path_char->match(text, this->interval.end, end, flags))
+
3381 this->interval.end = m_path_char->interval.end;
+
3382 else {
+
3383 bookmark.end = this->interval.end;
+
3384 break;
+
3385 }
+
3386 }
+
3387 this->interval.start = start;
+
3388 return true;
+
3389 }
+
3390 if (m_path_char->match(text, this->interval.end, end, flags))
+
3391 this->interval.end = m_path_char->interval.end;
+
3392 else
+
3393 break;
+
3394 }
+
3395
+ +
3397 path.end = this->interval.end;
+
3398 this->interval.start = start;
+
3399 return true;
+
3400 }
3401
-
3402 virtual void invalidate()
-
3403 {
-
3404 path.start = 1;
-
3405 path.end = 0;
-
3406 query.start = 1;
-
3407 query.end = 0;
-
3408 bookmark.start = 1;
-
3409 bookmark.end = 0;
- -
3411 }
-
3412
-
3413 public:
- - -
3416 stdex::interval<size_t> bookmark;
-
3417
-
3418 protected:
-
3419 std::shared_ptr<basic_parser<T>> m_path_char;
-
3420 std::shared_ptr<basic_parser<T>> m_query_start;
-
3421 std::shared_ptr<basic_parser<T>> m_bookmark_start;
-
3422 };
+
3402 path.start = 1;
+
3403 path.end = 0;
+
3404 bookmark.start = 1;
+
3405 bookmark.end = 0;
+
3406 this->interval.start = (this->interval.end = start) + 1;
+
3407 return false;
+
3408 }
+
3409
+
3410 virtual void invalidate()
+
3411 {
+
3412 path.start = 1;
+
3413 path.end = 0;
+
3414 query.start = 1;
+
3415 query.end = 0;
+
3416 bookmark.start = 1;
+
3417 bookmark.end = 0;
+ +
3419 }
+
3420
+
3421 public:
+ + +
3424 stdex::interval<size_t> bookmark;
+
3425
+
3426 protected:
+
3427 std::shared_ptr<basic_parser<T>> m_path_char;
+
3428 std::shared_ptr<basic_parser<T>> m_query_start;
+
3429 std::shared_ptr<basic_parser<T>> m_bookmark_start;
+
3430 };
-
3423
- - -
3426#ifdef _UNICODE
-
3427 using turl_path = wurl_path;
-
3428#else
-
3429 using turl_path = url_path;
-
3430#endif
- -
3432
-
3436 template <class T>
-
-
3437 class basic_url : public basic_parser<T>
-
3438 {
-
3439 public:
-
3440 basic_url(
-
3441 _In_ const std::shared_ptr<basic_parser<T>>& _http_scheme,
-
3442 _In_ const std::shared_ptr<basic_parser<T>>& _ftp_scheme,
-
3443 _In_ const std::shared_ptr<basic_parser<T>>& _mailto_scheme,
-
3444 _In_ const std::shared_ptr<basic_parser<T>>& _file_scheme,
-
3445 _In_ const std::shared_ptr<basic_parser<T>>& colon,
-
3446 _In_ const std::shared_ptr<basic_parser<T>>& slash,
-
3447 _In_ const std::shared_ptr<basic_parser<T>>& _username,
-
3448 _In_ const std::shared_ptr<basic_parser<T>>& _password,
-
3449 _In_ const std::shared_ptr<basic_parser<T>>& at,
-
3450 _In_ const std::shared_ptr<basic_parser<T>>& ip_lbracket,
-
3451 _In_ const std::shared_ptr<basic_parser<T>>& ip_rbracket,
-
3452 _In_ const std::shared_ptr<basic_parser<T>>& _ipv4_host,
-
3453 _In_ const std::shared_ptr<basic_parser<T>>& _ipv6_host,
-
3454 _In_ const std::shared_ptr<basic_parser<T>>& _dns_host,
-
3455 _In_ const std::shared_ptr<basic_parser<T>>& _port,
-
3456 _In_ const std::shared_ptr<basic_parser<T>>& _path,
-
3457 _In_ const std::locale& locale = std::locale()) :
-
3458 basic_parser<T>(locale),
-
3459 http_scheme(_http_scheme),
-
3460 ftp_scheme(_ftp_scheme),
-
3461 mailto_scheme(_mailto_scheme),
-
3462 file_scheme(_file_scheme),
-
3463 m_colon(colon),
-
3464 m_slash(slash),
-
3465 username(_username),
-
3466 password(_password),
-
3467 m_at(at),
-
3468 m_ip_lbracket(ip_lbracket),
-
3469 m_ip_rbracket(ip_rbracket),
-
3470 ipv4_host(_ipv4_host),
-
3471 ipv6_host(_ipv6_host),
-
3472 dns_host(_dns_host),
-
3473 port(_port),
-
3474 path(_path)
-
3475 {}
-
3476
-
3477 virtual bool match(
-
3478 _In_reads_or_z_(end) const T* text,
-
3479 _In_ size_t start = 0,
-
3480 _In_ size_t end = (size_t)-1,
-
3481 _In_ int flags = match_default)
-
3482 {
-
3483 assert(text || start >= end);
+
3431
+ + +
3434#ifdef _UNICODE
+
3435 using turl_path = wurl_path;
+
3436#else
+
3437 using turl_path = url_path;
+
3438#endif
+ +
3440
+
3444 template <class T>
+
+
3445 class basic_url : public basic_parser<T>
+
3446 {
+
3447 public:
+
3448 basic_url(
+
3449 _In_ const std::shared_ptr<basic_parser<T>>& _http_scheme,
+
3450 _In_ const std::shared_ptr<basic_parser<T>>& _ftp_scheme,
+
3451 _In_ const std::shared_ptr<basic_parser<T>>& _mailto_scheme,
+
3452 _In_ const std::shared_ptr<basic_parser<T>>& _file_scheme,
+
3453 _In_ const std::shared_ptr<basic_parser<T>>& colon,
+
3454 _In_ const std::shared_ptr<basic_parser<T>>& slash,
+
3455 _In_ const std::shared_ptr<basic_parser<T>>& _username,
+
3456 _In_ const std::shared_ptr<basic_parser<T>>& _password,
+
3457 _In_ const std::shared_ptr<basic_parser<T>>& at,
+
3458 _In_ const std::shared_ptr<basic_parser<T>>& ip_lbracket,
+
3459 _In_ const std::shared_ptr<basic_parser<T>>& ip_rbracket,
+
3460 _In_ const std::shared_ptr<basic_parser<T>>& _ipv4_host,
+
3461 _In_ const std::shared_ptr<basic_parser<T>>& _ipv6_host,
+
3462 _In_ const std::shared_ptr<basic_parser<T>>& _dns_host,
+
3463 _In_ const std::shared_ptr<basic_parser<T>>& _port,
+
3464 _In_ const std::shared_ptr<basic_parser<T>>& _path,
+
3465 _In_ const std::locale& locale = std::locale()) :
+
3466 basic_parser<T>(locale),
+
3467 http_scheme(_http_scheme),
+
3468 ftp_scheme(_ftp_scheme),
+
3469 mailto_scheme(_mailto_scheme),
+
3470 file_scheme(_file_scheme),
+
3471 m_colon(colon),
+
3472 m_slash(slash),
+
3473 username(_username),
+
3474 password(_password),
+
3475 m_at(at),
+
3476 m_ip_lbracket(ip_lbracket),
+
3477 m_ip_rbracket(ip_rbracket),
+
3478 ipv4_host(_ipv4_host),
+
3479 ipv6_host(_ipv6_host),
+
3480 dns_host(_dns_host),
+
3481 port(_port),
+
3482 path(_path)
+
3483 {}
3484
-
3485 this->interval.end = start;
-
3486
-
3487 if (http_scheme->match(text, this->interval.end, end, flags) &&
-
3488 m_colon->match(text, http_scheme->interval.end, end, flags) &&
-
3489 m_slash->match(text, m_colon->interval.end, end, flags) &&
-
3490 m_slash->match(text, m_slash->interval.end, end, flags))
-
3491 {
-
3492 // http://
-
3493 this->interval.end = m_slash->interval.end;
-
3494 ftp_scheme->invalidate();
-
3495 mailto_scheme->invalidate();
-
3496 file_scheme->invalidate();
-
3497 }
-
3498 else if (ftp_scheme->match(text, this->interval.end, end, flags) &&
-
3499 m_colon->match(text, ftp_scheme->interval.end, end, flags) &&
-
3500 m_slash->match(text, m_colon->interval.end, end, flags) &&
-
3501 m_slash->match(text, m_slash->interval.end, end, flags))
-
3502 {
-
3503 // ftp://
-
3504 this->interval.end = m_slash->interval.end;
-
3505 http_scheme->invalidate();
-
3506 mailto_scheme->invalidate();
-
3507 file_scheme->invalidate();
-
3508 }
-
3509 else if (mailto_scheme->match(text, this->interval.end, end, flags) &&
-
3510 m_colon->match(text, mailto_scheme->interval.end, end, flags))
-
3511 {
-
3512 // mailto:
-
3513 this->interval.end = m_colon->interval.end;
-
3514 http_scheme->invalidate();
-
3515 ftp_scheme->invalidate();
-
3516 file_scheme->invalidate();
-
3517 }
-
3518 else if (file_scheme->match(text, this->interval.end, end, flags) &&
-
3519 m_colon->match(text, file_scheme->interval.end, end, flags) &&
-
3520 m_slash->match(text, m_colon->interval.end, end, flags) &&
-
3521 m_slash->match(text, m_slash->interval.end, end, flags))
-
3522 {
-
3523 // file://
-
3524 this->interval.end = m_slash->interval.end;
-
3525 http_scheme->invalidate();
-
3526 ftp_scheme->invalidate();
-
3527 mailto_scheme->invalidate();
-
3528 }
-
3529 else {
-
3530 // Default to http:
-
3531 http_scheme->invalidate();
-
3532 ftp_scheme->invalidate();
-
3533 mailto_scheme->invalidate();
-
3534 file_scheme->invalidate();
-
3535 }
-
3536
-
3537 if (ftp_scheme->interval) {
-
3538 if (username->match(text, this->interval.end, end, flags)) {
-
3539 if (m_colon->match(text, username->interval.end, end, flags) &&
-
3540 password->match(text, m_colon->interval.end, end, flags) &&
-
3541 m_at->match(text, password->interval.end, end, flags))
-
3542 {
-
3543 // Username and password
-
3544 this->interval.end = m_at->interval.end;
-
3545 }
-
3546 else if (m_at->match(text, this->interval.end, end, flags)) {
-
3547 // Username only
-
3548 this->interval.end = m_at->interval.end;
-
3549 password->invalidate();
-
3550 }
-
3551 else {
-
3552 username->invalidate();
-
3553 password->invalidate();
-
3554 }
-
3555 }
-
3556 else {
-
3557 username->invalidate();
-
3558 password->invalidate();
-
3559 }
-
3560
-
3561 if (ipv4_host->match(text, this->interval.end, end, flags)) {
-
3562 // Host is IPv4
-
3563 this->interval.end = ipv4_host->interval.end;
-
3564 ipv6_host->invalidate();
-
3565 dns_host->invalidate();
-
3566 }
-
3567 else if (
-
3568 m_ip_lbracket->match(text, this->interval.end, end, flags) &&
-
3569 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
-
3570 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
-
3571 {
-
3572 // Host is IPv6
-
3573 this->interval.end = m_ip_rbracket->interval.end;
-
3574 ipv4_host->invalidate();
-
3575 dns_host->invalidate();
-
3576 }
-
3577 else if (dns_host->match(text, this->interval.end, end, flags)) {
-
3578 // Host is hostname
-
3579 this->interval.end = dns_host->interval.end;
-
3580 ipv4_host->invalidate();
-
3581 ipv6_host->invalidate();
-
3582 }
-
3583 else {
-
3584 invalidate();
-
3585 return false;
-
3586 }
-
3587
-
3588 if (m_colon->match(text, this->interval.end, end, flags) &&
-
3589 port->match(text, m_colon->interval.end, end, flags))
-
3590 {
-
3591 // Port
-
3592 this->interval.end = port->interval.end;
-
3593 }
-
3594 else
-
3595 port->invalidate();
-
3596
-
3597 if (path->match(text, this->interval.end, end, flags)) {
-
3598 // Path
-
3599 this->interval.end = path->interval.end;
-
3600 }
-
3601
-
3602 this->interval.start = start;
-
3603 return true;
-
3604 }
-
3605
-
3606 if (mailto_scheme->interval) {
-
3607 if (username->match(text, this->interval.end, end, flags) &&
-
3608 m_at->match(text, username->interval.end, end, flags))
-
3609 {
-
3610 // Username
-
3611 this->interval.end = m_at->interval.end;
-
3612 }
-
3613 else {
-
3614 invalidate();
-
3615 return false;
-
3616 }
-
3617
-
3618 if (m_ip_lbracket->match(text, this->interval.end, end, flags) &&
-
3619 ipv4_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
-
3620 m_ip_rbracket->match(text, ipv4_host->interval.end, end, flags))
-
3621 {
-
3622 // Host is IPv4
-
3623 this->interval.end = m_ip_rbracket->interval.end;
-
3624 ipv6_host->invalidate();
-
3625 dns_host->invalidate();
-
3626 }
-
3627 else if (
-
3628 m_ip_lbracket->match(text, this->interval.end, end, flags) &&
-
3629 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
-
3630 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
-
3631 {
-
3632 // Host is IPv6
-
3633 this->interval.end = m_ip_rbracket->interval.end;
-
3634 ipv4_host->invalidate();
-
3635 dns_host->invalidate();
-
3636 }
-
3637 else if (dns_host->match(text, this->interval.end, end, flags)) {
-
3638 // Host is hostname
-
3639 this->interval.end = dns_host->interval.end;
-
3640 ipv4_host->invalidate();
-
3641 ipv6_host->invalidate();
-
3642 }
-
3643 else {
-
3644 invalidate();
-
3645 return false;
-
3646 }
-
3647
-
3648 password->invalidate();
-
3649 port->invalidate();
-
3650 path->invalidate();
-
3651 this->interval.start = start;
-
3652 return true;
-
3653 }
-
3654
-
3655 if (file_scheme->interval) {
-
3656 if (path->match(text, this->interval.end, end, flags)) {
-
3657 // Path
-
3658 this->interval.end = path->interval.end;
-
3659 }
-
3660
-
3661 username->invalidate();
-
3662 password->invalidate();
-
3663 ipv4_host->invalidate();
-
3664 ipv6_host->invalidate();
-
3665 dns_host->invalidate();
-
3666 port->invalidate();
-
3667 this->interval.start = start;
-
3668 return true;
-
3669 }
-
3670
-
3671 // "http://" found or defaulted to
-
3672
-
3673 // If "http://" explicit, test for username&password.
-
3674 if (http_scheme->interval &&
-
3675 username->match(text, this->interval.end, end, flags))
-
3676 {
-
3677 if (m_colon->match(text, username->interval.end, end, flags) &&
-
3678 password->match(text, m_colon->interval.end, end, flags) &&
-
3679 m_at->match(text, password->interval.end, end, flags))
-
3680 {
-
3681 // Username and password
-
3682 this->interval.end = m_at->interval.end;
-
3683 }
-
3684 else if (m_at->match(text, username->interval.end, end, flags)) {
-
3685 // Username only
-
3686 this->interval.end = m_at->interval.end;
-
3687 password->invalidate();
-
3688 }
-
3689 else {
-
3690 username->invalidate();
-
3691 password->invalidate();
-
3692 }
-
3693 }
-
3694 else {
-
3695 username->invalidate();
-
3696 password->invalidate();
-
3697 }
-
3698
-
3699 if (ipv4_host->match(text, this->interval.end, end, flags)) {
-
3700 // Host is IPv4
-
3701 this->interval.end = ipv4_host->interval.end;
-
3702 ipv6_host->invalidate();
-
3703 dns_host->invalidate();
-
3704 }
-
3705 else if (
-
3706 m_ip_lbracket->match(text, this->interval.end, end, flags) &&
-
3707 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
-
3708 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
-
3709 {
-
3710 // Host is IPv6
-
3711 this->interval.end = m_ip_rbracket->interval.end;
-
3712 ipv4_host->invalidate();
-
3713 dns_host->invalidate();
-
3714 }
-
3715 else if (dns_host->match(text, this->interval.end, end, flags)) {
-
3716 // Host is hostname
-
3717 this->interval.end = dns_host->interval.end;
-
3718 ipv4_host->invalidate();
-
3719 ipv6_host->invalidate();
-
3720 }
-
3721 else {
-
3722 invalidate();
-
3723 return false;
-
3724 }
-
3725
-
3726 if (m_colon->match(text, this->interval.end, end, flags) &&
-
3727 port->match(text, m_colon->interval.end, end, flags))
-
3728 {
-
3729 // Port
-
3730 this->interval.end = port->interval.end;
-
3731 }
-
3732 else
-
3733 port->invalidate();
-
3734
-
3735 if (path->match(text, this->interval.end, end, flags)) {
-
3736 // Path
-
3737 this->interval.end = path->interval.end;
-
3738 }
-
3739
-
3740 this->interval.start = start;
-
3741 return true;
-
3742 }
-
3743
-
3744 virtual void invalidate()
-
3745 {
-
3746 http_scheme->invalidate();
-
3747 ftp_scheme->invalidate();
-
3748 mailto_scheme->invalidate();
-
3749 file_scheme->invalidate();
-
3750 username->invalidate();
-
3751 password->invalidate();
-
3752 ipv4_host->invalidate();
-
3753 ipv6_host->invalidate();
-
3754 dns_host->invalidate();
-
3755 port->invalidate();
-
3756 path->invalidate();
- -
3758 }
-
3759
-
3760 public:
-
3761 std::shared_ptr<basic_parser<T>> http_scheme;
-
3762 std::shared_ptr<basic_parser<T>> ftp_scheme;
-
3763 std::shared_ptr<basic_parser<T>> mailto_scheme;
-
3764 std::shared_ptr<basic_parser<T>> file_scheme;
-
3765 std::shared_ptr<basic_parser<T>> username;
-
3766 std::shared_ptr<basic_parser<T>> password;
-
3767 std::shared_ptr<basic_parser<T>> ipv4_host;
-
3768 std::shared_ptr<basic_parser<T>> ipv6_host;
-
3769 std::shared_ptr<basic_parser<T>> dns_host;
-
3770 std::shared_ptr<basic_parser<T>> port;
-
3771 std::shared_ptr<basic_parser<T>> path;
-
3772
-
3773 protected:
-
3774 std::shared_ptr<basic_parser<T>> m_colon;
-
3775 std::shared_ptr<basic_parser<T>> m_slash;
-
3776 std::shared_ptr<basic_parser<T>> m_at;
-
3777 std::shared_ptr<basic_parser<T>> m_ip_lbracket;
-
3778 std::shared_ptr<basic_parser<T>> m_ip_rbracket;
-
3779 };
-
+
3485 virtual bool match(
+
3486 _In_reads_or_z_(end) const T* text,
+
3487 _In_ size_t start = 0,
+
3488 _In_ size_t end = (size_t)-1,
+
3489 _In_ int flags = match_default)
+
3490 {
+
3491 assert(text || start >= end);
+
3492
+
3493 this->interval.end = start;
+
3494
+
3495 if (http_scheme->match(text, this->interval.end, end, flags) &&
+
3496 m_colon->match(text, http_scheme->interval.end, end, flags) &&
+
3497 m_slash->match(text, m_colon->interval.end, end, flags) &&
+
3498 m_slash->match(text, m_slash->interval.end, end, flags))
+
3499 {
+
3500 // http://
+
3501 this->interval.end = m_slash->interval.end;
+
3502 ftp_scheme->invalidate();
+
3503 mailto_scheme->invalidate();
+
3504 file_scheme->invalidate();
+
3505 }
+
3506 else if (ftp_scheme->match(text, this->interval.end, end, flags) &&
+
3507 m_colon->match(text, ftp_scheme->interval.end, end, flags) &&
+
3508 m_slash->match(text, m_colon->interval.end, end, flags) &&
+
3509 m_slash->match(text, m_slash->interval.end, end, flags))
+
3510 {
+
3511 // ftp://
+
3512 this->interval.end = m_slash->interval.end;
+
3513 http_scheme->invalidate();
+
3514 mailto_scheme->invalidate();
+
3515 file_scheme->invalidate();
+
3516 }
+
3517 else if (mailto_scheme->match(text, this->interval.end, end, flags) &&
+
3518 m_colon->match(text, mailto_scheme->interval.end, end, flags))
+
3519 {
+
3520 // mailto:
+
3521 this->interval.end = m_colon->interval.end;
+
3522 http_scheme->invalidate();
+
3523 ftp_scheme->invalidate();
+
3524 file_scheme->invalidate();
+
3525 }
+
3526 else if (file_scheme->match(text, this->interval.end, end, flags) &&
+
3527 m_colon->match(text, file_scheme->interval.end, end, flags) &&
+
3528 m_slash->match(text, m_colon->interval.end, end, flags) &&
+
3529 m_slash->match(text, m_slash->interval.end, end, flags))
+
3530 {
+
3531 // file://
+
3532 this->interval.end = m_slash->interval.end;
+
3533 http_scheme->invalidate();
+
3534 ftp_scheme->invalidate();
+
3535 mailto_scheme->invalidate();
+
3536 }
+
3537 else {
+
3538 // Default to http:
+
3539 http_scheme->invalidate();
+
3540 ftp_scheme->invalidate();
+
3541 mailto_scheme->invalidate();
+
3542 file_scheme->invalidate();
+
3543 }
+
3544
+
3545 if (ftp_scheme->interval) {
+
3546 if (username->match(text, this->interval.end, end, flags)) {
+
3547 if (m_colon->match(text, username->interval.end, end, flags) &&
+
3548 password->match(text, m_colon->interval.end, end, flags) &&
+
3549 m_at->match(text, password->interval.end, end, flags))
+
3550 {
+
3551 // Username and password
+
3552 this->interval.end = m_at->interval.end;
+
3553 }
+
3554 else if (m_at->match(text, this->interval.end, end, flags)) {
+
3555 // Username only
+
3556 this->interval.end = m_at->interval.end;
+
3557 password->invalidate();
+
3558 }
+
3559 else {
+
3560 username->invalidate();
+
3561 password->invalidate();
+
3562 }
+
3563 }
+
3564 else {
+
3565 username->invalidate();
+
3566 password->invalidate();
+
3567 }
+
3568
+
3569 if (ipv4_host->match(text, this->interval.end, end, flags)) {
+
3570 // Host is IPv4
+
3571 this->interval.end = ipv4_host->interval.end;
+
3572 ipv6_host->invalidate();
+
3573 dns_host->invalidate();
+
3574 }
+
3575 else if (
+
3576 m_ip_lbracket->match(text, this->interval.end, end, flags) &&
+
3577 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
+
3578 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
+
3579 {
+
3580 // Host is IPv6
+
3581 this->interval.end = m_ip_rbracket->interval.end;
+
3582 ipv4_host->invalidate();
+
3583 dns_host->invalidate();
+
3584 }
+
3585 else if (dns_host->match(text, this->interval.end, end, flags)) {
+
3586 // Host is hostname
+
3587 this->interval.end = dns_host->interval.end;
+
3588 ipv4_host->invalidate();
+
3589 ipv6_host->invalidate();
+
3590 }
+
3591 else {
+
3592 invalidate();
+
3593 return false;
+
3594 }
+
3595
+
3596 if (m_colon->match(text, this->interval.end, end, flags) &&
+
3597 port->match(text, m_colon->interval.end, end, flags))
+
3598 {
+
3599 // Port
+
3600 this->interval.end = port->interval.end;
+
3601 }
+
3602 else
+
3603 port->invalidate();
+
3604
+
3605 if (path->match(text, this->interval.end, end, flags)) {
+
3606 // Path
+
3607 this->interval.end = path->interval.end;
+
3608 }
+
3609
+
3610 this->interval.start = start;
+
3611 return true;
+
3612 }
+
3613
+
3614 if (mailto_scheme->interval) {
+
3615 if (username->match(text, this->interval.end, end, flags) &&
+
3616 m_at->match(text, username->interval.end, end, flags))
+
3617 {
+
3618 // Username
+
3619 this->interval.end = m_at->interval.end;
+
3620 }
+
3621 else {
+
3622 invalidate();
+
3623 return false;
+
3624 }
+
3625
+
3626 if (m_ip_lbracket->match(text, this->interval.end, end, flags) &&
+
3627 ipv4_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
+
3628 m_ip_rbracket->match(text, ipv4_host->interval.end, end, flags))
+
3629 {
+
3630 // Host is IPv4
+
3631 this->interval.end = m_ip_rbracket->interval.end;
+
3632 ipv6_host->invalidate();
+
3633 dns_host->invalidate();
+
3634 }
+
3635 else if (
+
3636 m_ip_lbracket->match(text, this->interval.end, end, flags) &&
+
3637 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
+
3638 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
+
3639 {
+
3640 // Host is IPv6
+
3641 this->interval.end = m_ip_rbracket->interval.end;
+
3642 ipv4_host->invalidate();
+
3643 dns_host->invalidate();
+
3644 }
+
3645 else if (dns_host->match(text, this->interval.end, end, flags)) {
+
3646 // Host is hostname
+
3647 this->interval.end = dns_host->interval.end;
+
3648 ipv4_host->invalidate();
+
3649 ipv6_host->invalidate();
+
3650 }
+
3651 else {
+
3652 invalidate();
+
3653 return false;
+
3654 }
+
3655
+
3656 password->invalidate();
+
3657 port->invalidate();
+
3658 path->invalidate();
+
3659 this->interval.start = start;
+
3660 return true;
+
3661 }
+
3662
+
3663 if (file_scheme->interval) {
+
3664 if (path->match(text, this->interval.end, end, flags)) {
+
3665 // Path
+
3666 this->interval.end = path->interval.end;
+
3667 }
+
3668
+
3669 username->invalidate();
+
3670 password->invalidate();
+
3671 ipv4_host->invalidate();
+
3672 ipv6_host->invalidate();
+
3673 dns_host->invalidate();
+
3674 port->invalidate();
+
3675 this->interval.start = start;
+
3676 return true;
+
3677 }
+
3678
+
3679 // "http://" found or defaulted to
+
3680
+
3681 // If "http://" explicit, test for username&password.
+
3682 if (http_scheme->interval &&
+
3683 username->match(text, this->interval.end, end, flags))
+
3684 {
+
3685 if (m_colon->match(text, username->interval.end, end, flags) &&
+
3686 password->match(text, m_colon->interval.end, end, flags) &&
+
3687 m_at->match(text, password->interval.end, end, flags))
+
3688 {
+
3689 // Username and password
+
3690 this->interval.end = m_at->interval.end;
+
3691 }
+
3692 else if (m_at->match(text, username->interval.end, end, flags)) {
+
3693 // Username only
+
3694 this->interval.end = m_at->interval.end;
+
3695 password->invalidate();
+
3696 }
+
3697 else {
+
3698 username->invalidate();
+
3699 password->invalidate();
+
3700 }
+
3701 }
+
3702 else {
+
3703 username->invalidate();
+
3704 password->invalidate();
+
3705 }
+
3706
+
3707 if (ipv4_host->match(text, this->interval.end, end, flags)) {
+
3708 // Host is IPv4
+
3709 this->interval.end = ipv4_host->interval.end;
+
3710 ipv6_host->invalidate();
+
3711 dns_host->invalidate();
+
3712 }
+
3713 else if (
+
3714 m_ip_lbracket->match(text, this->interval.end, end, flags) &&
+
3715 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
+
3716 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
+
3717 {
+
3718 // Host is IPv6
+
3719 this->interval.end = m_ip_rbracket->interval.end;
+
3720 ipv4_host->invalidate();
+
3721 dns_host->invalidate();
+
3722 }
+
3723 else if (dns_host->match(text, this->interval.end, end, flags)) {
+
3724 // Host is hostname
+
3725 this->interval.end = dns_host->interval.end;
+
3726 ipv4_host->invalidate();
+
3727 ipv6_host->invalidate();
+
3728 }
+
3729 else {
+
3730 invalidate();
+
3731 return false;
+
3732 }
+
3733
+
3734 if (m_colon->match(text, this->interval.end, end, flags) &&
+
3735 port->match(text, m_colon->interval.end, end, flags))
+
3736 {
+
3737 // Port
+
3738 this->interval.end = port->interval.end;
+
3739 }
+
3740 else
+
3741 port->invalidate();
+
3742
+
3743 if (path->match(text, this->interval.end, end, flags)) {
+
3744 // Path
+
3745 this->interval.end = path->interval.end;
+
3746 }
+
3747
+
3748 this->interval.start = start;
+
3749 return true;
+
3750 }
+
3751
+
3752 virtual void invalidate()
+
3753 {
+
3754 http_scheme->invalidate();
+
3755 ftp_scheme->invalidate();
+
3756 mailto_scheme->invalidate();
+
3757 file_scheme->invalidate();
+
3758 username->invalidate();
+
3759 password->invalidate();
+
3760 ipv4_host->invalidate();
+
3761 ipv6_host->invalidate();
+
3762 dns_host->invalidate();
+
3763 port->invalidate();
+
3764 path->invalidate();
+ +
3766 }
+
3767
+
3768 public:
+
3769 std::shared_ptr<basic_parser<T>> http_scheme;
+
3770 std::shared_ptr<basic_parser<T>> ftp_scheme;
+
3771 std::shared_ptr<basic_parser<T>> mailto_scheme;
+
3772 std::shared_ptr<basic_parser<T>> file_scheme;
+
3773 std::shared_ptr<basic_parser<T>> username;
+
3774 std::shared_ptr<basic_parser<T>> password;
+
3775 std::shared_ptr<basic_parser<T>> ipv4_host;
+
3776 std::shared_ptr<basic_parser<T>> ipv6_host;
+
3777 std::shared_ptr<basic_parser<T>> dns_host;
+
3778 std::shared_ptr<basic_parser<T>> port;
+
3779 std::shared_ptr<basic_parser<T>> path;
3780
-
3781 using url = basic_url<char>;
-
3782 using wurl = basic_url<wchar_t>;
-
3783#ifdef _UNICODE
-
3784 using turl = wurl;
-
3785#else
-
3786 using turl = url;
-
3787#endif
-
3788 using sgml_url = basic_url<char>;
-
3789
-
3793 template <class T>
-
- -
3795 {
-
3796 public:
- -
3798 _In_ const std::shared_ptr<basic_parser<T>>& _username,
-
3799 _In_ const std::shared_ptr<basic_parser<T>>& at,
-
3800 _In_ const std::shared_ptr<basic_parser<T>>& ip_lbracket,
-
3801 _In_ const std::shared_ptr<basic_parser<T>>& ip_rbracket,
-
3802 _In_ const std::shared_ptr<basic_parser<T>>& _ipv4_host,
-
3803 _In_ const std::shared_ptr<basic_parser<T>>& _ipv6_host,
-
3804 _In_ const std::shared_ptr<basic_parser<T>>& _dns_host,
-
3805 _In_ const std::locale& locale = std::locale()) :
-
3806 basic_parser<T>(locale),
-
3807 username(_username),
-
3808 m_at(at),
-
3809 m_ip_lbracket(ip_lbracket),
-
3810 m_ip_rbracket(ip_rbracket),
-
3811 ipv4_host(_ipv4_host),
-
3812 ipv6_host(_ipv6_host),
-
3813 dns_host(_dns_host)
-
3814 {}
-
3815
-
3816 virtual bool match(
-
3817 _In_reads_or_z_(end) const T* text,
-
3818 _In_ size_t start = 0,
-
3819 _In_ size_t end = (size_t)-1,
-
3820 _In_ int flags = match_default)
-
3821 {
-
3822 assert(text || start >= end);
+
3781 protected:
+
3782 std::shared_ptr<basic_parser<T>> m_colon;
+
3783 std::shared_ptr<basic_parser<T>> m_slash;
+
3784 std::shared_ptr<basic_parser<T>> m_at;
+
3785 std::shared_ptr<basic_parser<T>> m_ip_lbracket;
+
3786 std::shared_ptr<basic_parser<T>> m_ip_rbracket;
+
3787 };
+
+
3788
+
3789 using url = basic_url<char>;
+
3790 using wurl = basic_url<wchar_t>;
+
3791#ifdef _UNICODE
+
3792 using turl = wurl;
+
3793#else
+
3794 using turl = url;
+
3795#endif
+
3796 using sgml_url = basic_url<char>;
+
3797
+
3801 template <class T>
+
+ +
3803 {
+
3804 public:
+ +
3806 _In_ const std::shared_ptr<basic_parser<T>>& _username,
+
3807 _In_ const std::shared_ptr<basic_parser<T>>& at,
+
3808 _In_ const std::shared_ptr<basic_parser<T>>& ip_lbracket,
+
3809 _In_ const std::shared_ptr<basic_parser<T>>& ip_rbracket,
+
3810 _In_ const std::shared_ptr<basic_parser<T>>& _ipv4_host,
+
3811 _In_ const std::shared_ptr<basic_parser<T>>& _ipv6_host,
+
3812 _In_ const std::shared_ptr<basic_parser<T>>& _dns_host,
+
3813 _In_ const std::locale& locale = std::locale()) :
+
3814 basic_parser<T>(locale),
+
3815 username(_username),
+
3816 m_at(at),
+
3817 m_ip_lbracket(ip_lbracket),
+
3818 m_ip_rbracket(ip_rbracket),
+
3819 ipv4_host(_ipv4_host),
+
3820 ipv6_host(_ipv6_host),
+
3821 dns_host(_dns_host)
+
3822 {}
3823
-
3824 if (username->match(text, start, end, flags) &&
-
3825 m_at->match(text, username->interval.end, end, flags))
-
3826 {
-
3827 // Username@
-
3828 if (m_ip_lbracket->match(text, m_at->interval.end, end, flags) &&
-
3829 ipv4_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
-
3830 m_ip_rbracket->match(text, ipv4_host->interval.end, end, flags))
-
3831 {
-
3832 // Host is IPv4
-
3833 this->interval.end = m_ip_rbracket->interval.end;
-
3834 ipv6_host->invalidate();
-
3835 dns_host->invalidate();
-
3836 }
-
3837 else if (
-
3838 m_ip_lbracket->match(text, m_at->interval.end, end, flags) &&
-
3839 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
-
3840 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
-
3841 {
-
3842 // Host is IPv6
-
3843 this->interval.end = m_ip_rbracket->interval.end;
-
3844 ipv4_host->invalidate();
-
3845 dns_host->invalidate();
-
3846 }
-
3847 else if (dns_host->match(text, m_at->interval.end, end, flags)) {
-
3848 // Host is hostname
-
3849 this->interval.end = dns_host->interval.end;
-
3850 ipv4_host->invalidate();
-
3851 ipv6_host->invalidate();
-
3852 }
-
3853 else
-
3854 goto error;
-
3855 this->interval.start = start;
-
3856 return true;
-
3857 }
-
3858
-
3859 error:
-
3860 username->invalidate();
-
3861 ipv4_host->invalidate();
-
3862 ipv6_host->invalidate();
-
3863 dns_host->invalidate();
-
3864 this->interval.start = (this->interval.end = start) + 1;
-
3865 return false;
-
3866 }
-
3867
-
3868 virtual void invalidate()
-
3869 {
-
3870 username->invalidate();
-
3871 ipv4_host->invalidate();
-
3872 ipv6_host->invalidate();
-
3873 dns_host->invalidate();
- -
3875 }
-
3876
-
3877 public:
-
3878 std::shared_ptr<basic_parser<T>> username;
-
3879 std::shared_ptr<basic_parser<T>> ipv4_host;
-
3880 std::shared_ptr<basic_parser<T>> ipv6_host;
-
3881 std::shared_ptr<basic_parser<T>> dns_host;
-
3882
-
3883 protected:
-
3884 std::shared_ptr<basic_parser<T>> m_at;
-
3885 std::shared_ptr<basic_parser<T>> m_ip_lbracket;
-
3886 std::shared_ptr<basic_parser<T>> m_ip_rbracket;
-
3887 };
+
3824 virtual bool match(
+
3825 _In_reads_or_z_(end) const T* text,
+
3826 _In_ size_t start = 0,
+
3827 _In_ size_t end = (size_t)-1,
+
3828 _In_ int flags = match_default)
+
3829 {
+
3830 assert(text || start >= end);
+
3831
+
3832 if (username->match(text, start, end, flags) &&
+
3833 m_at->match(text, username->interval.end, end, flags))
+
3834 {
+
3835 // Username@
+
3836 if (m_ip_lbracket->match(text, m_at->interval.end, end, flags) &&
+
3837 ipv4_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
+
3838 m_ip_rbracket->match(text, ipv4_host->interval.end, end, flags))
+
3839 {
+
3840 // Host is IPv4
+
3841 this->interval.end = m_ip_rbracket->interval.end;
+
3842 ipv6_host->invalidate();
+
3843 dns_host->invalidate();
+
3844 }
+
3845 else if (
+
3846 m_ip_lbracket->match(text, m_at->interval.end, end, flags) &&
+
3847 ipv6_host->match(text, m_ip_lbracket->interval.end, end, flags) &&
+
3848 m_ip_rbracket->match(text, ipv6_host->interval.end, end, flags))
+
3849 {
+
3850 // Host is IPv6
+
3851 this->interval.end = m_ip_rbracket->interval.end;
+
3852 ipv4_host->invalidate();
+
3853 dns_host->invalidate();
+
3854 }
+
3855 else if (dns_host->match(text, m_at->interval.end, end, flags)) {
+
3856 // Host is hostname
+
3857 this->interval.end = dns_host->interval.end;
+
3858 ipv4_host->invalidate();
+
3859 ipv6_host->invalidate();
+
3860 }
+
3861 else
+
3862 goto error;
+
3863 this->interval.start = start;
+
3864 return true;
+
3865 }
+
3866
+
3867 error:
+
3868 username->invalidate();
+
3869 ipv4_host->invalidate();
+
3870 ipv6_host->invalidate();
+
3871 dns_host->invalidate();
+
3872 this->interval.start = (this->interval.end = start) + 1;
+
3873 return false;
+
3874 }
+
3875
+
3876 virtual void invalidate()
+
3877 {
+
3878 username->invalidate();
+
3879 ipv4_host->invalidate();
+
3880 ipv6_host->invalidate();
+
3881 dns_host->invalidate();
+ +
3883 }
+
3884
+
3885 public:
+
3886 std::shared_ptr<basic_parser<T>> username;
+
3887 std::shared_ptr<basic_parser<T>> ipv4_host;
+
3888 std::shared_ptr<basic_parser<T>> ipv6_host;
+
3889 std::shared_ptr<basic_parser<T>> dns_host;
+
3890
+
3891 protected:
+
3892 std::shared_ptr<basic_parser<T>> m_at;
+
3893 std::shared_ptr<basic_parser<T>> m_ip_lbracket;
+
3894 std::shared_ptr<basic_parser<T>> m_ip_rbracket;
+
3895 };
-
3888
- - -
3891#ifdef _UNICODE
- -
3893#else
- -
3895#endif
- -
3897
-
3901 template <class T>
-
- -
3903 {
-
3904 public:
- -
3906 _In_ const std::shared_ptr<basic_parser<T>>& _emoticon,
-
3907 _In_ const std::shared_ptr<basic_parser<T>>& _apex,
-
3908 _In_ const std::shared_ptr<basic_parser<T>>& _eyes,
-
3909 _In_ const std::shared_ptr<basic_parser<T>>& _nose,
-
3910 _In_ const std::shared_ptr<basic_set<T>>& _mouth,
-
3911 _In_ const std::locale& locale = std::locale()) :
-
3912 basic_parser<T>(locale),
- -
3914 apex(_apex),
-
3915 eyes(_eyes),
-
3916 nose(_nose),
-
3917 mouth(_mouth)
-
3918 {}
-
3919
-
3920 virtual bool match(
-
3921 _In_reads_or_z_(end) const T* text,
-
3922 _In_ size_t start = 0,
-
3923 _In_ size_t end = (size_t)-1,
-
3924 _In_ int flags = match_default)
-
3925 {
-
3926 assert(text || start >= end);
+
3896
+ + +
3899#ifdef _UNICODE
+ +
3901#else
+ +
3903#endif
+ +
3905
+
3909 template <class T>
+
+ +
3911 {
+
3912 public:
+ +
3914 _In_ const std::shared_ptr<basic_parser<T>>& _emoticon,
+
3915 _In_ const std::shared_ptr<basic_parser<T>>& _apex,
+
3916 _In_ const std::shared_ptr<basic_parser<T>>& _eyes,
+
3917 _In_ const std::shared_ptr<basic_parser<T>>& _nose,
+
3918 _In_ const std::shared_ptr<basic_set<T>>& _mouth,
+
3919 _In_ const std::locale& locale = std::locale()) :
+
3920 basic_parser<T>(locale),
+ +
3922 apex(_apex),
+
3923 eyes(_eyes),
+
3924 nose(_nose),
+
3925 mouth(_mouth)
+
3926 {}
3927
-
3928 if (emoticon && emoticon->match(text, start, end, flags)) {
-
3929 if (apex) apex->invalidate();
-
3930 eyes->invalidate();
-
3931 if (nose) nose->invalidate();
-
3932 mouth->invalidate();
-
3933 this->interval.start = start;
-
3934 this->interval.end = emoticon->interval.end;
-
3935 return true;
-
3936 }
-
3937
-
3938 this->interval.end = start;
-
3939
-
3940 if (apex && apex->match(text, this->interval.end, end, flags))
-
3941 this->interval.end = apex->interval.end;
-
3942
-
3943 if (eyes->match(text, this->interval.end, end, flags)) {
-
3944 if (nose && nose->match(text, eyes->interval.end, end, flags) &&
-
3945 mouth->match(text, nose->interval.end, end, flags))
-
3946 {
-
3947 size_t
- -
3949 hit_offset = mouth->hit_offset;
-
3950 // Mouth may repeat :-)))))))
-
3951 for (this->interval.end = mouth->interval.end; mouth->match(text, this->interval.end, end, flags) && mouth->hit_offset == hit_offset; this->interval.end = mouth->interval.end);
-
3952 mouth->interval.start = start_mouth;
-
3953 mouth->interval.end = this->interval.end;
-
3954 this->interval.start = start;
-
3955 return true;
-
3956 }
-
3957 if (mouth->match(text, eyes->interval.end, end, flags)) {
-
3958 size_t
- -
3960 hit_offset = mouth->hit_offset;
-
3961 // Mouth may repeat :-)))))))
-
3962 for (this->interval.end = mouth->interval.end; mouth->match(text, this->interval.end, end, flags) && mouth->hit_offset == hit_offset; this->interval.end = mouth->interval.end);
-
3963 if (nose) nose->invalidate();
-
3964 mouth->interval.start = start_mouth;
-
3965 mouth->interval.end = this->interval.end;
-
3966 this->interval.start = start;
-
3967 return true;
-
3968 }
-
3969 }
-
3970
-
3971 if (emoticon) emoticon->invalidate();
-
3972 if (apex) apex->invalidate();
-
3973 eyes->invalidate();
-
3974 if (nose) nose->invalidate();
-
3975 mouth->invalidate();
-
3976 this->interval.start = (this->interval.end = start) + 1;
-
3977 return false;
-
3978 }
-
3979
-
3980 virtual void invalidate()
-
3981 {
-
3982 if (emoticon) emoticon->invalidate();
-
3983 if (apex) apex->invalidate();
-
3984 eyes->invalidate();
-
3985 if (nose) nose->invalidate();
-
3986 mouth->invalidate();
- -
3988 }
-
3989
-
3990 public:
-
3991 std::shared_ptr<basic_parser<T>> emoticon;
-
3992 std::shared_ptr<basic_parser<T>> apex;
-
3993 std::shared_ptr<basic_parser<T>> eyes;
-
3994 std::shared_ptr<basic_parser<T>> nose;
-
3995 std::shared_ptr<basic_set<T>> mouth;
-
3996 };
-
+
3928 virtual bool match(
+
3929 _In_reads_or_z_(end) const T* text,
+
3930 _In_ size_t start = 0,
+
3931 _In_ size_t end = (size_t)-1,
+
3932 _In_ int flags = match_default)
+
3933 {
+
3934 assert(text || start >= end);
+
3935
+
3936 if (emoticon && emoticon->match(text, start, end, flags)) {
+
3937 if (apex) apex->invalidate();
+
3938 eyes->invalidate();
+
3939 if (nose) nose->invalidate();
+
3940 mouth->invalidate();
+
3941 this->interval.start = start;
+
3942 this->interval.end = emoticon->interval.end;
+
3943 return true;
+
3944 }
+
3945
+
3946 this->interval.end = start;
+
3947
+
3948 if (apex && apex->match(text, this->interval.end, end, flags))
+
3949 this->interval.end = apex->interval.end;
+
3950
+
3951 if (eyes->match(text, this->interval.end, end, flags)) {
+
3952 if (nose && nose->match(text, eyes->interval.end, end, flags) &&
+
3953 mouth->match(text, nose->interval.end, end, flags))
+
3954 {
+
3955 size_t
+ +
3957 hit_offset = mouth->hit_offset;
+
3958 // Mouth may repeat :-)))))))
+
3959 for (this->interval.end = mouth->interval.end; mouth->match(text, this->interval.end, end, flags) && mouth->hit_offset == hit_offset; this->interval.end = mouth->interval.end);
+
3960 mouth->interval.start = start_mouth;
+
3961 mouth->interval.end = this->interval.end;
+
3962 this->interval.start = start;
+
3963 return true;
+
3964 }
+
3965 if (mouth->match(text, eyes->interval.end, end, flags)) {
+
3966 size_t
+ +
3968 hit_offset = mouth->hit_offset;
+
3969 // Mouth may repeat :-)))))))
+
3970 for (this->interval.end = mouth->interval.end; mouth->match(text, this->interval.end, end, flags) && mouth->hit_offset == hit_offset; this->interval.end = mouth->interval.end);
+
3971 if (nose) nose->invalidate();
+
3972 mouth->interval.start = start_mouth;
+
3973 mouth->interval.end = this->interval.end;
+
3974 this->interval.start = start;
+
3975 return true;
+
3976 }
+
3977 }
+
3978
+
3979 if (emoticon) emoticon->invalidate();
+
3980 if (apex) apex->invalidate();
+
3981 eyes->invalidate();
+
3982 if (nose) nose->invalidate();
+
3983 mouth->invalidate();
+
3984 this->interval.start = (this->interval.end = start) + 1;
+
3985 return false;
+
3986 }
+
3987
+
3988 virtual void invalidate()
+
3989 {
+
3990 if (emoticon) emoticon->invalidate();
+
3991 if (apex) apex->invalidate();
+
3992 eyes->invalidate();
+
3993 if (nose) nose->invalidate();
+
3994 mouth->invalidate();
+ +
3996 }
3997
- - -
4000#ifdef _UNICODE
-
4001 using temoticon = wemoticon;
-
4002#else
-
4003 using temoticon = emoticon;
-
4004#endif
- -
4006
-
4010 enum date_format_t {
-
4011 date_format_none = 0,
-
4012 date_format_dmy = 0x1,
-
4013 date_format_mdy = 0x2,
-
4014 date_format_ymd = 0x4,
-
4015 date_format_ym = 0x8,
-
4016 date_format_my = 0x10,
-
4017 date_format_dm = 0x20,
-
4018 date_format_md = 0x40,
-
4019 };
-
4020
-
4024 template <class T>
-
-
4025 class basic_date : public basic_parser<T>
-
4026 {
-
4027 public:
-
4028 basic_date(
-
4029 _In_ int format_mask,
-
4030 _In_ const std::shared_ptr<basic_integer<T>>& _day,
-
4031 _In_ const std::shared_ptr<basic_integer<T>>& _month,
-
4032 _In_ const std::shared_ptr<basic_integer<T>>& _year,
-
4033 _In_ const std::shared_ptr<basic_set<T>>& separator,
-
4034 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
4035 _In_ const std::locale& locale = std::locale()) :
-
4036 basic_parser<T>(locale),
-
4037 format(date_format_none),
-
4038 m_format_mask(format_mask),
-
4039 day(_day),
-
4040 month(_month),
-
4041 year(_year),
-
4042 m_separator(separator),
-
4043 m_space(space)
-
4044 {}
-
4045
-
4046 virtual bool match(
-
4047 _In_reads_or_z_(end) const T* text,
-
4048 _In_ size_t start = 0,
-
4049 _In_ size_t end = (size_t)-1,
-
4050 _In_ int flags = match_default)
-
4051 {
-
4052 assert(text || start >= end);
+
3998 public:
+
3999 std::shared_ptr<basic_parser<T>> emoticon;
+
4000 std::shared_ptr<basic_parser<T>> apex;
+
4001 std::shared_ptr<basic_parser<T>> eyes;
+
4002 std::shared_ptr<basic_parser<T>> nose;
+
4003 std::shared_ptr<basic_set<T>> mouth;
+
4004 };
+
+
4005
+ + +
4008#ifdef _UNICODE
+
4009 using temoticon = wemoticon;
+
4010#else
+
4011 using temoticon = emoticon;
+
4012#endif
+ +
4014
+
4018 enum date_format_t {
+
4019 date_format_none = 0,
+
4020 date_format_dmy = 0x1,
+
4021 date_format_mdy = 0x2,
+
4022 date_format_ymd = 0x4,
+
4023 date_format_ym = 0x8,
+
4024 date_format_my = 0x10,
+
4025 date_format_dm = 0x20,
+
4026 date_format_md = 0x40,
+
4027 };
+
4028
+
4032 template <class T>
+
+
4033 class basic_date : public basic_parser<T>
+
4034 {
+
4035 public:
+
4036 basic_date(
+
4037 _In_ int format_mask,
+
4038 _In_ const std::shared_ptr<basic_integer<T>>& _day,
+
4039 _In_ const std::shared_ptr<basic_integer<T>>& _month,
+
4040 _In_ const std::shared_ptr<basic_integer<T>>& _year,
+
4041 _In_ const std::shared_ptr<basic_set<T>>& separator,
+
4042 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
4043 _In_ const std::locale& locale = std::locale()) :
+
4044 basic_parser<T>(locale),
+
4045 format(date_format_none),
+
4046 m_format_mask(format_mask),
+
4047 day(_day),
+
4048 month(_month),
+
4049 year(_year),
+
4050 m_separator(separator),
+
4051 m_space(space)
+
4052 {}
4053
-
4054 const int space_match_flags = flags & ~match_multiline; // Spaces in dates must never be broken in new line.
-
4055 if ((m_format_mask & date_format_dmy) == date_format_dmy) {
-
4056 if (day->match(text, start, end, flags)) {
-
4057 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4058 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4059 size_t hit_offset = m_separator->hit_offset;
-
4060 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4061 if (month->match(text, this->interval.end, end, flags)) {
-
4062 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4063 if (m_separator->match(text, this->interval.end, end, flags) &&
-
4064 m_separator->hit_offset == hit_offset) // Both separators must match.
-
4065 {
-
4066 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4067 if (year->match(text, this->interval.end, end, flags) &&
-
4068 is_valid(day->value, month->value))
-
4069 {
-
4070 this->interval.start = start;
-
4071 this->interval.end = year->interval.end;
-
4072 format = date_format_dmy;
-
4073 return true;
-
4074 }
-
4075 }
-
4076 }
-
4077 }
-
4078 }
-
4079 }
-
4080
-
4081 if ((m_format_mask & date_format_mdy) == date_format_mdy) {
-
4082 if (month->match(text, start, end, flags)) {
-
4083 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4084 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4085 size_t hit_offset = m_separator->hit_offset;
-
4086 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4087 if (day->match(text, this->interval.end, end, flags)) {
-
4088 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4089 if (m_separator->match(text, this->interval.end, end, flags) &&
-
4090 m_separator->hit_offset == hit_offset) // Both separators must match.
-
4091 {
-
4092 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4093 if (year->match(text, this->interval.end, end, flags) &&
-
4094 is_valid(day->value, month->value))
-
4095 {
-
4096 this->interval.start = start;
-
4097 this->interval.end = year->interval.end;
-
4098 format = date_format_mdy;
-
4099 return true;
-
4100 }
-
4101 }
-
4102 }
-
4103 }
-
4104 }
-
4105 }
-
4106
-
4107 if ((m_format_mask & date_format_ymd) == date_format_ymd) {
-
4108 if (year->match(text, start, end, flags)) {
-
4109 for (this->interval.end = year->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4110 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4111 size_t hit_offset = m_separator->hit_offset;
-
4112 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4113 if (month->match(text, this->interval.end, end, flags)) {
-
4114 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4115 if (m_separator->match(text, this->interval.end, end, flags) &&
-
4116 m_separator->hit_offset == hit_offset) // Both separators must match.
-
4117 {
-
4118 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4119 if (day->match(text, this->interval.end, end, flags) &&
-
4120 is_valid(day->value, month->value))
-
4121 {
-
4122 this->interval.start = start;
-
4123 this->interval.end = day->interval.end;
-
4124 format = date_format_ymd;
-
4125 return true;
-
4126 }
-
4127 }
-
4128 }
-
4129 }
-
4130 }
-
4131 }
-
4132
-
4133 if ((m_format_mask & date_format_ym) == date_format_ym) {
-
4134 if (year->match(text, start, end, flags)) {
-
4135 for (this->interval.end = year->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4136 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4137 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4138 if (month->match(text, this->interval.end, end, flags) &&
-
4139 is_valid((size_t)-1, month->value))
-
4140 {
-
4141 if (day) day->invalidate();
-
4142 this->interval.start = start;
-
4143 this->interval.end = month->interval.end;
-
4144 format = date_format_ym;
-
4145 return true;
-
4146 }
-
4147 }
-
4148 }
-
4149 }
-
4150
-
4151 if ((m_format_mask & date_format_my) == date_format_my) {
-
4152 if (month->match(text, start, end, flags)) {
-
4153 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4154 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4155 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4156 if (year->match(text, this->interval.end, end, flags) &&
-
4157 is_valid((size_t)-1, month->value))
-
4158 {
-
4159 if (day) day->invalidate();
-
4160 this->interval.start = start;
-
4161 this->interval.end = year->interval.end;
-
4162 format = date_format_my;
-
4163 return true;
-
4164 }
-
4165 }
-
4166 }
-
4167 }
-
4168
-
4169 if ((m_format_mask & date_format_dm) == date_format_dm) {
-
4170 if (day->match(text, start, end, flags)) {
-
4171 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4172 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4173 size_t hit_offset = m_separator->hit_offset;
-
4174 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4175 if (month->match(text, this->interval.end, end, flags) &&
-
4176 is_valid(day->value, month->value))
-
4177 {
-
4178 if (year) year->invalidate();
-
4179 this->interval.start = start;
-
4180 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4181 if (m_separator->match(text, this->interval.end, end, flags) &&
-
4182 m_separator->hit_offset == hit_offset) // Both separators must match.
-
4183 this->interval.end = m_separator->interval.end;
-
4184 else
-
4185 this->interval.end = month->interval.end;
-
4186 format = date_format_dm;
-
4187 return true;
-
4188 }
-
4189 }
-
4190 }
-
4191 }
-
4192
-
4193 if ((m_format_mask & date_format_md) == date_format_md) {
-
4194 if (month->match(text, start, end, flags)) {
-
4195 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4196 if (m_separator->match(text, this->interval.end, end, flags)) {
-
4197 size_t hit_offset = m_separator->hit_offset;
-
4198 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4199 if (day->match(text, this->interval.end, end, flags) &&
-
4200 is_valid(day->value, month->value))
-
4201 {
-
4202 if (year) year->invalidate();
-
4203 this->interval.start = start;
-
4204 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
-
4205 if (m_separator->match(text, this->interval.end, end, flags) &&
-
4206 m_separator->hit_offset == hit_offset) // Both separators must match.
-
4207 this->interval.end = m_separator->interval.end;
-
4208 else
-
4209 this->interval.end = day->interval.end;
-
4210 format = date_format_md;
-
4211 return true;
-
4212 }
-
4213 }
-
4214 }
-
4215 }
-
4216
-
4217 if (day) day->invalidate();
-
4218 if (month) month->invalidate();
-
4219 if (year) year->invalidate();
-
4220 format = date_format_none;
-
4221 this->interval.start = (this->interval.end = start) + 1;
-
4222 return false;
-
4223 }
+
4054 virtual bool match(
+
4055 _In_reads_or_z_(end) const T* text,
+
4056 _In_ size_t start = 0,
+
4057 _In_ size_t end = (size_t)-1,
+
4058 _In_ int flags = match_default)
+
4059 {
+
4060 assert(text || start >= end);
+
4061
+
4062 const int space_match_flags = flags & ~match_multiline; // Spaces in dates must never be broken in new line.
+
4063 if ((m_format_mask & date_format_dmy) == date_format_dmy) {
+
4064 if (day->match(text, start, end, flags)) {
+
4065 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4066 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4067 size_t hit_offset = m_separator->hit_offset;
+
4068 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4069 if (month->match(text, this->interval.end, end, flags)) {
+
4070 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4071 if (m_separator->match(text, this->interval.end, end, flags) &&
+
4072 m_separator->hit_offset == hit_offset) // Both separators must match.
+
4073 {
+
4074 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4075 if (year->match(text, this->interval.end, end, flags) &&
+
4076 is_valid(day->value, month->value))
+
4077 {
+
4078 this->interval.start = start;
+
4079 this->interval.end = year->interval.end;
+
4080 format = date_format_dmy;
+
4081 return true;
+
4082 }
+
4083 }
+
4084 }
+
4085 }
+
4086 }
+
4087 }
+
4088
+
4089 if ((m_format_mask & date_format_mdy) == date_format_mdy) {
+
4090 if (month->match(text, start, end, flags)) {
+
4091 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4092 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4093 size_t hit_offset = m_separator->hit_offset;
+
4094 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4095 if (day->match(text, this->interval.end, end, flags)) {
+
4096 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4097 if (m_separator->match(text, this->interval.end, end, flags) &&
+
4098 m_separator->hit_offset == hit_offset) // Both separators must match.
+
4099 {
+
4100 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4101 if (year->match(text, this->interval.end, end, flags) &&
+
4102 is_valid(day->value, month->value))
+
4103 {
+
4104 this->interval.start = start;
+
4105 this->interval.end = year->interval.end;
+
4106 format = date_format_mdy;
+
4107 return true;
+
4108 }
+
4109 }
+
4110 }
+
4111 }
+
4112 }
+
4113 }
+
4114
+
4115 if ((m_format_mask & date_format_ymd) == date_format_ymd) {
+
4116 if (year->match(text, start, end, flags)) {
+
4117 for (this->interval.end = year->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4118 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4119 size_t hit_offset = m_separator->hit_offset;
+
4120 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4121 if (month->match(text, this->interval.end, end, flags)) {
+
4122 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4123 if (m_separator->match(text, this->interval.end, end, flags) &&
+
4124 m_separator->hit_offset == hit_offset) // Both separators must match.
+
4125 {
+
4126 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4127 if (day->match(text, this->interval.end, end, flags) &&
+
4128 is_valid(day->value, month->value))
+
4129 {
+
4130 this->interval.start = start;
+
4131 this->interval.end = day->interval.end;
+
4132 format = date_format_ymd;
+
4133 return true;
+
4134 }
+
4135 }
+
4136 }
+
4137 }
+
4138 }
+
4139 }
+
4140
+
4141 if ((m_format_mask & date_format_ym) == date_format_ym) {
+
4142 if (year->match(text, start, end, flags)) {
+
4143 for (this->interval.end = year->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4144 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4145 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4146 if (month->match(text, this->interval.end, end, flags) &&
+
4147 is_valid((size_t)-1, month->value))
+
4148 {
+
4149 if (day) day->invalidate();
+
4150 this->interval.start = start;
+
4151 this->interval.end = month->interval.end;
+
4152 format = date_format_ym;
+
4153 return true;
+
4154 }
+
4155 }
+
4156 }
+
4157 }
+
4158
+
4159 if ((m_format_mask & date_format_my) == date_format_my) {
+
4160 if (month->match(text, start, end, flags)) {
+
4161 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4162 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4163 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4164 if (year->match(text, this->interval.end, end, flags) &&
+
4165 is_valid((size_t)-1, month->value))
+
4166 {
+
4167 if (day) day->invalidate();
+
4168 this->interval.start = start;
+
4169 this->interval.end = year->interval.end;
+
4170 format = date_format_my;
+
4171 return true;
+
4172 }
+
4173 }
+
4174 }
+
4175 }
+
4176
+
4177 if ((m_format_mask & date_format_dm) == date_format_dm) {
+
4178 if (day->match(text, start, end, flags)) {
+
4179 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4180 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4181 size_t hit_offset = m_separator->hit_offset;
+
4182 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4183 if (month->match(text, this->interval.end, end, flags) &&
+
4184 is_valid(day->value, month->value))
+
4185 {
+
4186 if (year) year->invalidate();
+
4187 this->interval.start = start;
+
4188 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4189 if (m_separator->match(text, this->interval.end, end, flags) &&
+
4190 m_separator->hit_offset == hit_offset) // Both separators must match.
+
4191 this->interval.end = m_separator->interval.end;
+
4192 else
+
4193 this->interval.end = month->interval.end;
+
4194 format = date_format_dm;
+
4195 return true;
+
4196 }
+
4197 }
+
4198 }
+
4199 }
+
4200
+
4201 if ((m_format_mask & date_format_md) == date_format_md) {
+
4202 if (month->match(text, start, end, flags)) {
+
4203 for (this->interval.end = month->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4204 if (m_separator->match(text, this->interval.end, end, flags)) {
+
4205 size_t hit_offset = m_separator->hit_offset;
+
4206 for (this->interval.end = m_separator->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4207 if (day->match(text, this->interval.end, end, flags) &&
+
4208 is_valid(day->value, month->value))
+
4209 {
+
4210 if (year) year->invalidate();
+
4211 this->interval.start = start;
+
4212 for (this->interval.end = day->interval.end; m_space->match(text, this->interval.end, end, space_match_flags); this->interval.end = m_space->interval.end);
+
4213 if (m_separator->match(text, this->interval.end, end, flags) &&
+
4214 m_separator->hit_offset == hit_offset) // Both separators must match.
+
4215 this->interval.end = m_separator->interval.end;
+
4216 else
+
4217 this->interval.end = day->interval.end;
+
4218 format = date_format_md;
+
4219 return true;
+
4220 }
+
4221 }
+
4222 }
+
4223 }
4224
-
4225 virtual void invalidate()
-
4226 {
-
4227 if (day) day->invalidate();
-
4228 if (month) month->invalidate();
-
4229 if (year) year->invalidate();
-
4230 format = date_format_none;
- -
4232 }
-
4233
-
4234 protected:
-
4235 static inline bool is_valid(size_t day, size_t month)
-
4236 {
-
4237 if (month == (size_t)-1) {
-
4238 // Default to January. This allows validating day only, as January has all 31 days.
-
4239 month = 1;
-
4240 }
-
4241 if (day == (size_t)-1) {
-
4242 // Default to 1st day in month. This allows validating month only, as each month has 1st day.
-
4243 day = 1;
-
4244 }
-
4245
-
4246 switch (month) {
-
4247 case 1:
-
4248 case 3:
-
4249 case 5:
-
4250 case 7:
-
4251 case 8:
-
4252 case 10:
-
4253 case 12:
-
4254 return 1 <= day && day <= 31;
-
4255 case 2:
-
4256 return 1 <= day && day <= 29;
-
4257 case 4:
-
4258 case 6:
-
4259 case 9:
-
4260 case 11:
-
4261 return 1 <= day && day <= 30;
-
4262 default:
-
4263 return false;
-
4264 }
-
4265 }
-
4266
-
4267 public:
-
4268 date_format_t format;
-
4269 std::shared_ptr<basic_integer<T>> day;
-
4270 std::shared_ptr<basic_integer<T>> month;
-
4271 std::shared_ptr<basic_integer<T>> year;
-
4272
-
4273 protected:
-
4274 int m_format_mask;
-
4275 std::shared_ptr<basic_set<T>> m_separator;
-
4276 std::shared_ptr<basic_parser<T>> m_space;
-
4277 };
+
4225 if (day) day->invalidate();
+
4226 if (month) month->invalidate();
+
4227 if (year) year->invalidate();
+
4228 format = date_format_none;
+
4229 this->interval.start = (this->interval.end = start) + 1;
+
4230 return false;
+
4231 }
+
4232
+
4233 virtual void invalidate()
+
4234 {
+
4235 if (day) day->invalidate();
+
4236 if (month) month->invalidate();
+
4237 if (year) year->invalidate();
+
4238 format = date_format_none;
+ +
4240 }
+
4241
+
4242 protected:
+
4243 static inline bool is_valid(size_t day, size_t month)
+
4244 {
+
4245 if (month == (size_t)-1) {
+
4246 // Default to January. This allows validating day only, as January has all 31 days.
+
4247 month = 1;
+
4248 }
+
4249 if (day == (size_t)-1) {
+
4250 // Default to 1st day in month. This allows validating month only, as each month has 1st day.
+
4251 day = 1;
+
4252 }
+
4253
+
4254 switch (month) {
+
4255 case 1:
+
4256 case 3:
+
4257 case 5:
+
4258 case 7:
+
4259 case 8:
+
4260 case 10:
+
4261 case 12:
+
4262 return 1 <= day && day <= 31;
+
4263 case 2:
+
4264 return 1 <= day && day <= 29;
+
4265 case 4:
+
4266 case 6:
+
4267 case 9:
+
4268 case 11:
+
4269 return 1 <= day && day <= 30;
+
4270 default:
+
4271 return false;
+
4272 }
+
4273 }
+
4274
+
4275 public:
+
4276 date_format_t format;
+
4277 std::shared_ptr<basic_integer<T>> day;
+
4278 std::shared_ptr<basic_integer<T>> month;
+
4279 std::shared_ptr<basic_integer<T>> year;
+
4280
+
4281 protected:
+
4282 int m_format_mask;
+
4283 std::shared_ptr<basic_set<T>> m_separator;
+
4284 std::shared_ptr<basic_parser<T>> m_space;
+
4285 };
-
4278
-
4279 using date = basic_date<char>;
-
4280 using wdate = basic_date<wchar_t>;
-
4281#ifdef _UNICODE
-
4282 using tdate = wdate;
-
4283#else
-
4284 using tdate = date;
-
4285#endif
- -
4287
-
4291 template <class T>
-
-
4292 class basic_time : public basic_parser<T>
-
4293 {
-
4294 public:
-
4295 basic_time(
-
4296 _In_ const std::shared_ptr<basic_integer10<T>>& _hour,
-
4297 _In_ const std::shared_ptr<basic_integer10<T>>& _minute,
-
4298 _In_ const std::shared_ptr<basic_integer10<T>>& _second,
-
4299 _In_ const std::shared_ptr<basic_integer10<T>>& _millisecond,
-
4300 _In_ const std::shared_ptr<basic_set<T>>& separator,
-
4301 _In_ const std::shared_ptr<basic_parser<T>>& millisecond_separator,
-
4302 _In_ const std::locale& locale = std::locale()) :
-
4303 basic_parser<T>(locale),
-
4304 hour(_hour),
-
4305 minute(_minute),
-
4306 second(_second),
-
4307 millisecond(_millisecond),
-
4308 m_separator(separator),
-
4309 m_millisecond_separator(millisecond_separator)
-
4310 {}
-
4311
-
4312 virtual bool match(
-
4313 _In_reads_or_z_(end) const T* text,
-
4314 _In_ size_t start = 0,
-
4315 _In_ size_t end = (size_t)-1,
-
4316 _In_ int flags = match_default)
-
4317 {
-
4318 assert(text || start >= end);
+
4286
+
4287 using date = basic_date<char>;
+
4288 using wdate = basic_date<wchar_t>;
+
4289#ifdef _UNICODE
+
4290 using tdate = wdate;
+
4291#else
+
4292 using tdate = date;
+
4293#endif
+ +
4295
+
4299 template <class T>
+
+
4300 class basic_time : public basic_parser<T>
+
4301 {
+
4302 public:
+
4303 basic_time(
+
4304 _In_ const std::shared_ptr<basic_integer10<T>>& _hour,
+
4305 _In_ const std::shared_ptr<basic_integer10<T>>& _minute,
+
4306 _In_ const std::shared_ptr<basic_integer10<T>>& _second,
+
4307 _In_ const std::shared_ptr<basic_integer10<T>>& _millisecond,
+
4308 _In_ const std::shared_ptr<basic_set<T>>& separator,
+
4309 _In_ const std::shared_ptr<basic_parser<T>>& millisecond_separator,
+
4310 _In_ const std::locale& locale = std::locale()) :
+
4311 basic_parser<T>(locale),
+
4312 hour(_hour),
+
4313 minute(_minute),
+
4314 second(_second),
+
4315 millisecond(_millisecond),
+
4316 m_separator(separator),
+
4317 m_millisecond_separator(millisecond_separator)
+
4318 {}
4319
-
4320 if (hour->match(text, start, end, flags) &&
-
4321 m_separator->match(text, hour->interval.end, end, flags) &&
-
4322 minute->match(text, m_separator->interval.end, end, flags) &&
-
4323 minute->value < 60)
-
4324 {
-
4325 // hh::mm
-
4326 size_t hit_offset = m_separator->hit_offset;
-
4327 if (m_separator->match(text, minute->interval.end, end, flags) &&
-
4328 m_separator->hit_offset == hit_offset && // Both separators must match.
-
4329 second && second->match(text, m_separator->interval.end, end, flags) &&
-
4330 second->value < 60)
-
4331 {
-
4332 // hh::mm:ss
-
4333 if (m_millisecond_separator && m_millisecond_separator->match(text, second->interval.end, end, flags) &&
-
4334 millisecond && millisecond->match(text, m_millisecond_separator->interval.end, end, flags) &&
-
4335 millisecond->value < 1000)
-
4336 {
-
4337 // hh::mm:ss.mmmm
-
4338 this->interval.end = millisecond->interval.end;
-
4339 }
-
4340 else {
-
4341 if (millisecond) millisecond->invalidate();
-
4342 this->interval.end = second->interval.end;
-
4343 }
-
4344 }
-
4345 else {
-
4346 if (second) second->invalidate();
-
4347 if (millisecond) millisecond->invalidate();
-
4348 this->interval.end = minute->interval.end;
-
4349 }
-
4350 this->interval.start = start;
-
4351 return true;
-
4352 }
-
4353
-
4354 hour->invalidate();
-
4355 minute->invalidate();
-
4356 if (second) second->invalidate();
-
4357 if (millisecond) millisecond->invalidate();
-
4358 this->interval.start = (this->interval.end = start) + 1;
-
4359 return false;
-
4360 }
+
4320 virtual bool match(
+
4321 _In_reads_or_z_(end) const T* text,
+
4322 _In_ size_t start = 0,
+
4323 _In_ size_t end = (size_t)-1,
+
4324 _In_ int flags = match_default)
+
4325 {
+
4326 assert(text || start >= end);
+
4327
+
4328 if (hour->match(text, start, end, flags) &&
+
4329 m_separator->match(text, hour->interval.end, end, flags) &&
+
4330 minute->match(text, m_separator->interval.end, end, flags) &&
+
4331 minute->value < 60)
+
4332 {
+
4333 // hh::mm
+
4334 size_t hit_offset = m_separator->hit_offset;
+
4335 if (m_separator->match(text, minute->interval.end, end, flags) &&
+
4336 m_separator->hit_offset == hit_offset && // Both separators must match.
+
4337 second && second->match(text, m_separator->interval.end, end, flags) &&
+
4338 second->value < 60)
+
4339 {
+
4340 // hh::mm:ss
+
4341 if (m_millisecond_separator && m_millisecond_separator->match(text, second->interval.end, end, flags) &&
+
4342 millisecond && millisecond->match(text, m_millisecond_separator->interval.end, end, flags) &&
+
4343 millisecond->value < 1000)
+
4344 {
+
4345 // hh::mm:ss.mmmm
+
4346 this->interval.end = millisecond->interval.end;
+
4347 }
+
4348 else {
+
4349 if (millisecond) millisecond->invalidate();
+
4350 this->interval.end = second->interval.end;
+
4351 }
+
4352 }
+
4353 else {
+
4354 if (second) second->invalidate();
+
4355 if (millisecond) millisecond->invalidate();
+
4356 this->interval.end = minute->interval.end;
+
4357 }
+
4358 this->interval.start = start;
+
4359 return true;
+
4360 }
4361
-
4362 virtual void invalidate()
-
4363 {
-
4364 hour->invalidate();
-
4365 minute->invalidate();
-
4366 if (second) second->invalidate();
-
4367 if (millisecond) millisecond->invalidate();
- -
4369 }
-
4370
-
4371 public:
-
4372 std::shared_ptr<basic_integer10<T>> hour;
-
4373 std::shared_ptr<basic_integer10<T>> minute;
-
4374 std::shared_ptr<basic_integer10<T>> second;
-
4375 std::shared_ptr<basic_integer10<T>> millisecond;
-
4376
-
4377 protected:
-
4378 std::shared_ptr<basic_set<T>> m_separator;
-
4379 std::shared_ptr<basic_parser<T>> m_millisecond_separator;
-
4380 };
+
4362 hour->invalidate();
+
4363 minute->invalidate();
+
4364 if (second) second->invalidate();
+
4365 if (millisecond) millisecond->invalidate();
+
4366 this->interval.start = (this->interval.end = start) + 1;
+
4367 return false;
+
4368 }
+
4369
+
4370 virtual void invalidate()
+
4371 {
+
4372 hour->invalidate();
+
4373 minute->invalidate();
+
4374 if (second) second->invalidate();
+
4375 if (millisecond) millisecond->invalidate();
+ +
4377 }
+
4378
+
4379 public:
+
4380 std::shared_ptr<basic_integer10<T>> hour;
+
4381 std::shared_ptr<basic_integer10<T>> minute;
+
4382 std::shared_ptr<basic_integer10<T>> second;
+
4383 std::shared_ptr<basic_integer10<T>> millisecond;
+
4384
+
4385 protected:
+
4386 std::shared_ptr<basic_set<T>> m_separator;
+
4387 std::shared_ptr<basic_parser<T>> m_millisecond_separator;
+
4388 };
-
4381
-
4382 using time = basic_time<char>;
-
4383 using wtime = basic_time<wchar_t>;
-
4384#ifdef _UNICODE
-
4385 using ttime = wtime;
-
4386#else
-
4387 using ttime = time;
-
4388#endif
- -
4390
-
4394 template <class T>
-
-
4395 class basic_angle : public basic_parser<T>
-
4396 {
-
4397 public:
- -
4399 _In_ const std::shared_ptr<basic_integer10<T>>& _degree,
-
4400 _In_ const std::shared_ptr<basic_parser<T>>& _degree_separator,
-
4401 _In_ const std::shared_ptr<basic_integer10<T>>& _minute,
-
4402 _In_ const std::shared_ptr<basic_parser<T>>& _minute_separator,
-
4403 _In_ const std::shared_ptr<basic_integer10<T>>& _second,
-
4404 _In_ const std::shared_ptr<basic_parser<T>>& _second_separator,
-
4405 _In_ const std::shared_ptr<basic_parser<T>>& _decimal,
-
4406 _In_ const std::locale& locale = std::locale()) :
-
4407 basic_parser<T>(locale),
-
4408 degree(_degree),
-
4409 degree_separator(_degree_separator),
-
4410 minute(_minute),
-
4411 minute_separator(_minute_separator),
-
4412 second(_second),
-
4413 second_separator(_second_separator),
-
4414 decimal(_decimal)
-
4415 {}
-
4416
-
4417 virtual bool match(
-
4418 _In_reads_or_z_(end) const T* text,
-
4419 _In_ size_t start = 0,
-
4420 _In_ size_t end = (size_t)-1,
-
4421 _In_ int flags = match_default)
-
4422 {
-
4423 assert(text || start >= end);
+
4389
+
4390 using time = basic_time<char>;
+
4391 using wtime = basic_time<wchar_t>;
+
4392#ifdef _UNICODE
+
4393 using ttime = wtime;
+
4394#else
+
4395 using ttime = time;
+
4396#endif
+ +
4398
+
4402 template <class T>
+
+
4403 class basic_angle : public basic_parser<T>
+
4404 {
+
4405 public:
+ +
4407 _In_ const std::shared_ptr<basic_integer10<T>>& _degree,
+
4408 _In_ const std::shared_ptr<basic_parser<T>>& _degree_separator,
+
4409 _In_ const std::shared_ptr<basic_integer10<T>>& _minute,
+
4410 _In_ const std::shared_ptr<basic_parser<T>>& _minute_separator,
+
4411 _In_ const std::shared_ptr<basic_integer10<T>>& _second,
+
4412 _In_ const std::shared_ptr<basic_parser<T>>& _second_separator,
+
4413 _In_ const std::shared_ptr<basic_parser<T>>& _decimal,
+
4414 _In_ const std::locale& locale = std::locale()) :
+
4415 basic_parser<T>(locale),
+
4416 degree(_degree),
+
4417 degree_separator(_degree_separator),
+
4418 minute(_minute),
+
4419 minute_separator(_minute_separator),
+
4420 second(_second),
+
4421 second_separator(_second_separator),
+
4422 decimal(_decimal)
+
4423 {}
4424
-
4425 this->interval.end = start;
-
4426
-
4427 if (degree->match(text, this->interval.end, end, flags) &&
-
4428 degree_separator->match(text, degree->interval.end, end, flags))
-
4429 {
-
4430 // Degrees
-
4431 this->interval.end = degree_separator->interval.end;
-
4432 }
-
4433 else {
-
4434 degree->invalidate();
-
4435 degree_separator->invalidate();
-
4436 }
-
4437
-
4438 if (minute->match(text, this->interval.end, end, flags) &&
-
4439 minute->value < 60 &&
-
4440 minute_separator->match(text, minute->interval.end, end, flags))
-
4441 {
-
4442 // Minutes
-
4443 this->interval.end = minute_separator->interval.end;
+
4425 virtual bool match(
+
4426 _In_reads_or_z_(end) const T* text,
+
4427 _In_ size_t start = 0,
+
4428 _In_ size_t end = (size_t)-1,
+
4429 _In_ int flags = match_default)
+
4430 {
+
4431 assert(text || start >= end);
+
4432
+
4433 this->interval.end = start;
+
4434
+
4435 if (degree->match(text, this->interval.end, end, flags) &&
+
4436 degree_separator->match(text, degree->interval.end, end, flags))
+
4437 {
+
4438 // Degrees
+
4439 this->interval.end = degree_separator->interval.end;
+
4440 }
+
4441 else {
+
4442 degree->invalidate();
+
4443 degree_separator->invalidate();
4444 }
-
4445 else {
-
4446 minute->invalidate();
-
4447 minute_separator->invalidate();
-
4448 }
-
4449
-
4450 if (second && second->match(text, this->interval.end, end, flags) &&
-
4451 second->value < 60)
-
4452 {
-
4453 // Seconds
-
4454 this->interval.end = second->interval.end;
-
4455 if (second_separator && second_separator->match(text, this->interval.end, end, flags))
-
4456 this->interval.end = second_separator->interval.end;
-
4457 else
-
4458 if (second_separator) second_separator->invalidate();
-
4459 }
-
4460 else {
-
4461 if (second) second->invalidate();
-
4462 if (second_separator) second_separator->invalidate();
-
4463 }
-
4464
-
4465 if (degree->interval.start < degree->interval.end ||
-
4466 minute->interval.start < minute->interval.end ||
-
4467 (second && second->interval.start < second->interval.end))
-
4468 {
-
4469 if (decimal && decimal->match(text, this->interval.end, end, flags)) {
-
4470 // Decimals
-
4471 this->interval.end = decimal->interval.end;
-
4472 }
-
4473 else if (decimal)
-
4474 decimal->invalidate();
-
4475 this->interval.start = start;
-
4476 return true;
-
4477 }
-
4478 if (decimal) decimal->invalidate();
-
4479 this->interval.start = (this->interval.end = start) + 1;
-
4480 return false;
-
4481 }
-
4482
-
4483 virtual void invalidate()
-
4484 {
-
4485 degree->invalidate();
-
4486 degree_separator->invalidate();
-
4487 minute->invalidate();
-
4488 minute_separator->invalidate();
-
4489 if (second) second->invalidate();
-
4490 if (second_separator) second_separator->invalidate();
-
4491 if (decimal) decimal->invalidate();
- -
4493 }
-
4494
-
4495 public:
-
4496 std::shared_ptr<basic_integer10<T>> degree;
-
4497 std::shared_ptr<basic_parser<T>> degree_separator;
-
4498 std::shared_ptr<basic_integer10<T>> minute;
-
4499 std::shared_ptr<basic_parser<T>> minute_separator;
-
4500 std::shared_ptr<basic_integer10<T>> second;
-
4501 std::shared_ptr<basic_parser<T>> second_separator;
-
4502 std::shared_ptr<basic_parser<T>> decimal;
-
4503 };
+
4445
+
4446 if (minute->match(text, this->interval.end, end, flags) &&
+
4447 minute->value < 60 &&
+
4448 minute_separator->match(text, minute->interval.end, end, flags))
+
4449 {
+
4450 // Minutes
+
4451 this->interval.end = minute_separator->interval.end;
+
4452 }
+
4453 else {
+
4454 minute->invalidate();
+
4455 minute_separator->invalidate();
+
4456 }
+
4457
+
4458 if (second && second->match(text, this->interval.end, end, flags) &&
+
4459 second->value < 60)
+
4460 {
+
4461 // Seconds
+
4462 this->interval.end = second->interval.end;
+
4463 if (second_separator && second_separator->match(text, this->interval.end, end, flags))
+
4464 this->interval.end = second_separator->interval.end;
+
4465 else
+
4466 if (second_separator) second_separator->invalidate();
+
4467 }
+
4468 else {
+
4469 if (second) second->invalidate();
+
4470 if (second_separator) second_separator->invalidate();
+
4471 }
+
4472
+
4473 if (degree->interval.start < degree->interval.end ||
+
4474 minute->interval.start < minute->interval.end ||
+
4475 (second && second->interval.start < second->interval.end))
+
4476 {
+
4477 if (decimal && decimal->match(text, this->interval.end, end, flags)) {
+
4478 // Decimals
+
4479 this->interval.end = decimal->interval.end;
+
4480 }
+
4481 else if (decimal)
+
4482 decimal->invalidate();
+
4483 this->interval.start = start;
+
4484 return true;
+
4485 }
+
4486 if (decimal) decimal->invalidate();
+
4487 this->interval.start = (this->interval.end = start) + 1;
+
4488 return false;
+
4489 }
+
4490
+
4491 virtual void invalidate()
+
4492 {
+
4493 degree->invalidate();
+
4494 degree_separator->invalidate();
+
4495 minute->invalidate();
+
4496 minute_separator->invalidate();
+
4497 if (second) second->invalidate();
+
4498 if (second_separator) second_separator->invalidate();
+
4499 if (decimal) decimal->invalidate();
+ +
4501 }
+
4502
+
4503 public:
+
4504 std::shared_ptr<basic_integer10<T>> degree;
+
4505 std::shared_ptr<basic_parser<T>> degree_separator;
+
4506 std::shared_ptr<basic_integer10<T>> minute;
+
4507 std::shared_ptr<basic_parser<T>> minute_separator;
+
4508 std::shared_ptr<basic_integer10<T>> second;
+
4509 std::shared_ptr<basic_parser<T>> second_separator;
+
4510 std::shared_ptr<basic_parser<T>> decimal;
+
4511 };
-
4504
-
4505 using angle = basic_angle<char>;
- -
4507#ifdef _UNICODE
-
4508 using RRegElKot = wangle;
-
4509#else
-
4510 using RRegElKot = angle;
-
4511#endif
- -
4513
-
4517 template <class T>
-
- -
4519 {
-
4520 public:
- -
4522 _In_ const std::shared_ptr<basic_parser<T>>& digit,
-
4523 _In_ const std::shared_ptr<basic_parser<T>>& plus_sign,
-
4524 _In_ const std::shared_ptr<basic_set<T>>& lparenthesis,
-
4525 _In_ const std::shared_ptr<basic_set<T>>& rparenthesis,
-
4526 _In_ const std::shared_ptr<basic_parser<T>>& separator,
-
4527 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
4528 _In_ const std::locale& locale = std::locale()) :
-
4529 basic_parser<T>(locale),
-
4530 m_digit(digit),
-
4531 m_plus_sign(plus_sign),
-
4532 m_lparenthesis(lparenthesis),
-
4533 m_rparenthesis(rparenthesis),
-
4534 m_separator(separator),
-
4535 m_space(space)
-
4536 {}
-
4537
-
4538 virtual bool match(
-
4539 _In_reads_or_z_(end) const T* text,
-
4540 _In_ size_t start = 0,
-
4541 _In_ size_t end = (size_t)-1,
-
4542 _In_ int flags = match_default)
-
4543 {
-
4544 assert(text || start >= end);
+
4512
+
4513 using angle = basic_angle<char>;
+ +
4515#ifdef _UNICODE
+
4516 using RRegElKot = wangle;
+
4517#else
+
4518 using RRegElKot = angle;
+
4519#endif
+ +
4521
+
4525 template <class T>
+
+ +
4527 {
+
4528 public:
+ +
4530 _In_ const std::shared_ptr<basic_parser<T>>& digit,
+
4531 _In_ const std::shared_ptr<basic_parser<T>>& plus_sign,
+
4532 _In_ const std::shared_ptr<basic_set<T>>& lparenthesis,
+
4533 _In_ const std::shared_ptr<basic_set<T>>& rparenthesis,
+
4534 _In_ const std::shared_ptr<basic_parser<T>>& separator,
+
4535 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
4536 _In_ const std::locale& locale = std::locale()) :
+
4537 basic_parser<T>(locale),
+
4538 m_digit(digit),
+
4539 m_plus_sign(plus_sign),
+
4540 m_lparenthesis(lparenthesis),
+
4541 m_rparenthesis(rparenthesis),
+
4542 m_separator(separator),
+
4543 m_space(space)
+
4544 {}
4545
-
4546 size_t safe_digit_end = start, safe_value_size = 0;
-
4547 bool has_digits = false, after_digit = false, in_parentheses = false, after_parentheses = false;
-
4548 const int space_match_flags = flags & ~match_multiline; // Spaces in phone numbers must never be broken in new line.
-
4549
-
4550 this->interval.end = start;
-
4551 value.clear();
-
4552 m_lparenthesis->invalidate();
-
4553 m_rparenthesis->invalidate();
-
4554
-
4555 if (m_plus_sign && m_plus_sign->match(text, this->interval.end, end, flags)) {
-
4556 value.append(text + m_plus_sign->interval.start, text + m_plus_sign->interval.end);
-
4557 safe_value_size = value.size();
-
4558 this->interval.end = m_plus_sign->interval.end;
-
4559 }
-
4560
-
4561 for (;;) {
-
4562 assert(text || this->interval.end >= end);
-
4563 if (this->interval.end >= end || !text[this->interval.end])
-
4564 break;
-
4565 if (m_digit->match(text, this->interval.end, end, flags)) {
-
4566 // Digit
-
4567 value.append(text + m_digit->interval.start, text + m_digit->interval.end);
-
4568 this->interval.end = m_digit->interval.end;
-
4569 if (!in_parentheses) {
-
4570 safe_digit_end = this->interval.end;
-
4571 safe_value_size = value.size();
-
4572 has_digits = true;
-
4573 }
-
4574 after_digit = true;
-
4575 after_parentheses = false;
-
4576 }
-
4577 else if (
-
4578 m_lparenthesis && !m_lparenthesis->interval && // No left parenthesis yet
-
4579 m_rparenthesis && !m_rparenthesis->interval && // Right parenthesis after left
-
4580 m_lparenthesis->match(text, this->interval.end, end, flags))
-
4581 {
-
4582 // Left parenthesis
-
4583 value.append(text + m_lparenthesis->interval.start, m_lparenthesis->interval.size());
-
4584 this->interval.end = m_lparenthesis->interval.end;
-
4585 in_parentheses = true;
-
4586 after_digit = false;
-
4587 after_parentheses = false;
-
4588 }
-
4589 else if (
-
4590 in_parentheses && // After left parenthesis
-
4591 m_rparenthesis && !m_rparenthesis->interval && // No right parenthesis yet
-
4592 m_rparenthesis->match(text, this->interval.end, end, flags) &&
-
4593 m_lparenthesis->hit_offset == m_rparenthesis->hit_offset) // Left and right parentheses must match
-
4594 {
-
4595 // Right parenthesis
-
4596 value.append(text + m_rparenthesis->interval.start, text + m_rparenthesis->interval.end);
-
4597 this->interval.end = m_rparenthesis->interval.end;
-
4598 safe_digit_end = this->interval.end;
-
4599 safe_value_size = value.size();
-
4600 in_parentheses = false;
-
4601 after_digit = false;
-
4602 after_parentheses = true;
-
4603 }
-
4604 else if (
-
4605 after_digit &&
-
4606 !in_parentheses && // No separators inside parentheses
-
4607 !after_parentheses && // No separators following right parenthesis
-
4608 m_separator && m_separator->match(text, this->interval.end, end, flags))
-
4609 {
-
4610 // Separator
-
4611 this->interval.end = m_separator->interval.end;
-
4612 after_digit = false;
-
4613 after_parentheses = false;
-
4614 }
-
4615 else if (
- -
4617 m_space && m_space->match(text, this->interval.end, end, space_match_flags))
-
4618 {
-
4619 // Space
-
4620 this->interval.end = m_space->interval.end;
-
4621 after_digit = false;
-
4622 after_parentheses = false;
-
4623 }
-
4624 else
-
4625 break;
-
4626 }
-
4627 if (has_digits) {
-
4628 value.erase(safe_value_size);
-
4629 this->interval.start = start;
-
4630 this->interval.end = safe_digit_end;
-
4631 return true;
-
4632 }
-
4633 value.clear();
-
4634 this->interval.start = (this->interval.end = start) + 1;
-
4635 return false;
-
4636 }
-
4637
-
4638 virtual void invalidate()
-
4639 {
-
4640 value.clear();
- -
4642 }
-
4643
-
4644 public:
-
4645 std::basic_string<T> value;
-
4646
-
4647 protected:
-
4648 std::shared_ptr<basic_parser<T>> m_digit;
-
4649 std::shared_ptr<basic_parser<T>> m_plus_sign;
-
4650 std::shared_ptr<basic_set<T>> m_lparenthesis;
-
4651 std::shared_ptr<basic_set<T>> m_rparenthesis;
-
4652 std::shared_ptr<basic_parser<T>> m_separator;
-
4653 std::shared_ptr<basic_parser<T>> m_space;
-
4654 };
+
4546 virtual bool match(
+
4547 _In_reads_or_z_(end) const T* text,
+
4548 _In_ size_t start = 0,
+
4549 _In_ size_t end = (size_t)-1,
+
4550 _In_ int flags = match_default)
+
4551 {
+
4552 assert(text || start >= end);
+
4553
+
4554 size_t safe_digit_end = start, safe_value_size = 0;
+
4555 bool has_digits = false, after_digit = false, in_parentheses = false, after_parentheses = false;
+
4556 const int space_match_flags = flags & ~match_multiline; // Spaces in phone numbers must never be broken in new line.
+
4557
+
4558 this->interval.end = start;
+
4559 value.clear();
+
4560 m_lparenthesis->invalidate();
+
4561 m_rparenthesis->invalidate();
+
4562
+
4563 if (m_plus_sign && m_plus_sign->match(text, this->interval.end, end, flags)) {
+
4564 value.append(text + m_plus_sign->interval.start, text + m_plus_sign->interval.end);
+
4565 safe_value_size = value.size();
+
4566 this->interval.end = m_plus_sign->interval.end;
+
4567 }
+
4568
+
4569 for (;;) {
+
4570 assert(text || this->interval.end >= end);
+
4571 if (this->interval.end >= end || !text[this->interval.end])
+
4572 break;
+
4573 if (m_digit->match(text, this->interval.end, end, flags)) {
+
4574 // Digit
+
4575 value.append(text + m_digit->interval.start, text + m_digit->interval.end);
+
4576 this->interval.end = m_digit->interval.end;
+
4577 if (!in_parentheses) {
+
4578 safe_digit_end = this->interval.end;
+
4579 safe_value_size = value.size();
+
4580 has_digits = true;
+
4581 }
+
4582 after_digit = true;
+
4583 after_parentheses = false;
+
4584 }
+
4585 else if (
+
4586 m_lparenthesis && !m_lparenthesis->interval && // No left parenthesis yet
+
4587 m_rparenthesis && !m_rparenthesis->interval && // Right parenthesis after left
+
4588 m_lparenthesis->match(text, this->interval.end, end, flags))
+
4589 {
+
4590 // Left parenthesis
+
4591 value.append(text + m_lparenthesis->interval.start, m_lparenthesis->interval.size());
+
4592 this->interval.end = m_lparenthesis->interval.end;
+
4593 in_parentheses = true;
+
4594 after_digit = false;
+
4595 after_parentheses = false;
+
4596 }
+
4597 else if (
+
4598 in_parentheses && // After left parenthesis
+
4599 m_rparenthesis && !m_rparenthesis->interval && // No right parenthesis yet
+
4600 m_rparenthesis->match(text, this->interval.end, end, flags) &&
+
4601 m_lparenthesis->hit_offset == m_rparenthesis->hit_offset) // Left and right parentheses must match
+
4602 {
+
4603 // Right parenthesis
+
4604 value.append(text + m_rparenthesis->interval.start, text + m_rparenthesis->interval.end);
+
4605 this->interval.end = m_rparenthesis->interval.end;
+
4606 safe_digit_end = this->interval.end;
+
4607 safe_value_size = value.size();
+
4608 in_parentheses = false;
+
4609 after_digit = false;
+
4610 after_parentheses = true;
+
4611 }
+
4612 else if (
+
4613 after_digit &&
+
4614 !in_parentheses && // No separators inside parentheses
+
4615 !after_parentheses && // No separators following right parenthesis
+
4616 m_separator && m_separator->match(text, this->interval.end, end, flags))
+
4617 {
+
4618 // Separator
+
4619 this->interval.end = m_separator->interval.end;
+
4620 after_digit = false;
+
4621 after_parentheses = false;
+
4622 }
+
4623 else if (
+ +
4625 m_space && m_space->match(text, this->interval.end, end, space_match_flags))
+
4626 {
+
4627 // Space
+
4628 this->interval.end = m_space->interval.end;
+
4629 after_digit = false;
+
4630 after_parentheses = false;
+
4631 }
+
4632 else
+
4633 break;
+
4634 }
+
4635 if (has_digits) {
+
4636 value.erase(safe_value_size);
+
4637 this->interval.start = start;
+
4638 this->interval.end = safe_digit_end;
+
4639 return true;
+
4640 }
+
4641 value.clear();
+
4642 this->interval.start = (this->interval.end = start) + 1;
+
4643 return false;
+
4644 }
+
4645
+
4646 virtual void invalidate()
+
4647 {
+
4648 value.clear();
+ +
4650 }
+
4651
+
4652 public:
+
4653 std::basic_string<T> value;
+
4654
+
4655 protected:
+
4656 std::shared_ptr<basic_parser<T>> m_digit;
+
4657 std::shared_ptr<basic_parser<T>> m_plus_sign;
+
4658 std::shared_ptr<basic_set<T>> m_lparenthesis;
+
4659 std::shared_ptr<basic_set<T>> m_rparenthesis;
+
4660 std::shared_ptr<basic_parser<T>> m_separator;
+
4661 std::shared_ptr<basic_parser<T>> m_space;
+
4662 };
-
4655
- - -
4658#ifdef _UNICODE
- -
4660#else
- -
4662#endif
- -
4664
-
4670 template <class T>
-
-
4671 class basic_iban : public basic_parser<T>
-
4672 {
-
4673 public:
-
4674 basic_iban(
-
4675 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
4676 _In_ const std::locale& locale = std::locale()) :
-
4677 basic_parser<T>(locale),
-
4678 m_space(space)
-
4679 {
-
4680 this->country[0] = 0;
-
4681 this->check_digits[0] = 0;
-
4682 this->bban[0] = 0;
-
4683 this->is_valid = false;
-
4684 }
-
4685
-
4686 virtual bool match(
-
4687 _In_reads_or_z_(end) const T* text,
-
4688 _In_ size_t start = 0,
-
4689 _In_ size_t end = (size_t)-1,
-
4690 _In_ int flags = match_default)
-
4691 {
-
4692 assert(text || start >= end);
-
4693 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
-
4694 const bool case_insensitive = flags & match_case_insensitive ? true : false;
-
4695 struct country_t {
-
4696 T country[2];
-
4697 T check_digits[2];
-
4698 size_t length;
-
4699 };
-
4700 static const country_t s_countries[] = {
-
4701 { { 'A', 'D' }, {}, 24 }, // Andorra
-
4702 { { 'A', 'E' }, {}, 23 }, // United Arab Emirates
-
4703 { { 'A', 'L' }, {}, 28 }, // Albania
-
4704 { { 'A', 'O' }, {}, 25 }, // Angola
-
4705 { { 'A', 'T' }, {}, 20 }, // Austria
-
4706 { { 'A', 'Z' }, {}, 28 }, // Azerbaijan
-
4707 { { 'B', 'A' }, { '3', '9' }, 20}, // Bosnia and Herzegovina
-
4708 { { 'B', 'E' }, {}, 16 }, // Belgium
-
4709 { { 'B', 'F' }, {}, 28 }, // Burkina Faso
-
4710 { { 'B', 'G' }, {}, 22 }, // Bulgaria
-
4711 { { 'B', 'H' }, {}, 22 }, // Bahrain
-
4712 { { 'B', 'I' }, {}, 27 }, // Burundi
-
4713 { { 'B', 'J' }, {}, 28 }, // Benin
-
4714 { { 'B', 'R' }, {}, 29 }, // Brazil
-
4715 { { 'B', 'Y' }, {}, 28 }, // Belarus
-
4716 { { 'C', 'F' }, {}, 27 }, // Central African Republic
-
4717 { { 'C', 'G' }, {}, 27 }, // Congo, Republic of the
-
4718 { { 'C', 'H' }, {}, 21 }, // Switzerland
-
4719 { { 'C', 'I' }, {}, 28 }, // Côte d'Ivoire
-
4720 { { 'C', 'M' }, {}, 27 }, // Cameroon
-
4721 { { 'C', 'R' }, {}, 22 }, // Costa Rica
-
4722 { { 'C', 'V' }, {}, 25 }, // Cabo Verde
-
4723 { { 'C', 'Y' }, {}, 28 }, // Cyprus
-
4724 { { 'C', 'Z' }, {}, 24 }, // Czech Republic
-
4725 { { 'D', 'E' }, {}, 22 }, // Germany
-
4726 { { 'D', 'J' }, {}, 27 }, // Djibouti
-
4727 { { 'D', 'K' }, {}, 18 }, // Denmark
-
4728 { { 'D', 'O' }, {}, 28 }, // Dominican Republic
-
4729 { { 'D', 'Z' }, {}, 26 }, // Algeria
-
4730 { { 'E', 'E' }, {}, 20 }, // Estonia
-
4731 { { 'E', 'G' }, {}, 29 }, // Egypt
-
4732 { { 'E', 'S' }, {}, 24 }, // Spain
-
4733 { { 'F', 'I' }, {}, 18 }, // Finland
-
4734 { { 'F', 'O' }, {}, 18 }, // Faroe Islands
-
4735 { { 'F', 'R' }, {}, 27 }, // France
-
4736 { { 'G', 'A' }, {}, 27 }, // Gabon
-
4737 { { 'G', 'B' }, {}, 22 }, // United Kingdom
-
4738 { { 'G', 'E' }, {}, 22 }, // Georgia
-
4739 { { 'G', 'I' }, {}, 23 }, // Gibraltar
-
4740 { { 'G', 'L' }, {}, 18 }, // Greenland
-
4741 { { 'G', 'Q' }, {}, 27 }, // Equatorial Guinea
-
4742 { { 'G', 'R' }, {}, 27 }, // Greece
-
4743 { { 'G', 'T' }, {}, 28 }, // Guatemala
-
4744 { { 'G', 'W' }, {}, 25 }, // Guinea-Bissau
-
4745 { { 'H', 'N' }, {}, 28 }, // Honduras
-
4746 { { 'H', 'R' }, {}, 21 }, // Croatia
-
4747 { { 'H', 'U' }, {}, 28 }, // Hungary
-
4748 { { 'I', 'E' }, {}, 22 }, // Ireland
-
4749 { { 'I', 'L' }, {}, 23 }, // Israel
-
4750 { { 'I', 'Q' }, {}, 23 }, // Iraq
-
4751 { { 'I', 'R' }, {}, 26 }, // Iran
-
4752 { { 'I', 'S' }, {}, 26 }, // Iceland
-
4753 { { 'I', 'T' }, {}, 27 }, // Italy
-
4754 { { 'J', 'O' }, {}, 30 }, // Jordan
-
4755 { { 'K', 'M' }, {}, 27 }, // Comoros
-
4756 { { 'K', 'W' }, {}, 30 }, // Kuwait
-
4757 { { 'K', 'Z' }, {}, 20 }, // Kazakhstan
-
4758 { { 'L', 'B' }, {}, 28 }, // Lebanon
-
4759 { { 'L', 'C' }, {}, 32 }, // Saint Lucia
-
4760 { { 'L', 'I' }, {}, 21 }, // Liechtenstein
-
4761 { { 'L', 'T' }, {}, 20 }, // Lithuania
-
4762 { { 'L', 'U' }, {}, 20 }, // Luxembourg
-
4763 { { 'L', 'V' }, {}, 21 }, // Latvia
-
4764 { { 'L', 'Y' }, {}, 25 }, // Libya
-
4765 { { 'M', 'A' }, {}, 28 }, // Morocco
-
4766 { { 'M', 'C' }, {}, 27 }, // Monaco
-
4767 { { 'M', 'D' }, {}, 24 }, // Moldova
-
4768 { { 'M', 'E' }, { '2', '5' }, 22 }, // Montenegro
-
4769 { { 'M', 'G' }, {}, 27 }, // Madagascar
-
4770 { { 'M', 'K' }, { '0', '7' }, 19 }, // North Macedonia
-
4771 { { 'M', 'L' }, {}, 28 }, // Mali
-
4772 { { 'M', 'R' }, { '1', '3' }, 27}, // Mauritania
-
4773 { { 'M', 'T' }, {}, 31 }, // Malta
-
4774 { { 'M', 'U' }, {}, 30 }, // Mauritius
-
4775 { { 'M', 'Z' }, {}, 25 }, // Mozambique
-
4776 { { 'N', 'E' }, {}, 28 }, // Niger
-
4777 { { 'N', 'I' }, {}, 32 }, // Nicaragua
-
4778 { { 'N', 'L' }, {}, 18 }, // Netherlands
-
4779 { { 'N', 'O' }, {}, 15 }, // Norway
-
4780 { { 'P', 'K' }, {}, 24 }, // Pakistan
-
4781 { { 'P', 'L' }, {}, 28 }, // Poland
-
4782 { { 'P', 'S' }, {}, 29 }, // Palestinian territories
-
4783 { { 'P', 'T' }, { '5', '0' }, 25 }, // Portugal
-
4784 { { 'Q', 'A' }, {}, 29 }, // Qatar
-
4785 { { 'R', 'O' }, {}, 24 }, // Romania
-
4786 { { 'R', 'S' }, { '3', '5' }, 22 }, // Serbia
-
4787 { { 'R', 'U' }, {}, 33 }, // Russia
-
4788 { { 'S', 'A' }, {}, 24 }, // Saudi Arabia
-
4789 { { 'S', 'C' }, {}, 31 }, // Seychelles
-
4790 { { 'S', 'D' }, {}, 18 }, // Sudan
-
4791 { { 'S', 'E' }, {}, 24 }, // Sweden
-
4792 { { 'S', 'I' }, { '5', '6' }, 19 }, // Slovenia
-
4793 { { 'S', 'K' }, {}, 24 }, // Slovakia
-
4794 { { 'S', 'M' }, {}, 27 }, // San Marino
-
4795 { { 'S', 'N' }, {}, 28 }, // Senegal
-
4796 { { 'S', 'T' }, {}, 25 }, // São Tomé and Príncipe
-
4797 { { 'S', 'V' }, {}, 28 }, // El Salvador
-
4798 { { 'T', 'D' }, {}, 27 }, // Chad
-
4799 { { 'T', 'G' }, {}, 28 }, // Togo
-
4800 { { 'T', 'L' }, { '3', '8' }, 23}, // East Timor
-
4801 { { 'T', 'N' }, { '5', '9' }, 24 }, // Tunisia
-
4802 { { 'T', 'R' }, {}, 26 }, // Turkey
-
4803 { { 'U', 'A' }, {}, 29 }, // Ukraine
-
4804 { { 'V', 'A' }, {}, 22 }, // Vatican City
-
4805 { { 'V', 'G' }, {}, 24 }, // Virgin Islands, British
-
4806 { { 'X', 'K' }, {}, 20 }, // Kosovo
-
4807 };
-
4808 const country_t* country_desc = nullptr;
-
4809 size_t n, available, next, bban_length;
- -
4811
-
4812 this->interval.end = start;
-
4813 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
-
4814 if (this->interval.end >= end || !text[this->interval.end])
-
4815 goto error; // incomplete country code
-
4816 T chr = case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end];
-
4817 if (chr < 'A' || 'Z' < chr)
-
4818 goto error; // invalid country code
-
4819 this->country[i] = chr;
-
4820 }
-
4821 for (size_t l = 0, r = _countof(s_countries);;) {
-
4822 if (l >= r)
-
4823 goto error; // unknown country
-
4824 size_t m = (l + r) / 2;
-
4825 const country_t& c = s_countries[m];
-
4826 if (c.country[0] < this->country[0] || (c.country[0] == this->country[0] && c.country[1] < this->country[1]))
-
4827 l = m + 1;
-
4828 else if (this->country[0] < c.country[0] || (this->country[0] == c.country[0] && this->country[1] < c.country[1]))
-
4829 r = m;
-
4830 else {
-
4831 country_desc = &c;
-
4832 break;
-
4833 }
-
4834 }
-
4835 this->country[2] = 0;
-
4836
-
4837 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
-
4838 if (this->interval.end >= end || text[this->interval.end] < '0' || '9' < text[this->interval.end])
-
4839 goto error; // incomplete or invalid check digits
-
4840 this->check_digits[i] = text[this->interval.end];
-
4841 }
-
4842 this->check_digits[2] = 0;
-
4843
-
4844 if ((country_desc->check_digits[0] && this->check_digits[0] != country_desc->check_digits[0]) ||
-
4845 (country_desc->check_digits[1] && this->check_digits[1] != country_desc->check_digits[1]))
-
4846 goto error; // unexpected check digits
-
4847
-
4848 bban_length = country_desc->length - 4;
-
4849 for (n = 0; n < bban_length;) {
-
4850 if (this->interval.end >= end || !text[this->interval.end])
-
4851 goto error; // bban too short
-
4852 if (m_space && m_space->match(text, this->interval.end, end, flags)) {
-
4853 this->interval.end = m_space->interval.end;
-
4854 continue;
-
4855 }
-
4856 T chr = case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end];
-
4857 if (('0' <= chr && chr <= '9') || ('A' <= chr && chr <= 'Z')) {
-
4858 this->bban[n++] = chr;
-
4859 this->interval.end++;
-
4860 }
-
4861 else
-
4862 goto error; // invalid bban
-
4863 }
-
4864 this->bban[n] = 0;
-
4865
-
4866 // Normalize IBAN.
-
4867 T normalized[69];
-
4868 available = 0;
-
4869 for (size_t i = 0; ; ++i) {
-
4870 if (!this->bban[i]) {
-
4871 for (i = 0; i < 2; ++i) {
-
4872 if ('A' <= this->country[i] && this->country[i] <= 'J') {
-
4873 normalized[available++] = '1';
-
4874 normalized[available++] = '0' + this->country[i] - 'A';
-
4875 }
-
4876 else if ('K' <= this->country[i] && this->country[i] <= 'T') {
-
4877 normalized[available++] = '2';
-
4878 normalized[available++] = '0' + this->country[i] - 'K';
-
4879 }
-
4880 else if ('U' <= this->country[i] && this->country[i] <= 'Z') {
-
4881 normalized[available++] = '3';
-
4882 normalized[available++] = '0' + this->country[i] - 'U';
+
4663
+ + +
4666#ifdef _UNICODE
+ +
4668#else
+ +
4670#endif
+ +
4672
+
4678 template <class T>
+
+
4679 class basic_iban : public basic_parser<T>
+
4680 {
+
4681 public:
+
4682 basic_iban(
+
4683 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
4684 _In_ const std::locale& locale = std::locale()) :
+
4685 basic_parser<T>(locale),
+
4686 m_space(space)
+
4687 {
+
4688 this->country[0] = 0;
+
4689 this->check_digits[0] = 0;
+
4690 this->bban[0] = 0;
+
4691 this->is_valid = false;
+
4692 }
+
4693
+
4694 virtual bool match(
+
4695 _In_reads_or_z_(end) const T* text,
+
4696 _In_ size_t start = 0,
+
4697 _In_ size_t end = (size_t)-1,
+
4698 _In_ int flags = match_default)
+
4699 {
+
4700 assert(text || start >= end);
+
4701 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
+
4702 const bool case_insensitive = flags & match_case_insensitive ? true : false;
+
4703 struct country_t {
+
4704 T country[2];
+
4705 T check_digits[2];
+
4706 size_t length;
+
4707 };
+
4708 static const country_t s_countries[] = {
+
4709 { { 'A', 'D' }, {}, 24 }, // Andorra
+
4710 { { 'A', 'E' }, {}, 23 }, // United Arab Emirates
+
4711 { { 'A', 'L' }, {}, 28 }, // Albania
+
4712 { { 'A', 'O' }, {}, 25 }, // Angola
+
4713 { { 'A', 'T' }, {}, 20 }, // Austria
+
4714 { { 'A', 'Z' }, {}, 28 }, // Azerbaijan
+
4715 { { 'B', 'A' }, { '3', '9' }, 20}, // Bosnia and Herzegovina
+
4716 { { 'B', 'E' }, {}, 16 }, // Belgium
+
4717 { { 'B', 'F' }, {}, 28 }, // Burkina Faso
+
4718 { { 'B', 'G' }, {}, 22 }, // Bulgaria
+
4719 { { 'B', 'H' }, {}, 22 }, // Bahrain
+
4720 { { 'B', 'I' }, {}, 27 }, // Burundi
+
4721 { { 'B', 'J' }, {}, 28 }, // Benin
+
4722 { { 'B', 'R' }, {}, 29 }, // Brazil
+
4723 { { 'B', 'Y' }, {}, 28 }, // Belarus
+
4724 { { 'C', 'F' }, {}, 27 }, // Central African Republic
+
4725 { { 'C', 'G' }, {}, 27 }, // Congo, Republic of the
+
4726 { { 'C', 'H' }, {}, 21 }, // Switzerland
+
4727 { { 'C', 'I' }, {}, 28 }, // Côte d'Ivoire
+
4728 { { 'C', 'M' }, {}, 27 }, // Cameroon
+
4729 { { 'C', 'R' }, {}, 22 }, // Costa Rica
+
4730 { { 'C', 'V' }, {}, 25 }, // Cabo Verde
+
4731 { { 'C', 'Y' }, {}, 28 }, // Cyprus
+
4732 { { 'C', 'Z' }, {}, 24 }, // Czech Republic
+
4733 { { 'D', 'E' }, {}, 22 }, // Germany
+
4734 { { 'D', 'J' }, {}, 27 }, // Djibouti
+
4735 { { 'D', 'K' }, {}, 18 }, // Denmark
+
4736 { { 'D', 'O' }, {}, 28 }, // Dominican Republic
+
4737 { { 'D', 'Z' }, {}, 26 }, // Algeria
+
4738 { { 'E', 'E' }, {}, 20 }, // Estonia
+
4739 { { 'E', 'G' }, {}, 29 }, // Egypt
+
4740 { { 'E', 'S' }, {}, 24 }, // Spain
+
4741 { { 'F', 'I' }, {}, 18 }, // Finland
+
4742 { { 'F', 'O' }, {}, 18 }, // Faroe Islands
+
4743 { { 'F', 'R' }, {}, 27 }, // France
+
4744 { { 'G', 'A' }, {}, 27 }, // Gabon
+
4745 { { 'G', 'B' }, {}, 22 }, // United Kingdom
+
4746 { { 'G', 'E' }, {}, 22 }, // Georgia
+
4747 { { 'G', 'I' }, {}, 23 }, // Gibraltar
+
4748 { { 'G', 'L' }, {}, 18 }, // Greenland
+
4749 { { 'G', 'Q' }, {}, 27 }, // Equatorial Guinea
+
4750 { { 'G', 'R' }, {}, 27 }, // Greece
+
4751 { { 'G', 'T' }, {}, 28 }, // Guatemala
+
4752 { { 'G', 'W' }, {}, 25 }, // Guinea-Bissau
+
4753 { { 'H', 'N' }, {}, 28 }, // Honduras
+
4754 { { 'H', 'R' }, {}, 21 }, // Croatia
+
4755 { { 'H', 'U' }, {}, 28 }, // Hungary
+
4756 { { 'I', 'E' }, {}, 22 }, // Ireland
+
4757 { { 'I', 'L' }, {}, 23 }, // Israel
+
4758 { { 'I', 'Q' }, {}, 23 }, // Iraq
+
4759 { { 'I', 'R' }, {}, 26 }, // Iran
+
4760 { { 'I', 'S' }, {}, 26 }, // Iceland
+
4761 { { 'I', 'T' }, {}, 27 }, // Italy
+
4762 { { 'J', 'O' }, {}, 30 }, // Jordan
+
4763 { { 'K', 'M' }, {}, 27 }, // Comoros
+
4764 { { 'K', 'W' }, {}, 30 }, // Kuwait
+
4765 { { 'K', 'Z' }, {}, 20 }, // Kazakhstan
+
4766 { { 'L', 'B' }, {}, 28 }, // Lebanon
+
4767 { { 'L', 'C' }, {}, 32 }, // Saint Lucia
+
4768 { { 'L', 'I' }, {}, 21 }, // Liechtenstein
+
4769 { { 'L', 'T' }, {}, 20 }, // Lithuania
+
4770 { { 'L', 'U' }, {}, 20 }, // Luxembourg
+
4771 { { 'L', 'V' }, {}, 21 }, // Latvia
+
4772 { { 'L', 'Y' }, {}, 25 }, // Libya
+
4773 { { 'M', 'A' }, {}, 28 }, // Morocco
+
4774 { { 'M', 'C' }, {}, 27 }, // Monaco
+
4775 { { 'M', 'D' }, {}, 24 }, // Moldova
+
4776 { { 'M', 'E' }, { '2', '5' }, 22 }, // Montenegro
+
4777 { { 'M', 'G' }, {}, 27 }, // Madagascar
+
4778 { { 'M', 'K' }, { '0', '7' }, 19 }, // North Macedonia
+
4779 { { 'M', 'L' }, {}, 28 }, // Mali
+
4780 { { 'M', 'R' }, { '1', '3' }, 27}, // Mauritania
+
4781 { { 'M', 'T' }, {}, 31 }, // Malta
+
4782 { { 'M', 'U' }, {}, 30 }, // Mauritius
+
4783 { { 'M', 'Z' }, {}, 25 }, // Mozambique
+
4784 { { 'N', 'E' }, {}, 28 }, // Niger
+
4785 { { 'N', 'I' }, {}, 32 }, // Nicaragua
+
4786 { { 'N', 'L' }, {}, 18 }, // Netherlands
+
4787 { { 'N', 'O' }, {}, 15 }, // Norway
+
4788 { { 'P', 'K' }, {}, 24 }, // Pakistan
+
4789 { { 'P', 'L' }, {}, 28 }, // Poland
+
4790 { { 'P', 'S' }, {}, 29 }, // Palestinian territories
+
4791 { { 'P', 'T' }, { '5', '0' }, 25 }, // Portugal
+
4792 { { 'Q', 'A' }, {}, 29 }, // Qatar
+
4793 { { 'R', 'O' }, {}, 24 }, // Romania
+
4794 { { 'R', 'S' }, { '3', '5' }, 22 }, // Serbia
+
4795 { { 'R', 'U' }, {}, 33 }, // Russia
+
4796 { { 'S', 'A' }, {}, 24 }, // Saudi Arabia
+
4797 { { 'S', 'C' }, {}, 31 }, // Seychelles
+
4798 { { 'S', 'D' }, {}, 18 }, // Sudan
+
4799 { { 'S', 'E' }, {}, 24 }, // Sweden
+
4800 { { 'S', 'I' }, { '5', '6' }, 19 }, // Slovenia
+
4801 { { 'S', 'K' }, {}, 24 }, // Slovakia
+
4802 { { 'S', 'M' }, {}, 27 }, // San Marino
+
4803 { { 'S', 'N' }, {}, 28 }, // Senegal
+
4804 { { 'S', 'T' }, {}, 25 }, // São Tomé and Príncipe
+
4805 { { 'S', 'V' }, {}, 28 }, // El Salvador
+
4806 { { 'T', 'D' }, {}, 27 }, // Chad
+
4807 { { 'T', 'G' }, {}, 28 }, // Togo
+
4808 { { 'T', 'L' }, { '3', '8' }, 23}, // East Timor
+
4809 { { 'T', 'N' }, { '5', '9' }, 24 }, // Tunisia
+
4810 { { 'T', 'R' }, {}, 26 }, // Turkey
+
4811 { { 'U', 'A' }, {}, 29 }, // Ukraine
+
4812 { { 'V', 'A' }, {}, 22 }, // Vatican City
+
4813 { { 'V', 'G' }, {}, 24 }, // Virgin Islands, British
+
4814 { { 'X', 'K' }, {}, 20 }, // Kosovo
+
4815 };
+
4816 const country_t* country_desc = nullptr;
+
4817 size_t n, available, next, bban_length;
+ +
4819
+
4820 this->interval.end = start;
+
4821 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
+
4822 if (this->interval.end >= end || !text[this->interval.end])
+
4823 goto error; // incomplete country code
+
4824 T chr = case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end];
+
4825 if (chr < 'A' || 'Z' < chr)
+
4826 goto error; // invalid country code
+
4827 this->country[i] = chr;
+
4828 }
+
4829 for (size_t l = 0, r = _countof(s_countries);;) {
+
4830 if (l >= r)
+
4831 goto error; // unknown country
+
4832 size_t m = (l + r) / 2;
+
4833 const country_t& c = s_countries[m];
+
4834 if (c.country[0] < this->country[0] || (c.country[0] == this->country[0] && c.country[1] < this->country[1]))
+
4835 l = m + 1;
+
4836 else if (this->country[0] < c.country[0] || (this->country[0] == c.country[0] && this->country[1] < c.country[1]))
+
4837 r = m;
+
4838 else {
+
4839 country_desc = &c;
+
4840 break;
+
4841 }
+
4842 }
+
4843 this->country[2] = 0;
+
4844
+
4845 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
+
4846 if (this->interval.end >= end || text[this->interval.end] < '0' || '9' < text[this->interval.end])
+
4847 goto error; // incomplete or invalid check digits
+
4848 this->check_digits[i] = text[this->interval.end];
+
4849 }
+
4850 this->check_digits[2] = 0;
+
4851
+
4852 if ((country_desc->check_digits[0] && this->check_digits[0] != country_desc->check_digits[0]) ||
+
4853 (country_desc->check_digits[1] && this->check_digits[1] != country_desc->check_digits[1]))
+
4854 goto error; // unexpected check digits
+
4855
+
4856 bban_length = country_desc->length - 4;
+
4857 for (n = 0; n < bban_length;) {
+
4858 if (this->interval.end >= end || !text[this->interval.end])
+
4859 goto error; // bban too short
+
4860 if (m_space && m_space->match(text, this->interval.end, end, flags)) {
+
4861 this->interval.end = m_space->interval.end;
+
4862 continue;
+
4863 }
+
4864 T chr = case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end];
+
4865 if (('0' <= chr && chr <= '9') || ('A' <= chr && chr <= 'Z')) {
+
4866 this->bban[n++] = chr;
+
4867 this->interval.end++;
+
4868 }
+
4869 else
+
4870 goto error; // invalid bban
+
4871 }
+
4872 this->bban[n] = 0;
+
4873
+
4874 // Normalize IBAN.
+
4875 T normalized[69];
+
4876 available = 0;
+
4877 for (size_t i = 0; ; ++i) {
+
4878 if (!this->bban[i]) {
+
4879 for (i = 0; i < 2; ++i) {
+
4880 if ('A' <= this->country[i] && this->country[i] <= 'J') {
+
4881 normalized[available++] = '1';
+
4882 normalized[available++] = '0' + this->country[i] - 'A';
4883 }
-
4884 }
-
4885 normalized[available++] = this->check_digits[0];
-
4886 normalized[available++] = this->check_digits[1];
-
4887 normalized[available] = 0;
-
4888 break;
-
4889 }
-
4890 if ('0' <= this->bban[i] && this->bban[i] <= '9')
-
4891 normalized[available++] = this->bban[i];
-
4892 else if ('A' <= this->bban[i] && this->bban[i] <= 'J') {
-
4893 normalized[available++] = '1';
-
4894 normalized[available++] = '0' + this->bban[i] - 'A';
-
4895 }
-
4896 else if ('K' <= this->bban[i] && this->bban[i] <= 'T') {
-
4897 normalized[available++] = '2';
-
4898 normalized[available++] = '0' + this->bban[i] - 'K';
-
4899 }
-
4900 else if ('U' <= this->bban[i] && this->bban[i] <= 'Z') {
-
4901 normalized[available++] = '3';
-
4902 normalized[available++] = '0' + this->bban[i] - 'U';
+
4884 else if ('K' <= this->country[i] && this->country[i] <= 'T') {
+
4885 normalized[available++] = '2';
+
4886 normalized[available++] = '0' + this->country[i] - 'K';
+
4887 }
+
4888 else if ('U' <= this->country[i] && this->country[i] <= 'Z') {
+
4889 normalized[available++] = '3';
+
4890 normalized[available++] = '0' + this->country[i] - 'U';
+
4891 }
+
4892 }
+
4893 normalized[available++] = this->check_digits[0];
+
4894 normalized[available++] = this->check_digits[1];
+
4895 normalized[available] = 0;
+
4896 break;
+
4897 }
+
4898 if ('0' <= this->bban[i] && this->bban[i] <= '9')
+
4899 normalized[available++] = this->bban[i];
+
4900 else if ('A' <= this->bban[i] && this->bban[i] <= 'J') {
+
4901 normalized[available++] = '1';
+
4902 normalized[available++] = '0' + this->bban[i] - 'A';
4903 }
-
4904 }
-
4905
-
4906 // Calculate modulo 97.
-
4907 nominator = stdex::strtou32(normalized, 9, &next, 10);
-
4908 for (;;) {
-
4909 nominator %= 97;
-
4910 if (!normalized[next]) {
-
4911 this->is_valid = nominator == 1;
-
4912 break;
-
4913 }
-
4914 size_t digit_count = nominator == 0 ? 0 : nominator < 10 ? 1 : 2;
-
4915 for (; digit_count < 9 && normalized[next]; ++next, ++digit_count)
-
4916 nominator = nominator * 10 + (normalized[next] - '0');
-
4917 }
-
4918
-
4919 this->interval.start = start;
-
4920 return true;
-
4921
-
4922 error:
-
4923 this->country[0] = 0;
-
4924 this->check_digits[0] = 0;
-
4925 this->bban[0] = 0;
-
4926 this->is_valid = false;
-
4927 this->interval.start = (this->interval.end = start) + 1;
-
4928 return false;
-
4929 }
-
4930
-
4931 virtual void invalidate()
-
4932 {
-
4933 this->country[0] = 0;
-
4934 this->check_digits[0] = 0;
-
4935 this->bban[0] = 0;
-
4936 this->is_valid = false;
- -
4938 }
-
4939
-
4940 public:
-
4941 T country[3];
- -
4943 T bban[31];
- -
4945
-
4946 protected:
-
4947 std::shared_ptr<basic_parser<T>> m_space;
-
4948 };
+
4904 else if ('K' <= this->bban[i] && this->bban[i] <= 'T') {
+
4905 normalized[available++] = '2';
+
4906 normalized[available++] = '0' + this->bban[i] - 'K';
+
4907 }
+
4908 else if ('U' <= this->bban[i] && this->bban[i] <= 'Z') {
+
4909 normalized[available++] = '3';
+
4910 normalized[available++] = '0' + this->bban[i] - 'U';
+
4911 }
+
4912 }
+
4913
+
4914 // Calculate modulo 97.
+
4915 nominator = stdex::strtou32(normalized, 9, &next, 10);
+
4916 for (;;) {
+
4917 nominator %= 97;
+
4918 if (!normalized[next]) {
+
4919 this->is_valid = nominator == 1;
+
4920 break;
+
4921 }
+
4922 size_t digit_count = nominator == 0 ? 0 : nominator < 10 ? 1 : 2;
+
4923 for (; digit_count < 9 && normalized[next]; ++next, ++digit_count)
+
4924 nominator = nominator * 10 + (normalized[next] - '0');
+
4925 }
+
4926
+
4927 this->interval.start = start;
+
4928 return true;
+
4929
+
4930 error:
+
4931 this->country[0] = 0;
+
4932 this->check_digits[0] = 0;
+
4933 this->bban[0] = 0;
+
4934 this->is_valid = false;
+
4935 this->interval.start = (this->interval.end = start) + 1;
+
4936 return false;
+
4937 }
+
4938
+
4939 virtual void invalidate()
+
4940 {
+
4941 this->country[0] = 0;
+
4942 this->check_digits[0] = 0;
+
4943 this->bban[0] = 0;
+
4944 this->is_valid = false;
+ +
4946 }
+
4947
+
4948 public:
+
4949 T country[3];
+ +
4951 T bban[31];
+ +
4953
+
4954 protected:
+
4955 std::shared_ptr<basic_parser<T>> m_space;
+
4956 };
-
4949
-
4950 using iban = basic_iban<char>;
-
4951 using wiban = basic_iban<wchar_t>;
-
4952#ifdef _UNICODE
-
4953 using tiban = wiban;
-
4954#else
-
4955 using tiban = iban;
-
4956#endif
- -
4958
-
4964 template <class T>
-
- -
4966 {
-
4967 public:
- -
4969 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
4970 _In_ const std::locale& locale = std::locale()) :
-
4971 basic_parser<T>(locale),
-
4972 m_space(space)
-
4973 {
-
4974 this->check_digits[0] = 0;
-
4975 this->reference[0] = 0;
-
4976 this->is_valid = false;
-
4977 }
-
4978
-
4979 virtual bool match(
-
4980 _In_reads_or_z_(end) const T* text,
-
4981 _In_ size_t start = 0,
-
4982 _In_ size_t end = (size_t)-1,
-
4983 _In_ int flags = match_default)
-
4984 {
-
4985 assert(text || start >= end);
-
4986 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
-
4987 const bool case_insensitive = flags & match_case_insensitive ? true : false;
-
4988 size_t n, available, next;
- -
4990
-
4991 this->interval.end = start;
-
4992 if (this->interval.end + 1 >= end ||
-
4993 (case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end]) != 'R' ||
-
4994 (case_insensitive ? ctype.toupper(text[this->interval.end + 1]) : text[this->interval.end + 1]) != 'F')
-
4995 goto error; // incomplete or wrong reference ID
-
4996 this->interval.end += 2;
-
4997
-
4998 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
-
4999 if (this->interval.end >= end || text[this->interval.end] < '0' || '9' < text[this->interval.end])
-
5000 goto error; // incomplete or invalid check digits
-
5001 this->check_digits[i] = text[this->interval.end];
-
5002 }
-
5003 this->check_digits[2] = 0;
-
5004
-
5005 for (n = 0;;) {
-
5006 if (m_space && m_space->match(text, this->interval.end, end, flags))
-
5007 this->interval.end = m_space->interval.end;
-
5008 for (size_t j = 0; j < 4; ++j) {
-
5009 if (this->interval.end >= end || !text[this->interval.end])
-
5010 goto out;
-
5011 T chr = case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end];
-
5012 if (('0' <= chr && chr <= '9') || ('A' <= chr && chr <= 'Z')) {
-
5013 if (n >= _countof(reference) - 1)
-
5014 goto error; // reference overflow
-
5015 this->reference[n++] = chr;
-
5016 this->interval.end++;
-
5017 }
-
5018 else
-
5019 goto out;
-
5020 }
-
5021 }
-
5022 out:
-
5023 if (!n)
-
5024 goto error; // reference too short
-
5025 this->reference[_countof(this->reference) - 1] = 0;
-
5026 for (size_t i = n, j = _countof(this->reference) - 1; i;)
-
5027 this->reference[--j] = this->reference[--i];
-
5028 for (size_t j = _countof(this->reference) - 1 - n; j;)
-
5029 this->reference[--j] = '0';
-
5030
-
5031 // Normalize creditor reference.
-
5032 T normalized[47];
-
5033 available = 0;
-
5034 for (size_t i = 0; ; ++i) {
-
5035 if (!this->reference[i]) {
-
5036 normalized[available++] = '2'; // R
-
5037 normalized[available++] = '7';
-
5038 normalized[available++] = '1'; // F
-
5039 normalized[available++] = '5';
-
5040 normalized[available++] = this->check_digits[0];
-
5041 normalized[available++] = this->check_digits[1];
-
5042 normalized[available] = 0;
-
5043 break;
-
5044 }
-
5045 if ('0' <= this->reference[i] && this->reference[i] <= '9')
-
5046 normalized[available++] = this->reference[i];
-
5047 else if ('A' <= this->reference[i] && this->reference[i] <= 'J') {
-
5048 normalized[available++] = '1';
-
5049 normalized[available++] = '0' + this->reference[i] - 'A';
-
5050 }
-
5051 else if ('K' <= this->reference[i] && this->reference[i] <= 'T') {
-
5052 normalized[available++] = '2';
-
5053 normalized[available++] = '0' + this->reference[i] - 'K';
-
5054 }
-
5055 else if ('U' <= this->reference[i] && this->reference[i] <= 'Z') {
-
5056 normalized[available++] = '3';
-
5057 normalized[available++] = '0' + this->reference[i] - 'U';
+
4957
+
4958 using iban = basic_iban<char>;
+
4959 using wiban = basic_iban<wchar_t>;
+
4960#ifdef _UNICODE
+
4961 using tiban = wiban;
+
4962#else
+
4963 using tiban = iban;
+
4964#endif
+ +
4966
+
4972 template <class T>
+
+ +
4974 {
+
4975 public:
+ +
4977 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
4978 _In_ const std::locale& locale = std::locale()) :
+
4979 basic_parser<T>(locale),
+
4980 m_space(space)
+
4981 {
+
4982 this->check_digits[0] = 0;
+
4983 this->reference[0] = 0;
+
4984 this->is_valid = false;
+
4985 }
+
4986
+
4987 virtual bool match(
+
4988 _In_reads_or_z_(end) const T* text,
+
4989 _In_ size_t start = 0,
+
4990 _In_ size_t end = (size_t)-1,
+
4991 _In_ int flags = match_default)
+
4992 {
+
4993 assert(text || start >= end);
+
4994 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
+
4995 const bool case_insensitive = flags & match_case_insensitive ? true : false;
+
4996 size_t n, available, next;
+ +
4998
+
4999 this->interval.end = start;
+
5000 if (this->interval.end + 1 >= end ||
+
5001 (case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end]) != 'R' ||
+
5002 (case_insensitive ? ctype.toupper(text[this->interval.end + 1]) : text[this->interval.end + 1]) != 'F')
+
5003 goto error; // incomplete or wrong reference ID
+
5004 this->interval.end += 2;
+
5005
+
5006 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
+
5007 if (this->interval.end >= end || text[this->interval.end] < '0' || '9' < text[this->interval.end])
+
5008 goto error; // incomplete or invalid check digits
+
5009 this->check_digits[i] = text[this->interval.end];
+
5010 }
+
5011 this->check_digits[2] = 0;
+
5012
+
5013 for (n = 0;;) {
+
5014 if (m_space && m_space->match(text, this->interval.end, end, flags))
+
5015 this->interval.end = m_space->interval.end;
+
5016 for (size_t j = 0; j < 4; ++j) {
+
5017 if (this->interval.end >= end || !text[this->interval.end])
+
5018 goto out;
+
5019 T chr = case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end];
+
5020 if (('0' <= chr && chr <= '9') || ('A' <= chr && chr <= 'Z')) {
+
5021 if (n >= _countof(reference) - 1)
+
5022 goto error; // reference overflow
+
5023 this->reference[n++] = chr;
+
5024 this->interval.end++;
+
5025 }
+
5026 else
+
5027 goto out;
+
5028 }
+
5029 }
+
5030 out:
+
5031 if (!n)
+
5032 goto error; // reference too short
+
5033 this->reference[_countof(this->reference) - 1] = 0;
+
5034 for (size_t i = n, j = _countof(this->reference) - 1; i;)
+
5035 this->reference[--j] = this->reference[--i];
+
5036 for (size_t j = _countof(this->reference) - 1 - n; j;)
+
5037 this->reference[--j] = '0';
+
5038
+
5039 // Normalize creditor reference.
+
5040 T normalized[47];
+
5041 available = 0;
+
5042 for (size_t i = 0; ; ++i) {
+
5043 if (!this->reference[i]) {
+
5044 normalized[available++] = '2'; // R
+
5045 normalized[available++] = '7';
+
5046 normalized[available++] = '1'; // F
+
5047 normalized[available++] = '5';
+
5048 normalized[available++] = this->check_digits[0];
+
5049 normalized[available++] = this->check_digits[1];
+
5050 normalized[available] = 0;
+
5051 break;
+
5052 }
+
5053 if ('0' <= this->reference[i] && this->reference[i] <= '9')
+
5054 normalized[available++] = this->reference[i];
+
5055 else if ('A' <= this->reference[i] && this->reference[i] <= 'J') {
+
5056 normalized[available++] = '1';
+
5057 normalized[available++] = '0' + this->reference[i] - 'A';
5058 }
-
5059 }
-
5060
-
5061 // Calculate modulo 97.
-
5062 nominator = stdex::strtou32(normalized, 9, &next, 10);
-
5063 for (;;) {
-
5064 nominator %= 97;
-
5065 if (!normalized[next]) {
-
5066 this->is_valid = nominator == 1;
-
5067 break;
-
5068 }
-
5069 size_t digit_count = nominator == 0 ? 0 : nominator < 10 ? 1 : 2;
-
5070 for (; digit_count < 9 && normalized[next]; ++next, ++digit_count)
-
5071 nominator = nominator * 10 + (normalized[next] - '0');
-
5072 }
-
5073
-
5074 this->interval.start = start;
-
5075 return true;
-
5076
-
5077 error:
-
5078 this->check_digits[0] = 0;
-
5079 this->reference[0] = 0;
-
5080 this->is_valid = false;
-
5081 this->interval.start = (this->interval.end = start) + 1;
-
5082 return false;
-
5083 }
+
5059 else if ('K' <= this->reference[i] && this->reference[i] <= 'T') {
+
5060 normalized[available++] = '2';
+
5061 normalized[available++] = '0' + this->reference[i] - 'K';
+
5062 }
+
5063 else if ('U' <= this->reference[i] && this->reference[i] <= 'Z') {
+
5064 normalized[available++] = '3';
+
5065 normalized[available++] = '0' + this->reference[i] - 'U';
+
5066 }
+
5067 }
+
5068
+
5069 // Calculate modulo 97.
+
5070 nominator = stdex::strtou32(normalized, 9, &next, 10);
+
5071 for (;;) {
+
5072 nominator %= 97;
+
5073 if (!normalized[next]) {
+
5074 this->is_valid = nominator == 1;
+
5075 break;
+
5076 }
+
5077 size_t digit_count = nominator == 0 ? 0 : nominator < 10 ? 1 : 2;
+
5078 for (; digit_count < 9 && normalized[next]; ++next, ++digit_count)
+
5079 nominator = nominator * 10 + (normalized[next] - '0');
+
5080 }
+
5081
+
5082 this->interval.start = start;
+
5083 return true;
5084
-
5085 virtual void invalidate()
-
5086 {
-
5087 this->check_digits[0] = 0;
-
5088 this->reference[0] = 0;
-
5089 this->is_valid = false;
- +
5085 error:
+
5086 this->check_digits[0] = 0;
+
5087 this->reference[0] = 0;
+
5088 this->is_valid = false;
+
5089 this->interval.start = (this->interval.end = start) + 1;
+
5090 return false;
5091 }
5092
-
5093 public:
- - - -
5097
-
5098 protected:
-
5099 std::shared_ptr<basic_parser<T>> m_space;
-
5100 };
+
5093 virtual void invalidate()
+
5094 {
+
5095 this->check_digits[0] = 0;
+
5096 this->reference[0] = 0;
+
5097 this->is_valid = false;
+ +
5099 }
+
5100
+
5101 public:
+ + + +
5105
+
5106 protected:
+
5107 std::shared_ptr<basic_parser<T>> m_space;
+
5108 };
-
5101
- - -
5104#ifdef _UNICODE
- -
5106#else
- -
5108#endif
- -
5110
-
5116 template <class T>
-
- -
5118 {
-
5119 public:
-
5120 basic_si_reference_part(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
5121
-
5122 virtual bool match(
-
5123 _In_reads_or_z_(end) const T* text,
-
5124 _In_ size_t start = 0,
-
5125 _In_ size_t end = (size_t)-1,
-
5126 _In_ int flags = match_default)
-
5127 {
-
5128 assert(text || start >= end);
-
5129 this->interval.end = start;
-
5130 for (;;) {
-
5131 if (this->interval.end >= end || !text[this->interval.end])
-
5132 break;
-
5133 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9')
-
5134 this->interval.end++;
-
5135 else
-
5136 break;
-
5137 }
- -
5139 this->interval.start = start;
-
5140 return true;
-
5141 }
-
5142 this->interval.start = (this->interval.end = start) + 1;
-
5143 return false;
-
5144 }
-
5145 };
+
5109
+ + +
5112#ifdef _UNICODE
+ +
5114#else
+ +
5116#endif
+ +
5118
+
5124 template <class T>
+
+ +
5126 {
+
5127 public:
+
5128 basic_si_reference_part(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
5129
+
5130 virtual bool match(
+
5131 _In_reads_or_z_(end) const T* text,
+
5132 _In_ size_t start = 0,
+
5133 _In_ size_t end = (size_t)-1,
+
5134 _In_ int flags = match_default)
+
5135 {
+
5136 assert(text || start >= end);
+
5137 this->interval.end = start;
+
5138 for (;;) {
+
5139 if (this->interval.end >= end || !text[this->interval.end])
+
5140 break;
+
5141 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9')
+
5142 this->interval.end++;
+
5143 else
+
5144 break;
+
5145 }
+ +
5147 this->interval.start = start;
+
5148 return true;
+
5149 }
+
5150 this->interval.start = (this->interval.end = start) + 1;
+
5151 return false;
+
5152 }
+
5153 };
-
5146
- - -
5149#ifdef _UNICODE
- -
5151#else
- -
5153#endif
- -
5155
-
5161 template <class T>
-
- -
5163 {
-
5164 public:
-
5165 basic_si_reference_delimiter(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
-
5166
-
5167 virtual bool match(
-
5168 _In_reads_or_z_(end) const T* text,
-
5169 _In_ size_t start = 0,
-
5170 _In_ size_t end = (size_t)-1,
-
5171 _In_ int flags = match_default)
-
5172 {
-
5173 assert(text || start >= end);
-
5174 if (start < end && text[start] == '-') {
-
5175 this->interval.end = (this->interval.start = start) + 1;
-
5176 return true;
-
5177 }
-
5178 this->interval.start = (this->interval.end = start) + 1;
-
5179 return false;
-
5180 }
-
5181 };
+
5154
+ + +
5157#ifdef _UNICODE
+ +
5159#else
+ +
5161#endif
+ +
5163
+
5169 template <class T>
+
+ +
5171 {
+
5172 public:
+
5173 basic_si_reference_delimiter(_In_ const std::locale& locale = std::locale()) : basic_parser<T>(locale) {}
+
5174
+
5175 virtual bool match(
+
5176 _In_reads_or_z_(end) const T* text,
+
5177 _In_ size_t start = 0,
+
5178 _In_ size_t end = (size_t)-1,
+
5179 _In_ int flags = match_default)
+
5180 {
+
5181 assert(text || start >= end);
+
5182 if (start < end && text[start] == '-') {
+
5183 this->interval.end = (this->interval.start = start) + 1;
+
5184 return true;
+
5185 }
+
5186 this->interval.start = (this->interval.end = start) + 1;
+
5187 return false;
+
5188 }
+
5189 };
-
5182
- - -
5185#ifdef _UNICODE
- -
5187#else
- -
5189#endif
- -
5191
-
5199 template <class T>
-
- -
5201 {
-
5202 public:
- -
5204 _In_ const std::shared_ptr<basic_parser<T>>& space,
-
5205 _In_ const std::locale& locale = std::locale()) :
-
5206 basic_parser<T>(locale),
-
5207 part1(locale),
-
5208 part2(locale),
-
5209 part3(locale),
-
5210 is_valid(false),
-
5211 m_space(space),
-
5212 m_delimiter(locale)
-
5213 {
-
5214 this->model[0] = 0;
-
5215 }
-
5216
-
5217 virtual bool match(
-
5218 _In_reads_or_z_(end) const T* text,
-
5219 _In_ size_t start = 0,
-
5220 _In_ size_t end = (size_t)-1,
-
5221 _In_ int flags = match_default)
-
5222 {
-
5223 assert(text || start >= end);
-
5224 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
-
5225 const bool case_insensitive = flags & match_case_insensitive ? true : false;
-
5226
-
5227 this->interval.end = start;
-
5228 if (this->interval.end + 1 >= end ||
-
5229 (case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end]) != 'S' ||
-
5230 (case_insensitive ? ctype.toupper(text[this->interval.end + 1]) : text[this->interval.end + 1]) != 'I')
-
5231 goto error; // incomplete or wrong reference ID
-
5232 this->interval.end += 2;
-
5233
-
5234 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
-
5235 if (this->interval.end >= end || text[this->interval.end] < '0' || '9' < text[this->interval.end])
-
5236 goto error; // incomplete or invalid model
-
5237 this->model[i] = text[this->interval.end];
-
5238 }
-
5239 this->model[2] = 0;
-
5240
-
5241 this->part1.invalidate();
-
5242 this->part2.invalidate();
-
5243 this->part3.invalidate();
-
5244 if (this->model[0] == '9' && this->model[1] == '9') {
-
5245 is_valid = true;
-
5246 this->interval.start = start;
-
5247 return true;
-
5248 }
-
5249
-
5250 if (m_space && m_space->match(text, this->interval.end, end, flags))
-
5251 this->interval.end = m_space->interval.end;
-
5252
-
5253 this->part1.match(text, this->interval.end, end, flags) &&
-
5254 this->m_delimiter.match(text, this->part1.interval.end, end, flags) &&
-
5255 this->part2.match(text, this->m_delimiter.interval.end, end, flags) &&
-
5256 this->m_delimiter.match(text, this->part2.interval.end, end, flags) &&
-
5257 this->part3.match(text, this->m_delimiter.interval.end, end, flags);
-
5258
-
5259 this->interval.start = start;
-
5260 if (this->part3.interval)
-
5261 this->interval.end = this->part3.interval.end;
-
5262 else if (this->part2.interval)
-
5263 this->interval.end = this->part2.interval.end;
-
5264 else if (this->part1.interval)
-
5265 this->interval.end = this->part1.interval.end;
-
5266 else
-
5267 this->interval.end = start + 4;
-
5268
-
5269 if (this->model[0] == '0' && this->model[1] == '0')
-
5270 is_valid =
-
5271 this->part3.interval ?
-
5272 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5273 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 :
-
5274 this->part2.interval ?
-
5275 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5276 this->part1.interval.size() + this->part2.interval.size() <= 20 :
-
5277 this->part1.interval ?
-
5278 this->part1.interval.size() <= 12 :
-
5279 false;
-
5280 else if (this->model[0] == '0' && this->model[1] == '1')
-
5281 is_valid =
-
5282 this->part3.interval ?
-
5283 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5284 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5285 check11(
-
5286 text + this->part1.interval.start, this->part1.interval.size(),
-
5287 text + this->part2.interval.start, this->part2.interval.size(),
-
5288 text + this->part3.interval.start, this->part3.interval.size()) :
-
5289 this->part2.interval ?
-
5290 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5291 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5292 check11(
-
5293 text + this->part1.interval.start, this->part1.interval.size(),
-
5294 text + this->part2.interval.start, this->part2.interval.size()) :
-
5295 this->part1.interval ?
-
5296 this->part1.interval.size() <= 12 &&
-
5297 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5298 false;
-
5299 else if (this->model[0] == '0' && this->model[1] == '2')
-
5300 is_valid =
-
5301 this->part3.interval ?
-
5302 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5303 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5304 check11(text + this->part2.interval.start, this->part2.interval.size()) &&
-
5305 check11(text + this->part3.interval.start, this->part3.interval.size()) :
+
5190
+ + +
5193#ifdef _UNICODE
+ +
5195#else
+ +
5197#endif
+ +
5199
+
5207 template <class T>
+
+ +
5209 {
+
5210 public:
+ +
5212 _In_ const std::shared_ptr<basic_parser<T>>& space,
+
5213 _In_ const std::locale& locale = std::locale()) :
+
5214 basic_parser<T>(locale),
+
5215 part1(locale),
+
5216 part2(locale),
+
5217 part3(locale),
+
5218 is_valid(false),
+
5219 m_space(space),
+
5220 m_delimiter(locale)
+
5221 {
+
5222 this->model[0] = 0;
+
5223 }
+
5224
+
5225 virtual bool match(
+
5226 _In_reads_or_z_(end) const T* text,
+
5227 _In_ size_t start = 0,
+
5228 _In_ size_t end = (size_t)-1,
+
5229 _In_ int flags = match_default)
+
5230 {
+
5231 assert(text || start >= end);
+
5232 const auto& ctype = std::use_facet<std::ctype<T>>(this->m_locale);
+
5233 const bool case_insensitive = flags & match_case_insensitive ? true : false;
+
5234
+
5235 this->interval.end = start;
+
5236 if (this->interval.end + 1 >= end ||
+
5237 (case_insensitive ? ctype.toupper(text[this->interval.end]) : text[this->interval.end]) != 'S' ||
+
5238 (case_insensitive ? ctype.toupper(text[this->interval.end + 1]) : text[this->interval.end + 1]) != 'I')
+
5239 goto error; // incomplete or wrong reference ID
+
5240 this->interval.end += 2;
+
5241
+
5242 for (size_t i = 0; i < 2; ++i, ++this->interval.end) {
+
5243 if (this->interval.end >= end || text[this->interval.end] < '0' || '9' < text[this->interval.end])
+
5244 goto error; // incomplete or invalid model
+
5245 this->model[i] = text[this->interval.end];
+
5246 }
+
5247 this->model[2] = 0;
+
5248
+
5249 this->part1.invalidate();
+
5250 this->part2.invalidate();
+
5251 this->part3.invalidate();
+
5252 if (this->model[0] == '9' && this->model[1] == '9') {
+
5253 is_valid = true;
+
5254 this->interval.start = start;
+
5255 return true;
+
5256 }
+
5257
+
5258 if (m_space && m_space->match(text, this->interval.end, end, flags))
+
5259 this->interval.end = m_space->interval.end;
+
5260
+
5261 this->part1.match(text, this->interval.end, end, flags) &&
+
5262 this->m_delimiter.match(text, this->part1.interval.end, end, flags) &&
+
5263 this->part2.match(text, this->m_delimiter.interval.end, end, flags) &&
+
5264 this->m_delimiter.match(text, this->part2.interval.end, end, flags) &&
+
5265 this->part3.match(text, this->m_delimiter.interval.end, end, flags);
+
5266
+
5267 this->interval.start = start;
+
5268 if (this->part3.interval)
+
5269 this->interval.end = this->part3.interval.end;
+
5270 else if (this->part2.interval)
+
5271 this->interval.end = this->part2.interval.end;
+
5272 else if (this->part1.interval)
+
5273 this->interval.end = this->part1.interval.end;
+
5274 else
+
5275 this->interval.end = start + 4;
+
5276
+
5277 if (this->model[0] == '0' && this->model[1] == '0')
+
5278 is_valid =
+
5279 this->part3.interval ?
+
5280 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5281 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 :
+
5282 this->part2.interval ?
+
5283 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5284 this->part1.interval.size() + this->part2.interval.size() <= 20 :
+
5285 this->part1.interval ?
+
5286 this->part1.interval.size() <= 12 :
+
5287 false;
+
5288 else if (this->model[0] == '0' && this->model[1] == '1')
+
5289 is_valid =
+
5290 this->part3.interval ?
+
5291 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5292 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5293 check11(
+
5294 text + this->part1.interval.start, this->part1.interval.size(),
+
5295 text + this->part2.interval.start, this->part2.interval.size(),
+
5296 text + this->part3.interval.start, this->part3.interval.size()) :
+
5297 this->part2.interval ?
+
5298 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5299 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5300 check11(
+
5301 text + this->part1.interval.start, this->part1.interval.size(),
+
5302 text + this->part2.interval.start, this->part2.interval.size()) :
+
5303 this->part1.interval ?
+
5304 this->part1.interval.size() <= 12 &&
+
5305 check11(text + this->part1.interval.start, this->part1.interval.size()) :
5306 false;
-
5307 else if (this->model[0] == '0' && this->model[1] == '3')
+
5307 else if (this->model[0] == '0' && this->model[1] == '2')
5308 is_valid =
5309 this->part3.interval ?
5310 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
5311 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5312 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
-
5313 check11(text + this->part2.interval.start, this->part2.interval.size()) &&
-
5314 check11(text + this->part3.interval.start, this->part3.interval.size()) :
-
5315 false;
-
5316 else if (this->model[0] == '0' && this->model[1] == '4')
-
5317 is_valid =
-
5318 this->part3.interval ?
-
5319 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5320 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5321 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5312 check11(text + this->part2.interval.start, this->part2.interval.size()) &&
+
5313 check11(text + this->part3.interval.start, this->part3.interval.size()) :
+
5314 false;
+
5315 else if (this->model[0] == '0' && this->model[1] == '3')
+
5316 is_valid =
+
5317 this->part3.interval ?
+
5318 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5319 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5320 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5321 check11(text + this->part2.interval.start, this->part2.interval.size()) &&
5322 check11(text + this->part3.interval.start, this->part3.interval.size()) :
5323 false;
-
5324 else if ((this->model[0] == '0' || this->model[0] == '5') && this->model[1] == '5')
+
5324 else if (this->model[0] == '0' && this->model[1] == '4')
5325 is_valid =
5326 this->part3.interval ?
5327 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
5328 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5329 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5330 this->part2.interval ?
-
5331 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5332 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5333 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5334 this->part1.interval ?
-
5335 this->part1.interval.size() <= 12 &&
-
5336 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5337 false;
-
5338 else if (this->model[0] == '0' && this->model[1] == '6')
-
5339 is_valid =
-
5340 this->part3.interval ?
-
5341 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5342 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5343 check11(
-
5344 text + this->part2.interval.start, this->part2.interval.size(),
-
5345 text + this->part3.interval.start, this->part3.interval.size()) :
-
5346 this->part2.interval ?
-
5347 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5348 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5349 check11(text + this->part2.interval.start, this->part2.interval.size()) :
-
5350 false;
-
5351 else if (this->model[0] == '0' && this->model[1] == '7')
-
5352 is_valid =
-
5353 this->part3.interval ?
-
5354 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5355 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5356 check11(text + this->part2.interval.start, this->part2.interval.size()) :
-
5357 this->part2.interval ?
-
5358 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5359 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5360 check11(text + this->part2.interval.start, this->part2.interval.size()) :
-
5361 false;
-
5362 else if (this->model[0] == '0' && this->model[1] == '8')
-
5363 is_valid =
-
5364 this->part3.interval ?
-
5365 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5366 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5367 check11(
-
5368 text + this->part1.interval.start, this->part1.interval.size(),
-
5369 text + this->part2.interval.start, this->part2.interval.size()) &&
-
5370 check11(text + this->part3.interval.start, this->part3.interval.size()) :
-
5371 false;
-
5372 else if (this->model[0] == '0' && this->model[1] == '9')
-
5373 is_valid =
-
5374 this->part3.interval ?
-
5375 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5376 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5377 check11(
-
5378 text + this->part1.interval.start, this->part1.interval.size(),
-
5379 text + this->part2.interval.start, this->part2.interval.size()) :
-
5380 this->part2.interval ?
-
5381 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5382 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5383 check11(
-
5384 text + this->part1.interval.start, this->part1.interval.size(),
-
5385 text + this->part2.interval.start, this->part2.interval.size()) :
-
5386 this->part1.interval ?
-
5387 this->part1.interval.size() <= 12 &&
-
5388 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5389 false;
-
5390 else if (this->model[0] == '1' && this->model[1] == '0')
-
5391 is_valid =
-
5392 this->part3.interval ?
-
5393 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5394 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5395 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
-
5396 check11(
-
5397 text + this->part2.interval.start, this->part2.interval.size(),
-
5398 text + this->part3.interval.start, this->part3.interval.size()) :
-
5399 this->part2.interval ?
-
5400 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5401 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5402 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
-
5403 check11(text + this->part2.interval.start, this->part2.interval.size()) :
-
5404 false;
-
5405 else if (
-
5406 (this->model[0] == '1' && (this->model[1] == '1' || this->model[1] == '8' || this->model[1] == '9')) ||
-
5407 ((this->model[0] == '2' || this->model[0] == '3') && this->model[1] == '8') ||
-
5408 (this->model[0] == '4' && (this->model[1] == '0' || this->model[1] == '1' || this->model[1] == '8' || this->model[1] == '9')) ||
-
5409 (this->model[0] == '5' && (this->model[1] == '1' || this->model[1] == '8')))
-
5410 is_valid =
-
5411 this->part3.interval ?
-
5412 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
-
5413 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
-
5414 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
-
5415 check11(text + this->part2.interval.start, this->part2.interval.size()) :
-
5416 this->part2.interval ?
-
5417 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5418 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
-
5419 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
-
5420 check11(text + this->part2.interval.start, this->part2.interval.size()) :
-
5421 false;
-
5422 else if (this->model[0] == '1' && this->model[1] == '2')
-
5423 is_valid =
-
5424 this->part3.interval ? false :
-
5425 this->part2.interval ? false :
-
5426 this->part1.interval ?
-
5427 this->part1.interval.size() <= 13 &&
-
5428 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5429 false;
-
5430 else if ((this->model[0] == '2' || this->model[0] == '3') && this->model[1] == '1')
+
5329 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5330 check11(text + this->part3.interval.start, this->part3.interval.size()) :
+
5331 false;
+
5332 else if ((this->model[0] == '0' || this->model[0] == '5') && this->model[1] == '5')
+
5333 is_valid =
+
5334 this->part3.interval ?
+
5335 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5336 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5337 check11(text + this->part1.interval.start, this->part1.interval.size()) :
+
5338 this->part2.interval ?
+
5339 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5340 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5341 check11(text + this->part1.interval.start, this->part1.interval.size()) :
+
5342 this->part1.interval ?
+
5343 this->part1.interval.size() <= 12 &&
+
5344 check11(text + this->part1.interval.start, this->part1.interval.size()) :
+
5345 false;
+
5346 else if (this->model[0] == '0' && this->model[1] == '6')
+
5347 is_valid =
+
5348 this->part3.interval ?
+
5349 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5350 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5351 check11(
+
5352 text + this->part2.interval.start, this->part2.interval.size(),
+
5353 text + this->part3.interval.start, this->part3.interval.size()) :
+
5354 this->part2.interval ?
+
5355 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5356 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5357 check11(text + this->part2.interval.start, this->part2.interval.size()) :
+
5358 false;
+
5359 else if (this->model[0] == '0' && this->model[1] == '7')
+
5360 is_valid =
+
5361 this->part3.interval ?
+
5362 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5363 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5364 check11(text + this->part2.interval.start, this->part2.interval.size()) :
+
5365 this->part2.interval ?
+
5366 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5367 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5368 check11(text + this->part2.interval.start, this->part2.interval.size()) :
+
5369 false;
+
5370 else if (this->model[0] == '0' && this->model[1] == '8')
+
5371 is_valid =
+
5372 this->part3.interval ?
+
5373 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5374 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5375 check11(
+
5376 text + this->part1.interval.start, this->part1.interval.size(),
+
5377 text + this->part2.interval.start, this->part2.interval.size()) &&
+
5378 check11(text + this->part3.interval.start, this->part3.interval.size()) :
+
5379 false;
+
5380 else if (this->model[0] == '0' && this->model[1] == '9')
+
5381 is_valid =
+
5382 this->part3.interval ?
+
5383 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5384 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5385 check11(
+
5386 text + this->part1.interval.start, this->part1.interval.size(),
+
5387 text + this->part2.interval.start, this->part2.interval.size()) :
+
5388 this->part2.interval ?
+
5389 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5390 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5391 check11(
+
5392 text + this->part1.interval.start, this->part1.interval.size(),
+
5393 text + this->part2.interval.start, this->part2.interval.size()) :
+
5394 this->part1.interval ?
+
5395 this->part1.interval.size() <= 12 &&
+
5396 check11(text + this->part1.interval.start, this->part1.interval.size()) :
+
5397 false;
+
5398 else if (this->model[0] == '1' && this->model[1] == '0')
+
5399 is_valid =
+
5400 this->part3.interval ?
+
5401 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5402 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5403 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5404 check11(
+
5405 text + this->part2.interval.start, this->part2.interval.size(),
+
5406 text + this->part3.interval.start, this->part3.interval.size()) :
+
5407 this->part2.interval ?
+
5408 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5409 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5410 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5411 check11(text + this->part2.interval.start, this->part2.interval.size()) :
+
5412 false;
+
5413 else if (
+
5414 (this->model[0] == '1' && (this->model[1] == '1' || this->model[1] == '8' || this->model[1] == '9')) ||
+
5415 ((this->model[0] == '2' || this->model[0] == '3') && this->model[1] == '8') ||
+
5416 (this->model[0] == '4' && (this->model[1] == '0' || this->model[1] == '1' || this->model[1] == '8' || this->model[1] == '9')) ||
+
5417 (this->model[0] == '5' && (this->model[1] == '1' || this->model[1] == '8')))
+
5418 is_valid =
+
5419 this->part3.interval ?
+
5420 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 && this->part3.interval.size() <= 12 &&
+
5421 this->part1.interval.size() + this->part2.interval.size() + this->part3.interval.size() <= 20 &&
+
5422 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5423 check11(text + this->part2.interval.start, this->part2.interval.size()) :
+
5424 this->part2.interval ?
+
5425 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5426 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5427 check11(text + this->part1.interval.start, this->part1.interval.size()) &&
+
5428 check11(text + this->part2.interval.start, this->part2.interval.size()) :
+
5429 false;
+
5430 else if (this->model[0] == '1' && this->model[1] == '2')
5431 is_valid =
5432 this->part3.interval ? false :
-
5433 this->part2.interval ?
-
5434 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
-
5435 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5433 this->part2.interval ? false :
+
5434 this->part1.interval ?
+
5435 this->part1.interval.size() <= 13 &&
5436 check11(text + this->part1.interval.start, this->part1.interval.size()) :
-
5437 false;
-
5438 else
-
5439 is_valid = true; // Assume models we don't handle as valid
-
5440 return true;
-
5441
-
5442 error:
-
5443 this->model[0] = 0;
-
5444 this->part1.interval.start = (this->part1.interval.end = start) + 1;
-
5445 this->part2.interval.start = (this->part2.interval.end = start) + 1;
-
5446 this->part3.interval.start = (this->part3.interval.end = start) + 1;
-
5447 this->is_valid = false;
-
5448 this->interval.start = (this->interval.end = start) + 1;
-
5449 return false;
-
5450 }
-
5451
-
5452 virtual void invalidate()
-
5453 {
-
5454 this->model[0] = 0;
-
5455 this->part1.invalidate();
-
5456 this->part2.invalidate();
-
5457 this->part3.invalidate();
-
5458 this->is_valid = false;
- -
5460 }
-
5461
-
5462 protected:
-
5463 static bool check11(
-
5464 _In_count_(num_part1) const T* part1, _In_ size_t num_part1)
-
5465 {
-
5466 assert(part1 && num_part1 >= 1);
-
5467 uint32_t nominator = 0, ponder = 2;
-
5468 for (size_t i = num_part1 - 1; i--; ++ponder)
-
5469 nominator += (part1[i] - '0') * ponder;
-
5470 uint8_t control = 11 - static_cast<uint8_t>(nominator % 11);
-
5471 if (control >= 10)
-
5472 control = 0;
-
5473 return control == part1[num_part1 - 1] - '0';
-
5474 }
-
5475
-
5476 static bool check11(
-
5477 _In_count_(num_part1) const T* part1, _In_ size_t num_part1,
-
5478 _In_count_(num_part2) const T* part2, _In_ size_t num_part2)
-
5479 {
-
5480 assert(part1 || !num_part1);
-
5481 assert(part2 && num_part2 >= 1);
-
5482 uint32_t nominator = 0, ponder = 2;
-
5483 for (size_t i = num_part2 - 1; i--; ++ponder)
-
5484 nominator += (part2[i] - '0') * ponder;
-
5485 for (size_t i = num_part1; i--; ++ponder)
-
5486 nominator += (part1[i] - '0') * ponder;
-
5487 uint8_t control = 11 - static_cast<uint8_t>(nominator % 11);
-
5488 if (control == 10)
-
5489 control = 0;
-
5490 return control == part2[num_part2 - 1] - '0';
-
5491 }
-
5492
-
5493 static bool check11(
-
5494 _In_count_(num_part1) const T* part1, _In_ size_t num_part1,
-
5495 _In_count_(num_part2) const T* part2, _In_ size_t num_part2,
-
5496 _In_count_(num_part3) const T* part3, _In_ size_t num_part3)
-
5497 {
-
5498 assert(part1 || !num_part1);
-
5499 assert(part2 || !num_part2);
-
5500 assert(part3 && num_part3 >= 1);
-
5501 uint32_t nominator = 0, ponder = 2;
-
5502 for (size_t i = num_part3 - 1; i--; ++ponder)
-
5503 nominator += (part3[i] - '0') * ponder;
-
5504 for (size_t i = num_part2; i--; ++ponder)
-
5505 nominator += (part2[i] - '0') * ponder;
-
5506 for (size_t i = num_part1; i--; ++ponder)
-
5507 nominator += (part1[i] - '0') * ponder;
-
5508 uint8_t control = 11 - static_cast<uint8_t>(nominator % 11);
-
5509 if (control == 10)
-
5510 control = 0;
-
5511 return control == part2[num_part3 - 1] - '0';
-
5512 }
-
5513
-
5514 public:
-
5515 T model[3];
- - - - -
5520
-
5521 protected:
-
5522 std::shared_ptr<basic_parser<T>> m_space;
- -
5524 };
+
5437 false;
+
5438 else if ((this->model[0] == '2' || this->model[0] == '3') && this->model[1] == '1')
+
5439 is_valid =
+
5440 this->part3.interval ? false :
+
5441 this->part2.interval ?
+
5442 this->part1.interval.size() <= 12 && this->part2.interval.size() <= 12 &&
+
5443 this->part1.interval.size() + this->part2.interval.size() <= 20 &&
+
5444 check11(text + this->part1.interval.start, this->part1.interval.size()) :
+
5445 false;
+
5446 else
+
5447 is_valid = true; // Assume models we don't handle as valid
+
5448 return true;
+
5449
+
5450 error:
+
5451 this->model[0] = 0;
+
5452 this->part1.interval.start = (this->part1.interval.end = start) + 1;
+
5453 this->part2.interval.start = (this->part2.interval.end = start) + 1;
+
5454 this->part3.interval.start = (this->part3.interval.end = start) + 1;
+
5455 this->is_valid = false;
+
5456 this->interval.start = (this->interval.end = start) + 1;
+
5457 return false;
+
5458 }
+
5459
+
5460 virtual void invalidate()
+
5461 {
+
5462 this->model[0] = 0;
+
5463 this->part1.invalidate();
+
5464 this->part2.invalidate();
+
5465 this->part3.invalidate();
+
5466 this->is_valid = false;
+ +
5468 }
+
5469
+
5470 protected:
+
5471 static bool check11(
+
5472 _In_count_(num_part1) const T* part1, _In_ size_t num_part1)
+
5473 {
+
5474 assert(part1 && num_part1 >= 1);
+
5475 uint32_t nominator = 0, ponder = 2;
+
5476 for (size_t i = num_part1 - 1; i--; ++ponder)
+
5477 nominator += (part1[i] - '0') * ponder;
+
5478 uint8_t control = 11 - static_cast<uint8_t>(nominator % 11);
+
5479 if (control >= 10)
+
5480 control = 0;
+
5481 return control == part1[num_part1 - 1] - '0';
+
5482 }
+
5483
+
5484 static bool check11(
+
5485 _In_count_(num_part1) const T* part1, _In_ size_t num_part1,
+
5486 _In_count_(num_part2) const T* part2, _In_ size_t num_part2)
+
5487 {
+
5488 assert(part1 || !num_part1);
+
5489 assert(part2 && num_part2 >= 1);
+
5490 uint32_t nominator = 0, ponder = 2;
+
5491 for (size_t i = num_part2 - 1; i--; ++ponder)
+
5492 nominator += (part2[i] - '0') * ponder;
+
5493 for (size_t i = num_part1; i--; ++ponder)
+
5494 nominator += (part1[i] - '0') * ponder;
+
5495 uint8_t control = 11 - static_cast<uint8_t>(nominator % 11);
+
5496 if (control == 10)
+
5497 control = 0;
+
5498 return control == part2[num_part2 - 1] - '0';
+
5499 }
+
5500
+
5501 static bool check11(
+
5502 _In_count_(num_part1) const T* part1, _In_ size_t num_part1,
+
5503 _In_count_(num_part2) const T* part2, _In_ size_t num_part2,
+
5504 _In_count_(num_part3) const T* part3, _In_ size_t num_part3)
+
5505 {
+
5506 assert(part1 || !num_part1);
+
5507 assert(part2 || !num_part2);
+
5508 assert(part3 && num_part3 >= 1);
+
5509 uint32_t nominator = 0, ponder = 2;
+
5510 for (size_t i = num_part3 - 1; i--; ++ponder)
+
5511 nominator += (part3[i] - '0') * ponder;
+
5512 for (size_t i = num_part2; i--; ++ponder)
+
5513 nominator += (part2[i] - '0') * ponder;
+
5514 for (size_t i = num_part1; i--; ++ponder)
+
5515 nominator += (part1[i] - '0') * ponder;
+
5516 uint8_t control = 11 - static_cast<uint8_t>(nominator % 11);
+
5517 if (control == 10)
+
5518 control = 0;
+
5519 return control == part2[num_part3 - 1] - '0';
+
5520 }
+
5521
+
5522 public:
+
5523 T model[3];
+ + + + +
5528
+
5529 protected:
+
5530 std::shared_ptr<basic_parser<T>> m_space;
+ +
5532 };
-
5525
- - -
5528#ifdef _UNICODE
- -
5530#else
- -
5532#endif
- -
5534
-
5538 template <class T>
-
- -
5540 {
-
5541 public:
- -
5543 _In_ const std::shared_ptr<basic_parser<T>>& element,
-
5544 _In_ const std::shared_ptr<basic_parser<T>>& digit,
-
5545 _In_ const std::shared_ptr<basic_parser<T>>& sign,
-
5546 _In_ const std::locale& locale = std::locale()) :
-
5547 basic_parser<T>(locale),
-
5548 m_element(element),
-
5549 m_digit(digit),
-
5550 m_sign(sign),
-
5551 has_digits(false),
-
5552 has_charge(false)
-
5553 {}
-
5554
-
5555 virtual bool match(
-
5556 _In_reads_or_z_(end) const T* text,
-
5557 _In_ size_t start = 0,
-
5558 _In_ size_t end = (size_t)-1,
-
5559 _In_ int flags = match_default)
-
5560 {
-
5561 assert(text || start >= end);
+
5533
+ + +
5536#ifdef _UNICODE
+ +
5538#else
+ +
5540#endif
+ +
5542
+
5546 template <class T>
+
+ +
5548 {
+
5549 public:
+ +
5551 _In_ const std::shared_ptr<basic_parser<T>>& element,
+
5552 _In_ const std::shared_ptr<basic_parser<T>>& digit,
+
5553 _In_ const std::shared_ptr<basic_parser<T>>& sign,
+
5554 _In_ const std::locale& locale = std::locale()) :
+
5555 basic_parser<T>(locale),
+
5556 m_element(element),
+
5557 m_digit(digit),
+
5558 m_sign(sign),
+
5559 has_digits(false),
+
5560 has_charge(false)
+
5561 {}
5562
-
5563 has_digits = false;
-
5564 has_charge = false;
-
5565 this->interval.end = start;
-
5566
-
5567 const int element_match_flags = flags & ~match_case_insensitive; // Chemical elements are always case-sensitive.
-
5568 for (;;) {
-
5569 if (m_element->match(text, this->interval.end, end, element_match_flags)) {
-
5570 this->interval.end = m_element->interval.end;
-
5571 while (m_digit->match(text, this->interval.end, end, flags)) {
-
5572 this->interval.end = m_digit->interval.end;
-
5573 has_digits = true;
-
5574 }
-
5575 }
-
5576 else if (start < this->interval.end) {
-
5577 if (m_sign->match(text, this->interval.end, end, flags)) {
-
5578 this->interval.end = m_sign->interval.end;
-
5579 has_charge = true;
-
5580 }
-
5581 this->interval.start = start;
-
5582 return true;
+
5563 virtual bool match(
+
5564 _In_reads_or_z_(end) const T* text,
+
5565 _In_ size_t start = 0,
+
5566 _In_ size_t end = (size_t)-1,
+
5567 _In_ int flags = match_default)
+
5568 {
+
5569 assert(text || start >= end);
+
5570
+
5571 has_digits = false;
+
5572 has_charge = false;
+
5573 this->interval.end = start;
+
5574
+
5575 const int element_match_flags = flags & ~match_case_insensitive; // Chemical elements are always case-sensitive.
+
5576 for (;;) {
+
5577 if (m_element->match(text, this->interval.end, end, element_match_flags)) {
+
5578 this->interval.end = m_element->interval.end;
+
5579 while (m_digit->match(text, this->interval.end, end, flags)) {
+
5580 this->interval.end = m_digit->interval.end;
+
5581 has_digits = true;
+
5582 }
5583 }
-
5584 else {
-
5585 this->interval.start = (this->interval.end = start) + 1;
-
5586 return false;
-
5587 }
-
5588 }
-
5589 }
-
5590
-
5591 virtual void invalidate()
-
5592 {
-
5593 has_digits = false;
-
5594 has_charge = false;
- -
5596 }
-
5597
-
5598 public:
-
5599 bool has_digits;
-
5600 bool has_charge;
-
5601
-
5602 protected:
-
5603 std::shared_ptr<basic_parser<T>> m_element;
-
5604 std::shared_ptr<basic_parser<T>> m_digit;
-
5605 std::shared_ptr<basic_parser<T>> m_sign;
-
5606 };
+
5584 else if (start < this->interval.end) {
+
5585 if (m_sign->match(text, this->interval.end, end, flags)) {
+
5586 this->interval.end = m_sign->interval.end;
+
5587 has_charge = true;
+
5588 }
+
5589 this->interval.start = start;
+
5590 return true;
+
5591 }
+
5592 else {
+
5593 this->interval.start = (this->interval.end = start) + 1;
+
5594 return false;
+
5595 }
+
5596 }
+
5597 }
+
5598
+
5599 virtual void invalidate()
+
5600 {
+
5601 has_digits = false;
+
5602 has_charge = false;
+ +
5604 }
+
5605
+
5606 public:
+
5607 bool has_digits;
+
5608 bool has_charge;
+
5609
+
5610 protected:
+
5611 std::shared_ptr<basic_parser<T>> m_element;
+
5612 std::shared_ptr<basic_parser<T>> m_digit;
+
5613 std::shared_ptr<basic_parser<T>> m_sign;
+
5614 };
-
5607
- - -
5610#ifdef _UNICODE
- -
5612#else
- -
5614#endif
- -
5616
-
- -
5621 {
-
5622 public:
-
5623 virtual bool match(
-
5624 _In_reads_or_z_(end) const char* text,
-
5625 _In_ size_t start = 0,
-
5626 _In_ size_t end = (size_t)-1,
-
5627 _In_ int flags = match_default)
-
5628 {
-
5629 assert(text || start >= end);
-
5630 this->interval.end = start;
-
5631
-
5632 assert(text || this->interval.end >= end);
-
5633 if (this->interval.end < end && text[this->interval.end]) {
-
5634 if (text[this->interval.end] == '\r') {
-
5635 this->interval.end++;
-
5636 if (this->interval.end < end && text[this->interval.end] == '\n') {
-
5637 this->interval.start = start;
-
5638 this->interval.end++;
-
5639 return true;
-
5640 }
-
5641 }
-
5642 else if (text[this->interval.end] == '\n') {
-
5643 this->interval.start = start;
-
5644 this->interval.end++;
-
5645 return true;
-
5646 }
-
5647 }
-
5648 this->interval.start = (this->interval.end = start) + 1;
-
5649 return false;
-
5650 }
-
5651 };
+
5615
+ + +
5618#ifdef _UNICODE
+ +
5620#else
+ +
5622#endif
+ +
5624
+
+ +
5629 {
+
5630 public:
+
5631 virtual bool match(
+
5632 _In_reads_or_z_(end) const char* text,
+
5633 _In_ size_t start = 0,
+
5634 _In_ size_t end = (size_t)-1,
+
5635 _In_ int flags = match_default)
+
5636 {
+
5637 assert(text || start >= end);
+
5638 this->interval.end = start;
+
5639
+
5640 assert(text || this->interval.end >= end);
+
5641 if (this->interval.end < end && text[this->interval.end]) {
+
5642 if (text[this->interval.end] == '\r') {
+
5643 this->interval.end++;
+
5644 if (this->interval.end < end && text[this->interval.end] == '\n') {
+
5645 this->interval.start = start;
+
5646 this->interval.end++;
+
5647 return true;
+
5648 }
+
5649 }
+
5650 else if (text[this->interval.end] == '\n') {
+
5651 this->interval.start = start;
+
5652 this->interval.end++;
+
5653 return true;
+
5654 }
+
5655 }
+
5656 this->interval.start = (this->interval.end = start) + 1;
+
5657 return false;
+
5658 }
+
5659 };
-
5652
-
-
5656 class http_space : public parser
-
5657 {
-
5658 public:
-
5659 virtual bool match(
-
5660 _In_reads_or_z_(end) const char* text,
-
5661 _In_ size_t start = 0,
-
5662 _In_ size_t end = (size_t)-1,
-
5663 _In_ int flags = match_default)
-
5664 {
-
5665 assert(text || start >= end);
-
5666 this->interval.end = start;
-
5667 if (m_line_break.match(text, this->interval.end, end, flags)) {
-
5668 this->interval.end = m_line_break.interval.end;
-
5669 if (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) {
-
5670 this->interval.start = start;
-
5671 this->interval.end++;
-
5672 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
-
5673 return true;
-
5674 }
-
5675 }
-
5676 else if (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) {
-
5677 this->interval.start = start;
-
5678 this->interval.end++;
-
5679 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
-
5680 return true;
-
5681 }
-
5682 this->interval.start = (this->interval.end = start) + 1;
-
5683 return false;
-
5684 }
-
5685
-
5686 protected:
-
5687 http_line_break m_line_break;
-
5688 };
+
5660
+
+
5664 class http_space : public parser
+
5665 {
+
5666 public:
+
5667 virtual bool match(
+
5668 _In_reads_or_z_(end) const char* text,
+
5669 _In_ size_t start = 0,
+
5670 _In_ size_t end = (size_t)-1,
+
5671 _In_ int flags = match_default)
+
5672 {
+
5673 assert(text || start >= end);
+
5674 this->interval.end = start;
+
5675 if (m_line_break.match(text, this->interval.end, end, flags)) {
+
5676 this->interval.end = m_line_break.interval.end;
+
5677 if (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) {
+
5678 this->interval.start = start;
+
5679 this->interval.end++;
+
5680 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
+
5681 return true;
+
5682 }
+
5683 }
+
5684 else if (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) {
+
5685 this->interval.start = start;
+
5686 this->interval.end++;
+
5687 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
+
5688 return true;
+
5689 }
+
5690 this->interval.start = (this->interval.end = start) + 1;
+
5691 return false;
+
5692 }
+
5693
+
5694 protected:
+
5695 http_line_break m_line_break;
+
5696 };
-
5689
-
-
5693 class http_text_char : public parser
-
5694 {
-
5695 public:
-
5696 virtual bool match(
-
5697 _In_reads_or_z_(end) const char* text,
-
5698 _In_ size_t start = 0,
-
5699 _In_ size_t end = (size_t)-1,
-
5700 _In_ int flags = match_default)
-
5701 {
-
5702 assert(text || start >= end);
-
5703 this->interval.end = start;
-
5704
-
5705 assert(text || this->interval.end >= end);
-
5706 if (m_space.match(text, this->interval.end, end, flags)) {
-
5707 this->interval.start = start;
-
5708 this->interval.end = m_space.interval.end;
-
5709 return true;
-
5710 }
-
5711 else if (this->interval.end < end && text[this->interval.end] && text[this->interval.end] >= 0x20) {
-
5712 this->interval.start = start;
-
5713 this->interval.end++;
-
5714 return true;
-
5715 }
-
5716 this->interval.start = (this->interval.end = start) + 1;
-
5717 return false;
-
5718 }
-
5719
-
5720 protected:
-
5721 http_space m_space;
-
5722 };
+
5697
+
+
5701 class http_text_char : public parser
+
5702 {
+
5703 public:
+
5704 virtual bool match(
+
5705 _In_reads_or_z_(end) const char* text,
+
5706 _In_ size_t start = 0,
+
5707 _In_ size_t end = (size_t)-1,
+
5708 _In_ int flags = match_default)
+
5709 {
+
5710 assert(text || start >= end);
+
5711 this->interval.end = start;
+
5712
+
5713 assert(text || this->interval.end >= end);
+
5714 if (m_space.match(text, this->interval.end, end, flags)) {
+
5715 this->interval.start = start;
+
5716 this->interval.end = m_space.interval.end;
+
5717 return true;
+
5718 }
+
5719 else if (this->interval.end < end && text[this->interval.end] && text[this->interval.end] >= 0x20) {
+
5720 this->interval.start = start;
+
5721 this->interval.end++;
+
5722 return true;
+
5723 }
+
5724 this->interval.start = (this->interval.end = start) + 1;
+
5725 return false;
+
5726 }
+
5727
+
5728 protected:
+
5729 http_space m_space;
+
5730 };
-
5723
-
-
5727 class http_token : public parser
-
5728 {
-
5729 public:
-
5730 virtual bool match(
-
5731 _In_reads_or_z_(end) const char* text,
-
5732 _In_ size_t start = 0,
-
5733 _In_ size_t end = (size_t)-1,
-
5734 _In_ int flags = match_default)
-
5735 {
-
5736 assert(text || start >= end);
-
5737 this->interval.end = start;
-
5738 for (;;) {
-
5739 if (this->interval.end < end && text[this->interval.end]) {
-
5740 if ((unsigned int)text[this->interval.end] < 0x20 ||
-
5741 (unsigned int)text[this->interval.end] == 0x7f ||
-
5742 text[this->interval.end] == '(' ||
-
5743 text[this->interval.end] == ')' ||
-
5744 text[this->interval.end] == '<' ||
-
5745 text[this->interval.end] == '>' ||
-
5746 text[this->interval.end] == '@' ||
-
5747 text[this->interval.end] == ',' ||
-
5748 text[this->interval.end] == ';' ||
-
5749 text[this->interval.end] == ':' ||
-
5750 text[this->interval.end] == '\\' ||
-
5751 text[this->interval.end] == '\"' ||
-
5752 text[this->interval.end] == '/' ||
-
5753 text[this->interval.end] == '[' ||
-
5754 text[this->interval.end] == ']' ||
-
5755 text[this->interval.end] == '?' ||
-
5756 text[this->interval.end] == '=' ||
-
5757 text[this->interval.end] == '{' ||
-
5758 text[this->interval.end] == '}' ||
-
5759 isspace(text[this->interval.end]))
-
5760 break;
-
5761 else
-
5762 this->interval.end++;
-
5763 }
-
5764 else
-
5765 break;
-
5766 }
- -
5768 this->interval.start = start;
-
5769 return true;
-
5770 }
-
5771 else {
-
5772 this->interval.start = (this->interval.end = start) + 1;
-
5773 return false;
+
5731
+
+
5735 class http_token : public parser
+
5736 {
+
5737 public:
+
5738 virtual bool match(
+
5739 _In_reads_or_z_(end) const char* text,
+
5740 _In_ size_t start = 0,
+
5741 _In_ size_t end = (size_t)-1,
+
5742 _In_ int flags = match_default)
+
5743 {
+
5744 assert(text || start >= end);
+
5745 this->interval.end = start;
+
5746 for (;;) {
+
5747 if (this->interval.end < end && text[this->interval.end]) {
+
5748 if ((unsigned int)text[this->interval.end] < 0x20 ||
+
5749 (unsigned int)text[this->interval.end] == 0x7f ||
+
5750 text[this->interval.end] == '(' ||
+
5751 text[this->interval.end] == ')' ||
+
5752 text[this->interval.end] == '<' ||
+
5753 text[this->interval.end] == '>' ||
+
5754 text[this->interval.end] == '@' ||
+
5755 text[this->interval.end] == ',' ||
+
5756 text[this->interval.end] == ';' ||
+
5757 text[this->interval.end] == ':' ||
+
5758 text[this->interval.end] == '\\' ||
+
5759 text[this->interval.end] == '\"' ||
+
5760 text[this->interval.end] == '/' ||
+
5761 text[this->interval.end] == '[' ||
+
5762 text[this->interval.end] == ']' ||
+
5763 text[this->interval.end] == '?' ||
+
5764 text[this->interval.end] == '=' ||
+
5765 text[this->interval.end] == '{' ||
+
5766 text[this->interval.end] == '}' ||
+
5767 isspace(text[this->interval.end]))
+
5768 break;
+
5769 else
+
5770 this->interval.end++;
+
5771 }
+
5772 else
+
5773 break;
5774 }
-
5775 }
-
5776 };
+ +
5776 this->interval.start = start;
+
5777 return true;
+
5778 }
+
5779 else {
+
5780 this->interval.start = (this->interval.end = start) + 1;
+
5781 return false;
+
5782 }
+
5783 }
+
5784 };
-
5777
-
- -
5782 {
-
5783 public:
-
5784 virtual bool match(
-
5785 _In_reads_or_z_(end) const char* text,
-
5786 _In_ size_t start = 0,
-
5787 _In_ size_t end = (size_t)-1,
-
5788 _In_ int flags = match_default)
-
5789 {
-
5790 assert(text || start >= end);
-
5791 this->interval.end = start;
-
5792 if (this->interval.end < end && text[this->interval.end] != '"')
-
5793 goto error;
-
5794 this->interval.end++;
-
5795 content.start = this->interval.end;
-
5796 for (;;) {
-
5797 assert(text || this->interval.end >= end);
-
5798 if (this->interval.end < end && text[this->interval.end]) {
-
5799 if (text[this->interval.end] == '"') {
-
5800 content.end = this->interval.end;
-
5801 this->interval.end++;
-
5802 break;
-
5803 }
-
5804 else if (text[this->interval.end] == '\\') {
-
5805 this->interval.end++;
-
5806 if (this->interval.end < end && text[this->interval.end]) {
-
5807 this->interval.end++;
-
5808 }
-
5809 else
-
5810 goto error;
+
5785
+
+ +
5790 {
+
5791 public:
+
5792 virtual bool match(
+
5793 _In_reads_or_z_(end) const char* text,
+
5794 _In_ size_t start = 0,
+
5795 _In_ size_t end = (size_t)-1,
+
5796 _In_ int flags = match_default)
+
5797 {
+
5798 assert(text || start >= end);
+
5799 this->interval.end = start;
+
5800 if (this->interval.end < end && text[this->interval.end] != '"')
+
5801 goto error;
+
5802 this->interval.end++;
+
5803 content.start = this->interval.end;
+
5804 for (;;) {
+
5805 assert(text || this->interval.end >= end);
+
5806 if (this->interval.end < end && text[this->interval.end]) {
+
5807 if (text[this->interval.end] == '"') {
+
5808 content.end = this->interval.end;
+
5809 this->interval.end++;
+
5810 break;
5811 }
-
5812 else if (m_chr.match(text, this->interval.end, end, flags))
+
5812 else if (text[this->interval.end] == '\\') {
5813 this->interval.end++;
-
5814 else
-
5815 goto error;
-
5816 }
-
5817 else
-
5818 goto error;
-
5819 }
-
5820 this->interval.start = start;
-
5821 return true;
-
5822
-
5823 error:
-
5824 content.start = 1;
-
5825 content.end = 0;
-
5826 this->interval.start = (this->interval.end = start) + 1;
-
5827 return false;
-
5828 }
-
5829
-
5830 virtual void invalidate()
-
5831 {
+
5814 if (this->interval.end < end && text[this->interval.end]) {
+
5815 this->interval.end++;
+
5816 }
+
5817 else
+
5818 goto error;
+
5819 }
+
5820 else if (m_chr.match(text, this->interval.end, end, flags))
+
5821 this->interval.end++;
+
5822 else
+
5823 goto error;
+
5824 }
+
5825 else
+
5826 goto error;
+
5827 }
+
5828 this->interval.start = start;
+
5829 return true;
+
5830
+
5831 error:
5832 content.start = 1;
5833 content.end = 0;
-
5834 parser::invalidate();
-
5835 }
-
5836
-
5837 public:
- -
5839
-
5840 protected:
-
5841 http_text_char m_chr;
-
5842 };
+
5834 this->interval.start = (this->interval.end = start) + 1;
+
5835 return false;
+
5836 }
+
5837
+
5838 virtual void invalidate()
+
5839 {
+
5840 content.start = 1;
+
5841 content.end = 0;
+
5842 parser::invalidate();
+
5843 }
+
5844
+
5845 public:
+ +
5847
+
5848 protected:
+
5849 http_text_char m_chr;
+
5850 };
-
5843
-
-
5847 class http_value : public parser
-
5848 {
-
5849 public:
-
5850 virtual bool match(
-
5851 _In_reads_or_z_(end) const char* text,
-
5852 _In_ size_t start = 0,
-
5853 _In_ size_t end = (size_t)-1,
-
5854 _In_ int flags = match_default)
-
5855 {
-
5856 assert(text || start >= end);
-
5857 this->interval.end = start;
-
5858 if (string.match(text, this->interval.end, end, flags)) {
-
5859 token.invalidate();
-
5860 this->interval.end = string.interval.end;
-
5861 this->interval.start = start;
-
5862 return true;
-
5863 }
-
5864 else if (token.match(text, this->interval.end, end, flags)) {
-
5865 string.invalidate();
-
5866 this->interval.end = token.interval.end;
-
5867 this->interval.start = start;
-
5868 return true;
-
5869 }
-
5870 else {
-
5871 this->interval.start = (this->interval.end = start) + 1;
-
5872 return false;
-
5873 }
-
5874 }
-
5875
-
5876 virtual void invalidate()
-
5877 {
-
5878 string.invalidate();
-
5879 token.invalidate();
-
5880 parser::invalidate();
-
5881 }
-
5882
-
5883 public:
- - -
5886 };
+
5851
+
+
5855 class http_value : public parser
+
5856 {
+
5857 public:
+
5858 virtual bool match(
+
5859 _In_reads_or_z_(end) const char* text,
+
5860 _In_ size_t start = 0,
+
5861 _In_ size_t end = (size_t)-1,
+
5862 _In_ int flags = match_default)
+
5863 {
+
5864 assert(text || start >= end);
+
5865 this->interval.end = start;
+
5866 if (string.match(text, this->interval.end, end, flags)) {
+
5867 token.invalidate();
+
5868 this->interval.end = string.interval.end;
+
5869 this->interval.start = start;
+
5870 return true;
+
5871 }
+
5872 else if (token.match(text, this->interval.end, end, flags)) {
+
5873 string.invalidate();
+
5874 this->interval.end = token.interval.end;
+
5875 this->interval.start = start;
+
5876 return true;
+
5877 }
+
5878 else {
+
5879 this->interval.start = (this->interval.end = start) + 1;
+
5880 return false;
+
5881 }
+
5882 }
+
5883
+
5884 virtual void invalidate()
+
5885 {
+
5886 string.invalidate();
+
5887 token.invalidate();
+
5888 parser::invalidate();
+
5889 }
+
5890
+
5891 public:
+ + +
5894 };
-
5887
-
-
5891 class http_parameter : public parser
-
5892 {
-
5893 public:
-
5894 virtual bool match(
-
5895 _In_reads_or_z_(end) const char* text,
-
5896 _In_ size_t start = 0,
-
5897 _In_ size_t end = (size_t)-1,
-
5898 _In_ int flags = match_default)
-
5899 {
-
5900 assert(text || start >= end);
-
5901 this->interval.end = start;
-
5902 if (name.match(text, this->interval.end, end, flags))
-
5903 this->interval.end = name.interval.end;
-
5904 else
-
5905 goto error;
-
5906 while (m_space.match(text, this->interval.end, end, flags))
-
5907 this->interval.end = m_space.interval.end;
-
5908 assert(text || this->interval.end >= end);
-
5909 if (this->interval.end < end && text[this->interval.end] == '=')
-
5910 this->interval.end++;
-
5911 else
-
5912 while (m_space.match(text, this->interval.end, end, flags))
-
5913 this->interval.end = m_space.interval.end;
-
5914 if (value.match(text, this->interval.end, end, flags))
-
5915 this->interval.end = value.interval.end;
-
5916 else
-
5917 goto error;
-
5918 this->interval.start = start;
-
5919 return true;
-
5920
-
5921 error:
-
5922 name.invalidate();
-
5923 value.invalidate();
-
5924 this->interval.start = (this->interval.end = start) + 1;
-
5925 return false;
-
5926 }
-
5927
-
5928 virtual void invalidate()
-
5929 {
+
5895
+
+
5899 class http_parameter : public parser
+
5900 {
+
5901 public:
+
5902 virtual bool match(
+
5903 _In_reads_or_z_(end) const char* text,
+
5904 _In_ size_t start = 0,
+
5905 _In_ size_t end = (size_t)-1,
+
5906 _In_ int flags = match_default)
+
5907 {
+
5908 assert(text || start >= end);
+
5909 this->interval.end = start;
+
5910 if (name.match(text, this->interval.end, end, flags))
+
5911 this->interval.end = name.interval.end;
+
5912 else
+
5913 goto error;
+
5914 while (m_space.match(text, this->interval.end, end, flags))
+
5915 this->interval.end = m_space.interval.end;
+
5916 assert(text || this->interval.end >= end);
+
5917 if (this->interval.end < end && text[this->interval.end] == '=')
+
5918 this->interval.end++;
+
5919 else
+
5920 while (m_space.match(text, this->interval.end, end, flags))
+
5921 this->interval.end = m_space.interval.end;
+
5922 if (value.match(text, this->interval.end, end, flags))
+
5923 this->interval.end = value.interval.end;
+
5924 else
+
5925 goto error;
+
5926 this->interval.start = start;
+
5927 return true;
+
5928
+
5929 error:
5930 name.invalidate();
5931 value.invalidate();
-
5932 parser::invalidate();
-
5933 }
-
5934
-
5935 public:
- - -
5938
-
5939 protected:
-
5940 http_space m_space;
-
5941 };
-
+
5932 this->interval.start = (this->interval.end = start) + 1;
+
5933 return false;
+
5934 }
+
5935
+
5936 virtual void invalidate()
+
5937 {
+
5938 name.invalidate();
+
5939 value.invalidate();
+
5940 parser::invalidate();
+
5941 }
5942
-
-
5946 class http_any_type : public parser
-
5947 {
-
5948 public:
-
5949 virtual bool match(
-
5950 _In_reads_or_z_(end) const char* text,
-
5951 _In_ size_t start = 0,
-
5952 _In_ size_t end = (size_t)-1,
-
5953 _In_ int flags = match_default)
-
5954 {
-
5955 assert(text || start >= end);
-
5956 if (start + 2 < end &&
-
5957 text[start] == '*' &&
-
5958 text[start + 1] == '/' &&
-
5959 text[start + 2] == '*')
-
5960 {
-
5961 this->interval.end = (this->interval.start = start) + 3;
-
5962 return true;
-
5963 }
-
5964 else if (start < end && text[start] == '*') {
-
5965 this->interval.end = (this->interval.start = start) + 1;
-
5966 return true;
-
5967 }
-
5968 else {
-
5969 this->interval.start = (this->interval.end = start) + 1;
-
5970 return false;
-
5971 }
-
5972 }
-
5973 };
+
5943 public:
+ + +
5946
+
5947 protected:
+
5948 http_space m_space;
+
5949 };
-
5974
-
- -
5979 {
-
5980 public:
-
5981 virtual bool match(
-
5982 _In_reads_or_z_(end) const char* text,
-
5983 _In_ size_t start = 0,
-
5984 _In_ size_t end = (size_t)-1,
-
5985 _In_ int flags = match_default)
-
5986 {
-
5987 assert(text || start >= end);
-
5988 this->interval.end = start;
-
5989 if (type.match(text, this->interval.end, end, flags))
-
5990 this->interval.end = type.interval.end;
-
5991 else
-
5992 goto error;
-
5993 while (m_space.match(text, this->interval.end, end, flags))
-
5994 this->interval.end = m_space.interval.end;
-
5995 if (this->interval.end < end && text[this->interval.end] == '/')
-
5996 this->interval.end++;
-
5997 else
-
5998 goto error;
-
5999 while (m_space.match(text, this->interval.end, end, flags))
-
6000 this->interval.end = m_space.interval.end;
-
6001 if (subtype.match(text, this->interval.end, end, flags))
-
6002 this->interval.end = subtype.interval.end;
-
6003 else
-
6004 goto error;
-
6005 this->interval.start = start;
-
6006 return true;
-
6007
-
6008 error:
-
6009 type.invalidate();
-
6010 subtype.invalidate();
-
6011 this->interval.start = (this->interval.end = start) + 1;
-
6012 return false;
-
6013 }
-
6014
-
6015 virtual void invalidate()
-
6016 {
+
5950
+
+
5954 class http_any_type : public parser
+
5955 {
+
5956 public:
+
5957 virtual bool match(
+
5958 _In_reads_or_z_(end) const char* text,
+
5959 _In_ size_t start = 0,
+
5960 _In_ size_t end = (size_t)-1,
+
5961 _In_ int flags = match_default)
+
5962 {
+
5963 assert(text || start >= end);
+
5964 if (start + 2 < end &&
+
5965 text[start] == '*' &&
+
5966 text[start + 1] == '/' &&
+
5967 text[start + 2] == '*')
+
5968 {
+
5969 this->interval.end = (this->interval.start = start) + 3;
+
5970 return true;
+
5971 }
+
5972 else if (start < end && text[start] == '*') {
+
5973 this->interval.end = (this->interval.start = start) + 1;
+
5974 return true;
+
5975 }
+
5976 else {
+
5977 this->interval.start = (this->interval.end = start) + 1;
+
5978 return false;
+
5979 }
+
5980 }
+
5981 };
+
+
5982
+
+ +
5987 {
+
5988 public:
+
5989 virtual bool match(
+
5990 _In_reads_or_z_(end) const char* text,
+
5991 _In_ size_t start = 0,
+
5992 _In_ size_t end = (size_t)-1,
+
5993 _In_ int flags = match_default)
+
5994 {
+
5995 assert(text || start >= end);
+
5996 this->interval.end = start;
+
5997 if (type.match(text, this->interval.end, end, flags))
+
5998 this->interval.end = type.interval.end;
+
5999 else
+
6000 goto error;
+
6001 while (m_space.match(text, this->interval.end, end, flags))
+
6002 this->interval.end = m_space.interval.end;
+
6003 if (this->interval.end < end && text[this->interval.end] == '/')
+
6004 this->interval.end++;
+
6005 else
+
6006 goto error;
+
6007 while (m_space.match(text, this->interval.end, end, flags))
+
6008 this->interval.end = m_space.interval.end;
+
6009 if (subtype.match(text, this->interval.end, end, flags))
+
6010 this->interval.end = subtype.interval.end;
+
6011 else
+
6012 goto error;
+
6013 this->interval.start = start;
+
6014 return true;
+
6015
+
6016 error:
6017 type.invalidate();
6018 subtype.invalidate();
-
6019 parser::invalidate();
-
6020 }
-
6021
-
6022 public:
-
6023 http_token type;
-
6024 http_token subtype;
-
6025
-
6026 protected:
-
6027 http_space m_space;
-
6028 };
-
+
6019 this->interval.start = (this->interval.end = start) + 1;
+
6020 return false;
+
6021 }
+
6022
+
6023 virtual void invalidate()
+
6024 {
+
6025 type.invalidate();
+
6026 subtype.invalidate();
+
6027 parser::invalidate();
+
6028 }
6029
-
- -
6034 {
-
6035 public:
-
6036 virtual bool match(
-
6037 _In_reads_or_z_(end) const char* text,
-
6038 _In_ size_t start = 0,
-
6039 _In_ size_t end = (size_t)-1,
-
6040 _In_ int flags = match_default)
-
6041 {
-
6042 assert(text || start >= end);
-
6043 if (!http_media_range::match(text, start, end, flags))
-
6044 goto error;
-
6045 params.clear();
-
6046 for (;;) {
-
6047 if (this->interval.end < end && text[this->interval.end]) {
-
6048 if (m_space.match(text, this->interval.end, end, flags))
-
6049 this->interval.end = m_space.interval.end;
-
6050 else if (text[this->interval.end] == ';') {
-
6051 this->interval.end++;
-
6052 while (m_space.match(text, this->interval.end, end, flags))
-
6053 this->interval.end = m_space.interval.end;
- -
6055 if (param.match(text, this->interval.end, end, flags)) {
-
6056 this->interval.end = param.interval.end;
-
6057 params.push_back(std::move(param));
-
6058 }
-
6059 else
-
6060 break;
-
6061 }
-
6062 else
-
6063 break;
-
6064 }
-
6065 else
-
6066 break;
-
6067 }
-
6068 this->interval.end = params.empty() ? subtype.interval.end : params.back().interval.end;
-
6069 return true;
-
6070
-
6071 error:
-
6072 http_media_range::invalidate();
-
6073 params.clear();
-
6074 this->interval.start = (this->interval.end = start) + 1;
-
6075 return false;
-
6076 }
-
6077
-
6078 virtual void invalidate()
-
6079 {
-
6080 params.clear();
-
6081 http_media_range::invalidate();
-
6082 }
-
6083
-
6084 public:
-
6085 std::list<http_parameter> params;
-
6086 };
+
6030 public:
+
6031 http_token type;
+
6032 http_token subtype;
+
6033
+
6034 protected:
+
6035 http_space m_space;
+
6036 };
-
6087
-
- -
6092 {
-
6093 public:
-
6094 virtual bool match(
-
6095 _In_reads_or_z_(end) const char* text,
-
6096 _In_ size_t start = 0,
-
6097 _In_ size_t end = (size_t)-1,
-
6098 _In_ int flags = match_default)
-
6099 {
-
6100 assert(text || start >= end);
-
6101 this->interval.end = start;
-
6102 for (;;) {
-
6103 if (this->interval.end < end && text[this->interval.end]) {
-
6104 if ((unsigned int)text[this->interval.end] < 0x20 ||
-
6105 (unsigned int)text[this->interval.end] == 0x7f ||
-
6106 text[this->interval.end] == ':' ||
-
6107 text[this->interval.end] == '/' ||
-
6108 isspace(text[this->interval.end]))
-
6109 break;
-
6110 else
-
6111 this->interval.end++;
-
6112 }
-
6113 else
-
6114 break;
-
6115 }
- -
6117 this->interval.start = start;
-
6118 return true;
-
6119 }
-
6120 this->interval.start = (this->interval.end = start) + 1;
-
6121 return false;
-
6122 }
-
6123 };
+
6037
+
+ +
6042 {
+
6043 public:
+
6044 virtual bool match(
+
6045 _In_reads_or_z_(end) const char* text,
+
6046 _In_ size_t start = 0,
+
6047 _In_ size_t end = (size_t)-1,
+
6048 _In_ int flags = match_default)
+
6049 {
+
6050 assert(text || start >= end);
+
6051 if (!http_media_range::match(text, start, end, flags))
+
6052 goto error;
+
6053 params.clear();
+
6054 for (;;) {
+
6055 if (this->interval.end < end && text[this->interval.end]) {
+
6056 if (m_space.match(text, this->interval.end, end, flags))
+
6057 this->interval.end = m_space.interval.end;
+
6058 else if (text[this->interval.end] == ';') {
+
6059 this->interval.end++;
+
6060 while (m_space.match(text, this->interval.end, end, flags))
+
6061 this->interval.end = m_space.interval.end;
+ +
6063 if (param.match(text, this->interval.end, end, flags)) {
+
6064 this->interval.end = param.interval.end;
+
6065 params.push_back(std::move(param));
+
6066 }
+
6067 else
+
6068 break;
+
6069 }
+
6070 else
+
6071 break;
+
6072 }
+
6073 else
+
6074 break;
+
6075 }
+
6076 this->interval.end = params.empty() ? subtype.interval.end : params.back().interval.end;
+
6077 return true;
+
6078
+
6079 error:
+
6080 http_media_range::invalidate();
+
6081 params.clear();
+
6082 this->interval.start = (this->interval.end = start) + 1;
+
6083 return false;
+
6084 }
+
6085
+
6086 virtual void invalidate()
+
6087 {
+
6088 params.clear();
+
6089 http_media_range::invalidate();
+
6090 }
+
6091
+
6092 public:
+
6093 std::list<http_parameter> params;
+
6094 };
-
6124
-
-
6128 class http_url_port : public parser
-
6129 {
-
6130 public:
-
6131 http_url_port(_In_ const std::locale& locale = std::locale()) :
-
6132 parser(locale),
-
6133 value(0)
-
6134 {}
-
6135
-
6136 virtual bool match(
-
6137 _In_reads_or_z_(end) const char* text,
-
6138 _In_ size_t start = 0,
-
6139 _In_ size_t end = (size_t)-1,
-
6140 _In_ int flags = match_default)
-
6141 {
-
6142 assert(text || start >= end);
-
6143 value = 0;
-
6144 this->interval.end = start;
-
6145 for (;;) {
-
6146 if (this->interval.end < end && text[this->interval.end]) {
-
6147 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
-
6148 size_t _value = (size_t)value * 10 + text[this->interval.end] - '0';
-
6149 if (_value > (uint16_t)-1) {
-
6150 value = 0;
-
6151 this->interval.start = (this->interval.end = start) + 1;
-
6152 return false;
-
6153 }
-
6154 value = (uint16_t)_value;
-
6155 this->interval.end++;
-
6156 }
-
6157 else
-
6158 break;
-
6159 }
-
6160 else
-
6161 break;
-
6162 }
- -
6164 this->interval.start = start;
-
6165 return true;
-
6166 }
-
6167 this->interval.start = (this->interval.end = start) + 1;
-
6168 return false;
-
6169 }
-
6170
-
6171 virtual void invalidate()
-
6172 {
-
6173 value = 0;
-
6174 parser::invalidate();
-
6175 }
-
6176
-
6177 public:
-
6178 uint16_t value;
-
6179 };
+
6095
+
+ +
6100 {
+
6101 public:
+
6102 virtual bool match(
+
6103 _In_reads_or_z_(end) const char* text,
+
6104 _In_ size_t start = 0,
+
6105 _In_ size_t end = (size_t)-1,
+
6106 _In_ int flags = match_default)
+
6107 {
+
6108 assert(text || start >= end);
+
6109 this->interval.end = start;
+
6110 for (;;) {
+
6111 if (this->interval.end < end && text[this->interval.end]) {
+
6112 if ((unsigned int)text[this->interval.end] < 0x20 ||
+
6113 (unsigned int)text[this->interval.end] == 0x7f ||
+
6114 text[this->interval.end] == ':' ||
+
6115 text[this->interval.end] == '/' ||
+
6116 isspace(text[this->interval.end]))
+
6117 break;
+
6118 else
+
6119 this->interval.end++;
+
6120 }
+
6121 else
+
6122 break;
+
6123 }
+ +
6125 this->interval.start = start;
+
6126 return true;
+
6127 }
+
6128 this->interval.start = (this->interval.end = start) + 1;
+
6129 return false;
+
6130 }
+
6131 };
-
6180
-
- -
6185 {
-
6186 public:
-
6187 virtual bool match(
-
6188 _In_reads_or_z_(end) const char* text,
-
6189 _In_ size_t start = 0,
-
6190 _In_ size_t end = (size_t)-1,
-
6191 _In_ int flags = match_default)
-
6192 {
-
6193 assert(text || start >= end);
-
6194 this->interval.end = start;
-
6195 for (;;) {
-
6196 if (this->interval.end < end && text[this->interval.end]) {
-
6197 if ((unsigned int)text[this->interval.end] < 0x20 ||
-
6198 (unsigned int)text[this->interval.end] == 0x7f ||
-
6199 text[this->interval.end] == '?' ||
-
6200 text[this->interval.end] == '/' ||
-
6201 isspace(text[this->interval.end]))
-
6202 break;
-
6203 else
-
6204 this->interval.end++;
-
6205 }
-
6206 else
-
6207 break;
-
6208 }
-
6209 this->interval.start = start;
-
6210 return true;
-
6211 }
-
6212 };
+
6132
+
+
6136 class http_url_port : public parser
+
6137 {
+
6138 public:
+
6139 http_url_port(_In_ const std::locale& locale = std::locale()) :
+
6140 parser(locale),
+
6141 value(0)
+
6142 {}
+
6143
+
6144 virtual bool match(
+
6145 _In_reads_or_z_(end) const char* text,
+
6146 _In_ size_t start = 0,
+
6147 _In_ size_t end = (size_t)-1,
+
6148 _In_ int flags = match_default)
+
6149 {
+
6150 assert(text || start >= end);
+
6151 value = 0;
+
6152 this->interval.end = start;
+
6153 for (;;) {
+
6154 if (this->interval.end < end && text[this->interval.end]) {
+
6155 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
+
6156 size_t _value = (size_t)value * 10 + text[this->interval.end] - '0';
+
6157 if (_value > (uint16_t)-1) {
+
6158 value = 0;
+
6159 this->interval.start = (this->interval.end = start) + 1;
+
6160 return false;
+
6161 }
+
6162 value = (uint16_t)_value;
+
6163 this->interval.end++;
+
6164 }
+
6165 else
+
6166 break;
+
6167 }
+
6168 else
+
6169 break;
+
6170 }
+ +
6172 this->interval.start = start;
+
6173 return true;
+
6174 }
+
6175 this->interval.start = (this->interval.end = start) + 1;
+
6176 return false;
+
6177 }
+
6178
+
6179 virtual void invalidate()
+
6180 {
+
6181 value = 0;
+
6182 parser::invalidate();
+
6183 }
+
6184
+
6185 public:
+
6186 uint16_t value;
+
6187 };
-
6213
-
-
6217 class http_url_path : public parser
-
6218 {
-
6219 public:
-
6220 virtual bool match(
-
6221 _In_reads_or_z_(end) const char* text,
-
6222 _In_ size_t start = 0,
-
6223 _In_ size_t end = (size_t)-1,
-
6224 _In_ int flags = match_default)
-
6225 {
-
6226 assert(text || start >= end);
- -
6228 this->interval.end = start;
-
6229 segments.clear();
-
6230 assert(text || this->interval.end >= end);
-
6231 if (this->interval.end < end && text[this->interval.end] != '/')
-
6232 goto error;
-
6233 this->interval.end++;
-
6234 s.match(text, this->interval.end, end, flags);
-
6235 segments.push_back(s);
-
6236 this->interval.end = s.interval.end;
-
6237 for (;;) {
-
6238 if (this->interval.end < end && text[this->interval.end]) {
-
6239 if (text[this->interval.end] == '/') {
-
6240 this->interval.end++;
-
6241 s.match(text, this->interval.end, end, flags);
-
6242 segments.push_back(s);
-
6243 this->interval.end = s.interval.end;
-
6244 }
-
6245 else
-
6246 break;
-
6247 }
-
6248 else
-
6249 break;
-
6250 }
-
6251 this->interval.start = start;
-
6252 return true;
-
6253
-
6254 error:
-
6255 segments.clear();
-
6256 this->interval.start = (this->interval.end = start) + 1;
-
6257 return false;
-
6258 }
-
6259
-
6260 virtual void invalidate()
-
6261 {
-
6262 segments.clear();
-
6263 parser::invalidate();
-
6264 }
-
6265
-
6266 public:
-
6267 std::vector<http_url_path_segment> segments;
-
6268 };
+
6188
+
+ +
6193 {
+
6194 public:
+
6195 virtual bool match(
+
6196 _In_reads_or_z_(end) const char* text,
+
6197 _In_ size_t start = 0,
+
6198 _In_ size_t end = (size_t)-1,
+
6199 _In_ int flags = match_default)
+
6200 {
+
6201 assert(text || start >= end);
+
6202 this->interval.end = start;
+
6203 for (;;) {
+
6204 if (this->interval.end < end && text[this->interval.end]) {
+
6205 if ((unsigned int)text[this->interval.end] < 0x20 ||
+
6206 (unsigned int)text[this->interval.end] == 0x7f ||
+
6207 text[this->interval.end] == '?' ||
+
6208 text[this->interval.end] == '/' ||
+
6209 isspace(text[this->interval.end]))
+
6210 break;
+
6211 else
+
6212 this->interval.end++;
+
6213 }
+
6214 else
+
6215 break;
+
6216 }
+
6217 this->interval.start = start;
+
6218 return true;
+
6219 }
+
6220 };
-
6269
-
- -
6274 {
-
6275 public:
-
6276 virtual bool match(
-
6277 _In_reads_or_z_(end) const char* text,
-
6278 _In_ size_t start = 0,
-
6279 _In_ size_t end = (size_t)-1,
-
6280 _In_ int flags = match_default)
-
6281 {
-
6282 assert(text || start >= end);
-
6283 this->interval.end = start;
-
6284 name.start = this->interval.end;
-
6285 for (;;) {
-
6286 if (this->interval.end < end && text[this->interval.end]) {
-
6287 if ((unsigned int)text[this->interval.end] < 0x20 ||
-
6288 (unsigned int)text[this->interval.end] == 0x7f ||
-
6289 text[this->interval.end] == '&' ||
-
6290 text[this->interval.end] == '=' ||
-
6291 isspace(text[this->interval.end]))
-
6292 break;
-
6293 else
-
6294 this->interval.end++;
-
6295 }
-
6296 else
-
6297 break;
-
6298 }
- -
6300 name.end = this->interval.end;
-
6301 else
-
6302 goto error;
-
6303 if (text[this->interval.end] == '=') {
-
6304 this->interval.end++;
-
6305 value.start = this->interval.end;
-
6306 for (;;) {
-
6307 if (this->interval.end < end && text[this->interval.end]) {
-
6308 if ((unsigned int)text[this->interval.end] < 0x20 ||
-
6309 (unsigned int)text[this->interval.end] == 0x7f ||
-
6310 text[this->interval.end] == '&' ||
-
6311 isspace(text[this->interval.end]))
-
6312 break;
-
6313 else
-
6314 this->interval.end++;
-
6315 }
-
6316 else
-
6317 break;
-
6318 }
-
6319 value.end = this->interval.end;
-
6320 }
-
6321 else {
-
6322 value.start = 1;
-
6323 value.end = 0;
-
6324 }
-
6325 this->interval.start = start;
-
6326 return true;
-
6327
-
6328 error:
-
6329 name.start = 1;
-
6330 name.end = 0;
-
6331 value.start = 1;
-
6332 value.end = 0;
-
6333 this->interval.start = (this->interval.end = start) + 1;
-
6334 return false;
-
6335 }
-
6336
-
6337 virtual void invalidate()
-
6338 {
-
6339 name.start = 1;
-
6340 name.end = 0;
-
6341 value.start = 1;
-
6342 value.end = 0;
-
6343 parser::invalidate();
-
6344 }
-
6345
-
6346 public:
- - -
6349 };
+
6221
+
+
6225 class http_url_path : public parser
+
6226 {
+
6227 public:
+
6228 virtual bool match(
+
6229 _In_reads_or_z_(end) const char* text,
+
6230 _In_ size_t start = 0,
+
6231 _In_ size_t end = (size_t)-1,
+
6232 _In_ int flags = match_default)
+
6233 {
+
6234 assert(text || start >= end);
+ +
6236 this->interval.end = start;
+
6237 segments.clear();
+
6238 assert(text || this->interval.end >= end);
+
6239 if (this->interval.end < end && text[this->interval.end] != '/')
+
6240 goto error;
+
6241 this->interval.end++;
+
6242 s.match(text, this->interval.end, end, flags);
+
6243 segments.push_back(s);
+
6244 this->interval.end = s.interval.end;
+
6245 for (;;) {
+
6246 if (this->interval.end < end && text[this->interval.end]) {
+
6247 if (text[this->interval.end] == '/') {
+
6248 this->interval.end++;
+
6249 s.match(text, this->interval.end, end, flags);
+
6250 segments.push_back(s);
+
6251 this->interval.end = s.interval.end;
+
6252 }
+
6253 else
+
6254 break;
+
6255 }
+
6256 else
+
6257 break;
+
6258 }
+
6259 this->interval.start = start;
+
6260 return true;
+
6261
+
6262 error:
+
6263 segments.clear();
+
6264 this->interval.start = (this->interval.end = start) + 1;
+
6265 return false;
+
6266 }
+
6267
+
6268 virtual void invalidate()
+
6269 {
+
6270 segments.clear();
+
6271 parser::invalidate();
+
6272 }
+
6273
+
6274 public:
+
6275 std::vector<http_url_path_segment> segments;
+
6276 };
-
6350
-
-
6354 class http_url : public parser
-
6355 {
-
6356 public:
-
6357 http_url(_In_ const std::locale& locale = std::locale()) :
-
6358 parser(locale),
-
6359 port(locale)
-
6360 {}
-
6361
-
6362 virtual bool match(
-
6363 _In_reads_or_z_(end) const char* text,
-
6364 _In_ size_t start = 0,
-
6365 _In_ size_t end = (size_t)-1,
-
6366 _In_ int flags = match_default)
-
6367 {
-
6368 assert(text || start >= end);
-
6369 this->interval.end = start;
-
6370
-
6371 if (this->interval.end + 7 <= end && stdex::strnicmp(text + this->interval.end, 7, "http://", (size_t)-1, m_locale) == 0) {
-
6372 this->interval.end += 7;
-
6373 if (server.match(text, this->interval.end, end, flags))
-
6374 this->interval.end = server.interval.end;
-
6375 else
-
6376 goto error;
-
6377 if (this->interval.end < end && text[this->interval.end] == ':') {
-
6378 this->interval.end++;
-
6379 if (port.match(text, this->interval.end, end, flags))
-
6380 this->interval.end = port.interval.end;
-
6381 }
-
6382 else {
-
6383 port.invalidate();
-
6384 port.value = 80;
-
6385 }
-
6386 }
-
6387 else {
-
6388 server.invalidate();
-
6389 port.invalidate();
-
6390 port.value = 80;
-
6391 }
-
6392
-
6393 if (path.match(text, this->interval.end, end, flags))
-
6394 this->interval.end = path.interval.end;
-
6395 else
-
6396 goto error;
-
6397
-
6398 params.clear();
-
6399
-
6400 if (this->interval.end < end && text[this->interval.end] == '?') {
-
6401 this->interval.end++;
-
6402 for (;;) {
-
6403 if (this->interval.end < end && text[this->interval.end]) {
-
6404 if ((unsigned int)text[this->interval.end] < 0x20 ||
-
6405 (unsigned int)text[this->interval.end] == 0x7f ||
-
6406 isspace(text[this->interval.end]))
-
6407 break;
-
6408 else if (text[this->interval.end] == '&')
-
6409 this->interval.end++;
-
6410 else {
- -
6412 if (param.match(text, this->interval.end, end, flags)) {
-
6413 this->interval.end = param.interval.end;
-
6414 params.push_back(std::move(param));
-
6415 }
-
6416 else
-
6417 break;
-
6418 }
-
6419 }
-
6420 else
-
6421 break;
-
6422 }
-
6423 }
-
6424
-
6425 this->interval.start = start;
-
6426 return true;
-
6427
-
6428 error:
-
6429 server.invalidate();
-
6430 port.invalidate();
-
6431 path.invalidate();
-
6432 params.clear();
-
6433 this->interval.start = (this->interval.end = start) + 1;
-
6434 return false;
-
6435 }
-
6436
-
6437 virtual void invalidate()
-
6438 {
-
6439 server.invalidate();
-
6440 port.invalidate();
-
6441 path.invalidate();
-
6442 params.clear();
-
6443 parser::invalidate();
-
6444 }
-
6445
-
6446 public:
-
6447 http_url_server server;
-
6448 http_url_port port;
-
6449 http_url_path path;
-
6450 std::list<http_url_parameter> params;
-
6451 };
+
6277
+
+ +
6282 {
+
6283 public:
+
6284 virtual bool match(
+
6285 _In_reads_or_z_(end) const char* text,
+
6286 _In_ size_t start = 0,
+
6287 _In_ size_t end = (size_t)-1,
+
6288 _In_ int flags = match_default)
+
6289 {
+
6290 assert(text || start >= end);
+
6291 this->interval.end = start;
+
6292 name.start = this->interval.end;
+
6293 for (;;) {
+
6294 if (this->interval.end < end && text[this->interval.end]) {
+
6295 if ((unsigned int)text[this->interval.end] < 0x20 ||
+
6296 (unsigned int)text[this->interval.end] == 0x7f ||
+
6297 text[this->interval.end] == '&' ||
+
6298 text[this->interval.end] == '=' ||
+
6299 isspace(text[this->interval.end]))
+
6300 break;
+
6301 else
+
6302 this->interval.end++;
+
6303 }
+
6304 else
+
6305 break;
+
6306 }
+ +
6308 name.end = this->interval.end;
+
6309 else
+
6310 goto error;
+
6311 if (text[this->interval.end] == '=') {
+
6312 this->interval.end++;
+
6313 value.start = this->interval.end;
+
6314 for (;;) {
+
6315 if (this->interval.end < end && text[this->interval.end]) {
+
6316 if ((unsigned int)text[this->interval.end] < 0x20 ||
+
6317 (unsigned int)text[this->interval.end] == 0x7f ||
+
6318 text[this->interval.end] == '&' ||
+
6319 isspace(text[this->interval.end]))
+
6320 break;
+
6321 else
+
6322 this->interval.end++;
+
6323 }
+
6324 else
+
6325 break;
+
6326 }
+
6327 value.end = this->interval.end;
+
6328 }
+
6329 else {
+
6330 value.start = 1;
+
6331 value.end = 0;
+
6332 }
+
6333 this->interval.start = start;
+
6334 return true;
+
6335
+
6336 error:
+
6337 name.start = 1;
+
6338 name.end = 0;
+
6339 value.start = 1;
+
6340 value.end = 0;
+
6341 this->interval.start = (this->interval.end = start) + 1;
+
6342 return false;
+
6343 }
+
6344
+
6345 virtual void invalidate()
+
6346 {
+
6347 name.start = 1;
+
6348 name.end = 0;
+
6349 value.start = 1;
+
6350 value.end = 0;
+
6351 parser::invalidate();
+
6352 }
+
6353
+
6354 public:
+ + +
6357 };
-
6452
-
-
6456 class http_language : public parser
-
6457 {
-
6458 public:
-
6459 virtual bool match(
-
6460 _In_reads_or_z_(end) const char* text,
-
6461 _In_ size_t start = 0,
-
6462 _In_ size_t end = (size_t)-1,
-
6463 _In_ int flags = match_default)
-
6464 {
-
6465 assert(text || start >= end);
-
6466 this->interval.end = start;
-
6467 components.clear();
-
6468 for (;;) {
-
6469 if (this->interval.end < end && text[this->interval.end]) {
- -
6471 k.end = this->interval.end;
-
6472 for (;;) {
-
6473 if (k.end < end && text[k.end]) {
-
6474 if (isalpha(text[k.end]))
-
6475 k.end++;
-
6476 else
-
6477 break;
-
6478 }
-
6479 else
-
6480 break;
-
6481 }
-
6482 if (this->interval.end < k.end) {
-
6483 k.start = this->interval.end;
-
6484 this->interval.end = k.end;
-
6485 components.push_back(k);
-
6486 }
-
6487 else
-
6488 break;
-
6489 if (this->interval.end < end && text[this->interval.end] == '-')
-
6490 this->interval.end++;
-
6491 else
-
6492 break;
-
6493 }
-
6494 else
-
6495 break;
-
6496 }
-
6497 if (!components.empty()) {
-
6498 this->interval.start = start;
-
6499 this->interval.end = components.back().end;
-
6500 return true;
-
6501 }
-
6502 this->interval.start = (this->interval.end = start) + 1;
-
6503 return false;
-
6504 }
-
6505
-
6506 virtual void invalidate()
-
6507 {
-
6508 components.clear();
-
6509 parser::invalidate();
-
6510 }
-
6511
-
6512 public:
-
6513 std::vector<stdex::interval<size_t>> components;
-
6514 };
+
6358
+
+
6362 class http_url : public parser
+
6363 {
+
6364 public:
+
6365 http_url(_In_ const std::locale& locale = std::locale()) :
+
6366 parser(locale),
+
6367 port(locale)
+
6368 {}
+
6369
+
6370 virtual bool match(
+
6371 _In_reads_or_z_(end) const char* text,
+
6372 _In_ size_t start = 0,
+
6373 _In_ size_t end = (size_t)-1,
+
6374 _In_ int flags = match_default)
+
6375 {
+
6376 assert(text || start >= end);
+
6377 this->interval.end = start;
+
6378
+
6379 if (this->interval.end + 7 <= end && stdex::strnicmp(text + this->interval.end, 7, "http://", (size_t)-1, m_locale) == 0) {
+
6380 this->interval.end += 7;
+
6381 if (server.match(text, this->interval.end, end, flags))
+
6382 this->interval.end = server.interval.end;
+
6383 else
+
6384 goto error;
+
6385 if (this->interval.end < end && text[this->interval.end] == ':') {
+
6386 this->interval.end++;
+
6387 if (port.match(text, this->interval.end, end, flags))
+
6388 this->interval.end = port.interval.end;
+
6389 }
+
6390 else {
+
6391 port.invalidate();
+
6392 port.value = 80;
+
6393 }
+
6394 }
+
6395 else {
+
6396 server.invalidate();
+
6397 port.invalidate();
+
6398 port.value = 80;
+
6399 }
+
6400
+
6401 if (path.match(text, this->interval.end, end, flags))
+
6402 this->interval.end = path.interval.end;
+
6403 else
+
6404 goto error;
+
6405
+
6406 params.clear();
+
6407
+
6408 if (this->interval.end < end && text[this->interval.end] == '?') {
+
6409 this->interval.end++;
+
6410 for (;;) {
+
6411 if (this->interval.end < end && text[this->interval.end]) {
+
6412 if ((unsigned int)text[this->interval.end] < 0x20 ||
+
6413 (unsigned int)text[this->interval.end] == 0x7f ||
+
6414 isspace(text[this->interval.end]))
+
6415 break;
+
6416 else if (text[this->interval.end] == '&')
+
6417 this->interval.end++;
+
6418 else {
+ +
6420 if (param.match(text, this->interval.end, end, flags)) {
+
6421 this->interval.end = param.interval.end;
+
6422 params.push_back(std::move(param));
+
6423 }
+
6424 else
+
6425 break;
+
6426 }
+
6427 }
+
6428 else
+
6429 break;
+
6430 }
+
6431 }
+
6432
+
6433 this->interval.start = start;
+
6434 return true;
+
6435
+
6436 error:
+
6437 server.invalidate();
+
6438 port.invalidate();
+
6439 path.invalidate();
+
6440 params.clear();
+
6441 this->interval.start = (this->interval.end = start) + 1;
+
6442 return false;
+
6443 }
+
6444
+
6445 virtual void invalidate()
+
6446 {
+
6447 server.invalidate();
+
6448 port.invalidate();
+
6449 path.invalidate();
+
6450 params.clear();
+
6451 parser::invalidate();
+
6452 }
+
6453
+
6454 public:
+
6455 http_url_server server;
+
6456 http_url_port port;
+
6457 http_url_path path;
+
6458 std::list<http_url_parameter> params;
+
6459 };
-
6515
-
-
6519 class http_weight : public parser
-
6520 {
-
6521 public:
-
6522 http_weight(_In_ const std::locale& locale = std::locale()) :
-
6523 parser(locale),
-
6524 value(1.0f)
-
6525 {}
-
6526
-
6527 virtual bool match(
-
6528 _In_reads_or_z_(end) const char* text,
-
6529 _In_ size_t start = 0,
-
6530 _In_ size_t end = (size_t)-1,
-
6531 _In_ int flags = match_default)
-
6532 {
-
6533 assert(text || start >= end);
-
6534 size_t celi_del = 0, decimalni_del = 0, decimalni_del_n = 1;
-
6535 this->interval.end = start;
-
6536 for (;;) {
-
6537 if (this->interval.end < end && text[this->interval.end]) {
-
6538 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
-
6539 celi_del = celi_del * 10 + text[this->interval.end] - '0';
-
6540 this->interval.end++;
-
6541 }
-
6542 else if (text[this->interval.end] == '.') {
-
6543 this->interval.end++;
-
6544 for (;;) {
-
6545 if (this->interval.end < end && text[this->interval.end]) {
-
6546 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
-
6547 decimalni_del = decimalni_del * 10 + text[this->interval.end] - '0';
-
6548 decimalni_del_n *= 10;
-
6549 this->interval.end++;
-
6550 }
-
6551 else
-
6552 break;
-
6553 }
-
6554 else
-
6555 break;
-
6556 }
-
6557 break;
-
6558 }
-
6559 else
-
6560 break;
-
6561 }
-
6562 else
-
6563 break;
-
6564 }
- - -
6567 this->interval.start = start;
-
6568 return true;
-
6569 }
-
6570 value = 1.0f;
-
6571 this->interval.start = (this->interval.end = start) + 1;
-
6572 return false;
-
6573 }
-
6574
-
6575 virtual void invalidate()
-
6576 {
-
6577 value = 1.0f;
-
6578 parser::invalidate();
-
6579 }
-
6580
-
6581 public:
-
6582 float value;
-
6583 };
+
6460
+
+
6464 class http_language : public parser
+
6465 {
+
6466 public:
+
6467 virtual bool match(
+
6468 _In_reads_or_z_(end) const char* text,
+
6469 _In_ size_t start = 0,
+
6470 _In_ size_t end = (size_t)-1,
+
6471 _In_ int flags = match_default)
+
6472 {
+
6473 assert(text || start >= end);
+
6474 this->interval.end = start;
+
6475 components.clear();
+
6476 for (;;) {
+
6477 if (this->interval.end < end && text[this->interval.end]) {
+ +
6479 k.end = this->interval.end;
+
6480 for (;;) {
+
6481 if (k.end < end && text[k.end]) {
+
6482 if (isalpha(text[k.end]))
+
6483 k.end++;
+
6484 else
+
6485 break;
+
6486 }
+
6487 else
+
6488 break;
+
6489 }
+
6490 if (this->interval.end < k.end) {
+
6491 k.start = this->interval.end;
+
6492 this->interval.end = k.end;
+
6493 components.push_back(k);
+
6494 }
+
6495 else
+
6496 break;
+
6497 if (this->interval.end < end && text[this->interval.end] == '-')
+
6498 this->interval.end++;
+
6499 else
+
6500 break;
+
6501 }
+
6502 else
+
6503 break;
+
6504 }
+
6505 if (!components.empty()) {
+
6506 this->interval.start = start;
+
6507 this->interval.end = components.back().end;
+
6508 return true;
+
6509 }
+
6510 this->interval.start = (this->interval.end = start) + 1;
+
6511 return false;
+
6512 }
+
6513
+
6514 virtual void invalidate()
+
6515 {
+
6516 components.clear();
+
6517 parser::invalidate();
+
6518 }
+
6519
+
6520 public:
+
6521 std::vector<stdex::interval<size_t>> components;
+
6522 };
-
6584
-
-
6588 class http_asterisk : public parser
-
6589 {
-
6590 public:
-
6591 virtual bool match(
-
6592 _In_reads_or_z_(end) const char* text,
-
6593 _In_ size_t start = 0,
-
6594 _In_ size_t end = (size_t)-1,
-
6595 _In_ int flags = match_default)
-
6596 {
-
6597 assert(text || end <= start);
-
6598 if (start < end && text[start] == '*') {
-
6599 this->interval.end = (this->interval.start = start) + 1;
-
6600 return true;
-
6601 }
-
6602 this->interval.start = (this->interval.end = start) + 1;
-
6603 return false;
-
6604 }
-
6605 };
+
6523
+
+
6527 class http_weight : public parser
+
6528 {
+
6529 public:
+
6530 http_weight(_In_ const std::locale& locale = std::locale()) :
+
6531 parser(locale),
+
6532 value(1.0f)
+
6533 {}
+
6534
+
6535 virtual bool match(
+
6536 _In_reads_or_z_(end) const char* text,
+
6537 _In_ size_t start = 0,
+
6538 _In_ size_t end = (size_t)-1,
+
6539 _In_ int flags = match_default)
+
6540 {
+
6541 assert(text || start >= end);
+
6542 size_t celi_del = 0, decimalni_del = 0, decimalni_del_n = 1;
+
6543 this->interval.end = start;
+
6544 for (;;) {
+
6545 if (this->interval.end < end && text[this->interval.end]) {
+
6546 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
+
6547 celi_del = celi_del * 10 + text[this->interval.end] - '0';
+
6548 this->interval.end++;
+
6549 }
+
6550 else if (text[this->interval.end] == '.') {
+
6551 this->interval.end++;
+
6552 for (;;) {
+
6553 if (this->interval.end < end && text[this->interval.end]) {
+
6554 if ('0' <= text[this->interval.end] && text[this->interval.end] <= '9') {
+
6555 decimalni_del = decimalni_del * 10 + text[this->interval.end] - '0';
+
6556 decimalni_del_n *= 10;
+
6557 this->interval.end++;
+
6558 }
+
6559 else
+
6560 break;
+
6561 }
+
6562 else
+
6563 break;
+
6564 }
+
6565 break;
+
6566 }
+
6567 else
+
6568 break;
+
6569 }
+
6570 else
+
6571 break;
+
6572 }
+ + +
6575 this->interval.start = start;
+
6576 return true;
+
6577 }
+
6578 value = 1.0f;
+
6579 this->interval.start = (this->interval.end = start) + 1;
+
6580 return false;
+
6581 }
+
6582
+
6583 virtual void invalidate()
+
6584 {
+
6585 value = 1.0f;
+
6586 parser::invalidate();
+
6587 }
+
6588
+
6589 public:
+
6590 float value;
+
6591 };
-
6606
-
6610 template <class T, class T_asterisk = http_asterisk>
-
- -
6612 {
-
6613 public:
-
6614 http_weighted_value(_In_ const std::locale& locale = std::locale()) :
-
6615 parser(locale),
-
6616 factor(locale)
-
6617 {}
-
6618
-
6619 virtual bool match(
-
6620 _In_reads_or_z_(end) const char* text,
-
6621 _In_ size_t start = 0,
-
6622 _In_ size_t end = (size_t)-1,
-
6623 _In_ int flags = match_default)
-
6624 {
-
6625 assert(text || start >= end);
-
6626 size_t konec_vrednosti;
-
6627 this->interval.end = start;
-
6628 if (asterisk.match(text, this->interval.end, end, flags)) {
-
6629 this->interval.end = konec_vrednosti = asterisk.interval.end;
-
6630 value.invalidate();
-
6631 }
-
6632 else if (value.match(text, this->interval.end, end, flags)) {
-
6633 this->interval.end = konec_vrednosti = value.interval.end;
-
6634 asterisk.invalidate();
-
6635 }
-
6636 else {
-
6637 asterisk.invalidate();
+
6592
+
+
6596 class http_asterisk : public parser
+
6597 {
+
6598 public:
+
6599 virtual bool match(
+
6600 _In_reads_or_z_(end) const char* text,
+
6601 _In_ size_t start = 0,
+
6602 _In_ size_t end = (size_t)-1,
+
6603 _In_ int flags = match_default)
+
6604 {
+
6605 assert(text || end <= start);
+
6606 if (start < end && text[start] == '*') {
+
6607 this->interval.end = (this->interval.start = start) + 1;
+
6608 return true;
+
6609 }
+
6610 this->interval.start = (this->interval.end = start) + 1;
+
6611 return false;
+
6612 }
+
6613 };
+
+
6614
+
6618 template <class T, class T_asterisk = http_asterisk>
+
+ +
6620 {
+
6621 public:
+
6622 http_weighted_value(_In_ const std::locale& locale = std::locale()) :
+
6623 parser(locale),
+
6624 factor(locale)
+
6625 {}
+
6626
+
6627 virtual bool match(
+
6628 _In_reads_or_z_(end) const char* text,
+
6629 _In_ size_t start = 0,
+
6630 _In_ size_t end = (size_t)-1,
+
6631 _In_ int flags = match_default)
+
6632 {
+
6633 assert(text || start >= end);
+
6634 size_t konec_vrednosti;
+
6635 this->interval.end = start;
+
6636 if (asterisk.match(text, this->interval.end, end, flags)) {
+
6637 this->interval.end = konec_vrednosti = asterisk.interval.end;
6638 value.invalidate();
-
6639 this->interval.start = (this->interval.end = start) + 1;
-
6640 return false;
-
6641 }
-
6642
-
6643 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
-
6644 if (this->interval.end < end && text[this->interval.end] == ';') {
-
6645 this->interval.end++;
-
6646 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
-
6647 if (this->interval.end < end && (text[this->interval.end] == 'q' || text[this->interval.end] == 'Q')) {
-
6648 this->interval.end++;
-
6649 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
-
6650 if (this->interval.end < end && text[this->interval.end] == '=') {
-
6651 this->interval.end++;
-
6652 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
-
6653 if (factor.match(text, this->interval.end, end, flags))
-
6654 this->interval.end = factor.interval.end;
-
6655 }
-
6656 }
-
6657 }
-
6658 if (!factor.interval) {
-
6659 factor.invalidate();
- -
6661 }
-
6662 this->interval.start = start;
-
6663 return true;
-
6664 }
-
6665
-
6666 virtual void invalidate()
-
6667 {
-
6668 asterisk.invalidate();
-
6669 value.invalidate();
-
6670 factor.invalidate();
-
6671 parser::invalidate();
+
6639 }
+
6640 else if (value.match(text, this->interval.end, end, flags)) {
+
6641 this->interval.end = konec_vrednosti = value.interval.end;
+
6642 asterisk.invalidate();
+
6643 }
+
6644 else {
+
6645 asterisk.invalidate();
+
6646 value.invalidate();
+
6647 this->interval.start = (this->interval.end = start) + 1;
+
6648 return false;
+
6649 }
+
6650
+
6651 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
+
6652 if (this->interval.end < end && text[this->interval.end] == ';') {
+
6653 this->interval.end++;
+
6654 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
+
6655 if (this->interval.end < end && (text[this->interval.end] == 'q' || text[this->interval.end] == 'Q')) {
+
6656 this->interval.end++;
+
6657 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
+
6658 if (this->interval.end < end && text[this->interval.end] == '=') {
+
6659 this->interval.end++;
+
6660 while (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])) this->interval.end++;
+
6661 if (factor.match(text, this->interval.end, end, flags))
+
6662 this->interval.end = factor.interval.end;
+
6663 }
+
6664 }
+
6665 }
+
6666 if (!factor.interval) {
+
6667 factor.invalidate();
+ +
6669 }
+
6670 this->interval.start = start;
+
6671 return true;
6672 }
6673
-
6674 public:
-
6675 T_asterisk asterisk;
-
6676 T value;
-
6677 http_weight factor;
-
6678 };
+
6674 virtual void invalidate()
+
6675 {
+
6676 asterisk.invalidate();
+
6677 value.invalidate();
+
6678 factor.invalidate();
+
6679 parser::invalidate();
+
6680 }
+
6681
+
6682 public:
+
6683 T_asterisk asterisk;
+
6684 T value;
+
6685 http_weight factor;
+
6686 };
-
6679
-
- -
6684 {
-
6685 public:
-
6686 virtual bool match(
-
6687 _In_reads_or_z_(end) const char* text,
-
6688 _In_ size_t start = 0,
-
6689 _In_ size_t end = (size_t)-1,
-
6690 _In_ int flags = match_default)
-
6691 {
-
6692 assert(text || start >= end);
-
6693 this->interval.end = start;
-
6694 if (this->interval.end < end && text[this->interval.end] == '$')
-
6695 this->interval.end++;
-
6696 else
-
6697 goto error;
-
6698 if (name.match(text, this->interval.end, end, flags))
-
6699 this->interval.end = name.interval.end;
-
6700 else
-
6701 goto error;
-
6702 while (m_space.match(text, this->interval.end, end, flags))
-
6703 this->interval.end = m_space.interval.end;
-
6704 if (this->interval.end < end && text[this->interval.end] == '=')
-
6705 this->interval.end++;
-
6706 else
-
6707 goto error;
-
6708 while (m_space.match(text, this->interval.end, end, flags))
-
6709 this->interval.end = m_space.interval.end;
-
6710 if (value.match(text, this->interval.end, end, flags))
-
6711 this->interval.end = value.interval.end;
-
6712 else
-
6713 goto error;
-
6714 this->interval.start = start;
-
6715 return true;
-
6716
-
6717 error:
-
6718 name.invalidate();
-
6719 value.invalidate();
-
6720 this->interval.start = (this->interval.end = start) + 1;
-
6721 return false;
-
6722 }
-
6723
-
6724 virtual void invalidate()
-
6725 {
+
6687
+
+ +
6692 {
+
6693 public:
+
6694 virtual bool match(
+
6695 _In_reads_or_z_(end) const char* text,
+
6696 _In_ size_t start = 0,
+
6697 _In_ size_t end = (size_t)-1,
+
6698 _In_ int flags = match_default)
+
6699 {
+
6700 assert(text || start >= end);
+
6701 this->interval.end = start;
+
6702 if (this->interval.end < end && text[this->interval.end] == '$')
+
6703 this->interval.end++;
+
6704 else
+
6705 goto error;
+
6706 if (name.match(text, this->interval.end, end, flags))
+
6707 this->interval.end = name.interval.end;
+
6708 else
+
6709 goto error;
+
6710 while (m_space.match(text, this->interval.end, end, flags))
+
6711 this->interval.end = m_space.interval.end;
+
6712 if (this->interval.end < end && text[this->interval.end] == '=')
+
6713 this->interval.end++;
+
6714 else
+
6715 goto error;
+
6716 while (m_space.match(text, this->interval.end, end, flags))
+
6717 this->interval.end = m_space.interval.end;
+
6718 if (value.match(text, this->interval.end, end, flags))
+
6719 this->interval.end = value.interval.end;
+
6720 else
+
6721 goto error;
+
6722 this->interval.start = start;
+
6723 return true;
+
6724
+
6725 error:
6726 name.invalidate();
6727 value.invalidate();
-
6728 parser::invalidate();
-
6729 }
-
6730
-
6731 public:
-
6732 http_token name;
-
6733 http_value value;
-
6734
-
6735 protected:
-
6736 http_space m_space;
-
6737 };
-
+
6728 this->interval.start = (this->interval.end = start) + 1;
+
6729 return false;
+
6730 }
+
6731
+
6732 virtual void invalidate()
+
6733 {
+
6734 name.invalidate();
+
6735 value.invalidate();
+
6736 parser::invalidate();
+
6737 }
6738
-
-
6742 class http_cookie : public parser
-
6743 {
-
6744 public:
-
6745 virtual bool match(
-
6746 _In_reads_or_z_(end) const char* text,
-
6747 _In_ size_t start = 0,
-
6748 _In_ size_t end = (size_t)-1,
-
6749 _In_ int flags = match_default)
-
6750 {
-
6751 assert(text || start >= end);
-
6752 this->interval.end = start;
-
6753 if (name.match(text, this->interval.end, end, flags))
-
6754 this->interval.end = name.interval.end;
-
6755 else
-
6756 goto error;
-
6757 while (m_space.match(text, this->interval.end, end, flags))
-
6758 this->interval.end = m_space.interval.end;
-
6759 if (this->interval.end < end && text[this->interval.end] == '=')
-
6760 this->interval.end++;
-
6761 else
-
6762 goto error;
-
6763 while (m_space.match(text, this->interval.end, end, flags))
-
6764 this->interval.end = m_space.interval.end;
-
6765 if (value.match(text, this->interval.end, end, flags))
-
6766 this->interval.end = value.interval.end;
-
6767 else
-
6768 goto error;
-
6769 params.clear();
-
6770 for (;;) {
-
6771 if (this->interval.end < end && text[this->interval.end]) {
-
6772 if (m_space.match(text, this->interval.end, end, flags))
-
6773 this->interval.end = m_space.interval.end;
-
6774 else if (text[this->interval.end] == ';') {
-
6775 this->interval.end++;
-
6776 while (m_space.match(text, this->interval.end, end, flags))
-
6777 this->interval.end = m_space.interval.end;
- -
6779 if (param.match(text, this->interval.end, end, flags)) {
-
6780 this->interval.end = param.interval.end;
-
6781 params.push_back(std::move(param));
-
6782 }
-
6783 else
-
6784 break;
-
6785 }
-
6786 else
-
6787 break;
-
6788 }
-
6789 else
-
6790 break;
-
6791 }
-
6792 this->interval.start = start;
-
6793 this->interval.end = params.empty() ? value.interval.end : params.back().interval.end;
-
6794 return true;
-
6795
-
6796 error:
-
6797 name.invalidate();
-
6798 value.invalidate();
-
6799 params.clear();
-
6800 this->interval.start = (this->interval.end = start) + 1;
-
6801 return false;
-
6802 }
+
6739 public:
+
6740 http_token name;
+
6741 http_value value;
+
6742
+
6743 protected:
+
6744 http_space m_space;
+
6745 };
+
+
6746
+
+
6750 class http_cookie : public parser
+
6751 {
+
6752 public:
+
6753 virtual bool match(
+
6754 _In_reads_or_z_(end) const char* text,
+
6755 _In_ size_t start = 0,
+
6756 _In_ size_t end = (size_t)-1,
+
6757 _In_ int flags = match_default)
+
6758 {
+
6759 assert(text || start >= end);
+
6760 this->interval.end = start;
+
6761 if (name.match(text, this->interval.end, end, flags))
+
6762 this->interval.end = name.interval.end;
+
6763 else
+
6764 goto error;
+
6765 while (m_space.match(text, this->interval.end, end, flags))
+
6766 this->interval.end = m_space.interval.end;
+
6767 if (this->interval.end < end && text[this->interval.end] == '=')
+
6768 this->interval.end++;
+
6769 else
+
6770 goto error;
+
6771 while (m_space.match(text, this->interval.end, end, flags))
+
6772 this->interval.end = m_space.interval.end;
+
6773 if (value.match(text, this->interval.end, end, flags))
+
6774 this->interval.end = value.interval.end;
+
6775 else
+
6776 goto error;
+
6777 params.clear();
+
6778 for (;;) {
+
6779 if (this->interval.end < end && text[this->interval.end]) {
+
6780 if (m_space.match(text, this->interval.end, end, flags))
+
6781 this->interval.end = m_space.interval.end;
+
6782 else if (text[this->interval.end] == ';') {
+
6783 this->interval.end++;
+
6784 while (m_space.match(text, this->interval.end, end, flags))
+
6785 this->interval.end = m_space.interval.end;
+ +
6787 if (param.match(text, this->interval.end, end, flags)) {
+
6788 this->interval.end = param.interval.end;
+
6789 params.push_back(std::move(param));
+
6790 }
+
6791 else
+
6792 break;
+
6793 }
+
6794 else
+
6795 break;
+
6796 }
+
6797 else
+
6798 break;
+
6799 }
+
6800 this->interval.start = start;
+
6801 this->interval.end = params.empty() ? value.interval.end : params.back().interval.end;
+
6802 return true;
6803
-
6804 virtual void invalidate()
-
6805 {
-
6806 name.invalidate();
-
6807 value.invalidate();
-
6808 params.clear();
-
6809 parser::invalidate();
+
6804 error:
+
6805 name.invalidate();
+
6806 value.invalidate();
+
6807 params.clear();
+
6808 this->interval.start = (this->interval.end = start) + 1;
+
6809 return false;
6810 }
6811
-
6812 public:
- - -
6815 std::list<http_cookie_parameter> params;
-
6816
-
6817 protected:
-
6818 http_space m_space;
-
6819 };
+
6812 virtual void invalidate()
+
6813 {
+
6814 name.invalidate();
+
6815 value.invalidate();
+
6816 params.clear();
+
6817 parser::invalidate();
+
6818 }
+
6819
+
6820 public:
+ + +
6823 std::list<http_cookie_parameter> params;
+
6824
+
6825 protected:
+
6826 http_space m_space;
+
6827 };
-
6820
-
-
6824 class http_agent : public parser
-
6825 {
-
6826 public:
-
6827 virtual bool match(
-
6828 _In_reads_or_z_(end) const char* text,
-
6829 _In_ size_t start = 0,
-
6830 _In_ size_t end = (size_t)-1,
-
6831 _In_ int flags = match_default)
-
6832 {
-
6833 assert(text || start >= end);
-
6834 this->interval.end = start;
-
6835 type.start = this->interval.end;
-
6836 for (;;) {
-
6837 if (this->interval.end < end && text[this->interval.end]) {
-
6838 if (text[this->interval.end] == '/') {
-
6839 type.end = this->interval.end;
-
6840 this->interval.end++;
-
6841 version.start = this->interval.end;
-
6842 for (;;) {
-
6843 if (this->interval.end < end && text[this->interval.end]) {
-
6844 if (isspace(text[this->interval.end])) {
-
6845 version.end = this->interval.end;
-
6846 break;
-
6847 }
-
6848 else
-
6849 this->interval.end++;
-
6850 }
-
6851 else {
-
6852 version.end = this->interval.end;
-
6853 break;
-
6854 }
-
6855 }
-
6856 break;
-
6857 }
-
6858 else if (isspace(text[this->interval.end])) {
-
6859 type.end = this->interval.end;
-
6860 break;
-
6861 }
-
6862 else
-
6863 this->interval.end++;
-
6864 }
-
6865 else {
-
6866 type.end = this->interval.end;
-
6867 break;
-
6868 }
-
6869 }
- -
6871 this->interval.start = start;
-
6872 return true;
-
6873 }
-
6874 type.start = 1;
-
6875 type.end = 0;
-
6876 version.start = 1;
-
6877 version.end = 0;
-
6878 this->interval.start = 1;
-
6879 this->interval.end = 0;
-
6880 return false;
-
6881 }
-
6882
-
6883 virtual void invalidate()
-
6884 {
-
6885 type.start = 1;
-
6886 type.end = 0;
-
6887 version.start = 1;
-
6888 version.end = 0;
-
6889 parser::invalidate();
-
6890 }
-
6891
-
6892 public:
- - -
6895 };
+
6828
+
+
6832 class http_agent : public parser
+
6833 {
+
6834 public:
+
6835 virtual bool match(
+
6836 _In_reads_or_z_(end) const char* text,
+
6837 _In_ size_t start = 0,
+
6838 _In_ size_t end = (size_t)-1,
+
6839 _In_ int flags = match_default)
+
6840 {
+
6841 assert(text || start >= end);
+
6842 this->interval.end = start;
+
6843 type.start = this->interval.end;
+
6844 for (;;) {
+
6845 if (this->interval.end < end && text[this->interval.end]) {
+
6846 if (text[this->interval.end] == '/') {
+
6847 type.end = this->interval.end;
+
6848 this->interval.end++;
+
6849 version.start = this->interval.end;
+
6850 for (;;) {
+
6851 if (this->interval.end < end && text[this->interval.end]) {
+
6852 if (isspace(text[this->interval.end])) {
+
6853 version.end = this->interval.end;
+
6854 break;
+
6855 }
+
6856 else
+
6857 this->interval.end++;
+
6858 }
+
6859 else {
+
6860 version.end = this->interval.end;
+
6861 break;
+
6862 }
+
6863 }
+
6864 break;
+
6865 }
+
6866 else if (isspace(text[this->interval.end])) {
+
6867 type.end = this->interval.end;
+
6868 break;
+
6869 }
+
6870 else
+
6871 this->interval.end++;
+
6872 }
+
6873 else {
+
6874 type.end = this->interval.end;
+
6875 break;
+
6876 }
+
6877 }
+ +
6879 this->interval.start = start;
+
6880 return true;
+
6881 }
+
6882 type.start = 1;
+
6883 type.end = 0;
+
6884 version.start = 1;
+
6885 version.end = 0;
+
6886 this->interval.start = 1;
+
6887 this->interval.end = 0;
+
6888 return false;
+
6889 }
+
6890
+
6891 virtual void invalidate()
+
6892 {
+
6893 type.start = 1;
+
6894 type.end = 0;
+
6895 version.start = 1;
+
6896 version.end = 0;
+
6897 parser::invalidate();
+
6898 }
+
6899
+
6900 public:
+ + +
6903 };
-
6896
-
-
6900 class http_protocol : public parser
-
6901 {
-
6902 public:
-
6903 http_protocol(_In_ const std::locale& locale = std::locale()) :
-
6904 parser(locale),
-
6905 version(0x009)
-
6906 {}
-
6907
-
6908 virtual bool match(
-
6909 _In_reads_or_z_(end) const char* text,
-
6910 _In_ size_t start = 0,
-
6911 _In_ size_t end = (size_t)-1,
-
6912 _In_ int flags = match_default)
-
6913 {
-
6914 assert(text || start >= end);
-
6915 this->interval.end = start;
-
6916 type.start = this->interval.end;
-
6917 for (;;) {
-
6918 if (this->interval.end < end && text[this->interval.end]) {
-
6919 if (text[this->interval.end] == '/') {
-
6920 type.end = this->interval.end;
-
6921 this->interval.end++;
-
6922 break;
-
6923 }
-
6924 else if (isspace(text[this->interval.end]))
-
6925 goto error;
-
6926 else
-
6927 this->interval.end++;
-
6928 }
-
6929 else {
-
6930 type.end = this->interval.end;
-
6931 goto error;
-
6932 }
-
6933 }
-
6934 version_maj.start = this->interval.end;
-
6935 for (;;) {
-
6936 if (this->interval.end < end && text[this->interval.end]) {
-
6937 if (text[this->interval.end] == '.') {
-
6938 version_maj.end = this->interval.end;
-
6939 this->interval.end++;
-
6940 version_min.start = this->interval.end;
-
6941 for (;;) {
-
6942 if (this->interval.end < end && text[this->interval.end]) {
-
6943 if (isspace(text[this->interval.end])) {
-
6944 version_min.end = this->interval.end;
-
6945 version =
-
6946 (uint16_t)strtoui(text + version_maj.start, version_maj.size(), nullptr, 10) * 0x100 +
-
6947 (uint16_t)strtoui(text + version_min.start, version_min.size(), nullptr, 10);
-
6948 break;
-
6949 }
-
6950 else
-
6951 this->interval.end++;
-
6952 }
-
6953 else
-
6954 goto error;
-
6955 }
-
6956 break;
-
6957 }
-
6958 else if (isspace(text[this->interval.end])) {
-
6959 version_maj.end = this->interval.end;
-
6960 version_min.start = 1;
-
6961 version_min.end = 0;
-
6962 version = (uint16_t)strtoui(text + version_maj.start, version_maj.size(), nullptr, 10) * 0x100;
-
6963 break;
-
6964 }
-
6965 else
-
6966 this->interval.end++;
-
6967 }
-
6968 else
-
6969 goto error;
-
6970 }
-
6971 this->interval.start = start;
-
6972 return true;
-
6973
-
6974 error:
-
6975 type.start = 1;
-
6976 type.end = 0;
-
6977 version_maj.start = 1;
-
6978 version_maj.end = 0;
-
6979 version_min.start = 1;
-
6980 version_min.end = 0;
-
6981 version = 0x009;
-
6982 this->interval.start = 1;
-
6983 this->interval.end = 0;
-
6984 return false;
-
6985 }
-
6986
-
6987 virtual void invalidate()
-
6988 {
-
6989 type.start = 1;
-
6990 type.end = 0;
-
6991 version_maj.start = 1;
-
6992 version_maj.end = 0;
-
6993 version_min.start = 1;
-
6994 version_min.end = 0;
-
6995 version = 0x009;
-
6996 parser::invalidate();
-
6997 }
-
6998
-
6999 public:
- -
7001 stdex::interval<size_t> version_maj;
-
7002 stdex::interval<size_t> version_min;
- -
7004 };
+
6904
+
+
6908 class http_protocol : public parser
+
6909 {
+
6910 public:
+
6911 http_protocol(_In_ const std::locale& locale = std::locale()) :
+
6912 parser(locale),
+
6913 version(0x009)
+
6914 {}
+
6915
+
6916 virtual bool match(
+
6917 _In_reads_or_z_(end) const char* text,
+
6918 _In_ size_t start = 0,
+
6919 _In_ size_t end = (size_t)-1,
+
6920 _In_ int flags = match_default)
+
6921 {
+
6922 assert(text || start >= end);
+
6923 this->interval.end = start;
+
6924 type.start = this->interval.end;
+
6925 for (;;) {
+
6926 if (this->interval.end < end && text[this->interval.end]) {
+
6927 if (text[this->interval.end] == '/') {
+
6928 type.end = this->interval.end;
+
6929 this->interval.end++;
+
6930 break;
+
6931 }
+
6932 else if (isspace(text[this->interval.end]))
+
6933 goto error;
+
6934 else
+
6935 this->interval.end++;
+
6936 }
+
6937 else {
+
6938 type.end = this->interval.end;
+
6939 goto error;
+
6940 }
+
6941 }
+
6942 version_maj.start = this->interval.end;
+
6943 for (;;) {
+
6944 if (this->interval.end < end && text[this->interval.end]) {
+
6945 if (text[this->interval.end] == '.') {
+
6946 version_maj.end = this->interval.end;
+
6947 this->interval.end++;
+
6948 version_min.start = this->interval.end;
+
6949 for (;;) {
+
6950 if (this->interval.end < end && text[this->interval.end]) {
+
6951 if (isspace(text[this->interval.end])) {
+
6952 version_min.end = this->interval.end;
+
6953 version =
+
6954 (uint16_t)strtoui(text + version_maj.start, version_maj.size(), nullptr, 10) * 0x100 +
+
6955 (uint16_t)strtoui(text + version_min.start, version_min.size(), nullptr, 10);
+
6956 break;
+
6957 }
+
6958 else
+
6959 this->interval.end++;
+
6960 }
+
6961 else
+
6962 goto error;
+
6963 }
+
6964 break;
+
6965 }
+
6966 else if (isspace(text[this->interval.end])) {
+
6967 version_maj.end = this->interval.end;
+
6968 version_min.start = 1;
+
6969 version_min.end = 0;
+
6970 version = (uint16_t)strtoui(text + version_maj.start, version_maj.size(), nullptr, 10) * 0x100;
+
6971 break;
+
6972 }
+
6973 else
+
6974 this->interval.end++;
+
6975 }
+
6976 else
+
6977 goto error;
+
6978 }
+
6979 this->interval.start = start;
+
6980 return true;
+
6981
+
6982 error:
+
6983 type.start = 1;
+
6984 type.end = 0;
+
6985 version_maj.start = 1;
+
6986 version_maj.end = 0;
+
6987 version_min.start = 1;
+
6988 version_min.end = 0;
+
6989 version = 0x009;
+
6990 this->interval.start = 1;
+
6991 this->interval.end = 0;
+
6992 return false;
+
6993 }
+
6994
+
6995 virtual void invalidate()
+
6996 {
+
6997 type.start = 1;
+
6998 type.end = 0;
+
6999 version_maj.start = 1;
+
7000 version_maj.end = 0;
+
7001 version_min.start = 1;
+
7002 version_min.end = 0;
+
7003 version = 0x009;
+
7004 parser::invalidate();
+
7005 }
+
7006
+
7007 public:
+ +
7009 stdex::interval<size_t> version_maj;
+
7010 stdex::interval<size_t> version_min;
+ +
7012 };
-
7005
-
-
7009 class http_request : public parser
-
7010 {
-
7011 public:
-
7012 http_request(_In_ const std::locale& locale = std::locale()) :
-
7013 parser(locale),
-
7014 url(locale),
-
7015 protocol(locale)
-
7016 {}
-
7017
-
7018 virtual bool match(
-
7019 _In_reads_or_z_(end) const char* text,
-
7020 _In_ size_t start = 0,
-
7021 _In_ size_t end = (size_t)-1,
-
7022 _In_ int flags = match_default)
-
7023 {
-
7024 assert(text || start >= end);
-
7025 this->interval.end = start;
-
7026
-
7027 for (;;) {
-
7028 if (m_line_break.match(text, this->interval.end, end, flags))
-
7029 goto error;
-
7030 else if (this->interval.end < end && text[this->interval.end]) {
-
7031 if (isspace(text[this->interval.end]))
-
7032 this->interval.end++;
-
7033 else
-
7034 break;
-
7035 }
-
7036 else
+
7013
+
+
7017 class http_request : public parser
+
7018 {
+
7019 public:
+
7020 http_request(_In_ const std::locale& locale = std::locale()) :
+
7021 parser(locale),
+
7022 url(locale),
+
7023 protocol(locale)
+
7024 {}
+
7025
+
7026 virtual bool match(
+
7027 _In_reads_or_z_(end) const char* text,
+
7028 _In_ size_t start = 0,
+
7029 _In_ size_t end = (size_t)-1,
+
7030 _In_ int flags = match_default)
+
7031 {
+
7032 assert(text || start >= end);
+
7033 this->interval.end = start;
+
7034
+
7035 for (;;) {
+
7036 if (m_line_break.match(text, this->interval.end, end, flags))
7037 goto error;
-
7038 }
-
7039 verb.start = this->interval.end;
-
7040 for (;;) {
-
7041 if (m_line_break.match(text, this->interval.end, end, flags))
-
7042 goto error;
-
7043 else if (this->interval.end < end && text[this->interval.end]) {
-
7044 if (isspace(text[this->interval.end])) {
-
7045 verb.end = this->interval.end;
-
7046 this->interval.end++;
-
7047 break;
-
7048 }
-
7049 else
-
7050 this->interval.end++;
-
7051 }
-
7052 else
-
7053 goto error;
-
7054 }
-
7055
-
7056 for (;;) {
-
7057 if (m_line_break.match(text, this->interval.end, end, flags))
-
7058 goto error;
-
7059 else if (this->interval.end < end && text[this->interval.end]) {
-
7060 if (isspace(text[this->interval.end]))
-
7061 this->interval.end++;
-
7062 else
-
7063 break;
-
7064 }
-
7065 else
+
7038 else if (this->interval.end < end && text[this->interval.end]) {
+
7039 if (isspace(text[this->interval.end]))
+
7040 this->interval.end++;
+
7041 else
+
7042 break;
+
7043 }
+
7044 else
+
7045 goto error;
+
7046 }
+
7047 verb.start = this->interval.end;
+
7048 for (;;) {
+
7049 if (m_line_break.match(text, this->interval.end, end, flags))
+
7050 goto error;
+
7051 else if (this->interval.end < end && text[this->interval.end]) {
+
7052 if (isspace(text[this->interval.end])) {
+
7053 verb.end = this->interval.end;
+
7054 this->interval.end++;
+
7055 break;
+
7056 }
+
7057 else
+
7058 this->interval.end++;
+
7059 }
+
7060 else
+
7061 goto error;
+
7062 }
+
7063
+
7064 for (;;) {
+
7065 if (m_line_break.match(text, this->interval.end, end, flags))
7066 goto error;
-
7067 }
-
7068 if (url.match(text, this->interval.end, end, flags))
-
7069 this->interval.end = url.interval.end;
-
7070 else
-
7071 goto error;
-
7072
-
7073 protocol.invalidate();
-
7074 for (;;) {
-
7075 if (m_line_break.match(text, this->interval.end, end, flags)) {
-
7076 this->interval.end = m_line_break.interval.end;
-
7077 goto end;
-
7078 }
-
7079 else if (this->interval.end < end && text[this->interval.end]) {
-
7080 if (isspace(text[this->interval.end]))
-
7081 this->interval.end++;
-
7082 else
-
7083 break;
-
7084 }
-
7085 else
-
7086 goto end;
-
7087 }
-
7088 for (;;) {
-
7089 if (m_line_break.match(text, this->interval.end, end, flags)) {
-
7090 this->interval.end = m_line_break.interval.end;
-
7091 goto end;
+
7067 else if (this->interval.end < end && text[this->interval.end]) {
+
7068 if (isspace(text[this->interval.end]))
+
7069 this->interval.end++;
+
7070 else
+
7071 break;
+
7072 }
+
7073 else
+
7074 goto error;
+
7075 }
+
7076 if (url.match(text, this->interval.end, end, flags))
+
7077 this->interval.end = url.interval.end;
+
7078 else
+
7079 goto error;
+
7080
+
7081 protocol.invalidate();
+
7082 for (;;) {
+
7083 if (m_line_break.match(text, this->interval.end, end, flags)) {
+
7084 this->interval.end = m_line_break.interval.end;
+
7085 goto end;
+
7086 }
+
7087 else if (this->interval.end < end && text[this->interval.end]) {
+
7088 if (isspace(text[this->interval.end]))
+
7089 this->interval.end++;
+
7090 else
+
7091 break;
7092 }
-
7093 else if (protocol.match(text, this->interval.end, end, flags)) {
-
7094 this->interval.end = protocol.interval.end;
-
7095 break;
-
7096 }
-
7097 else
-
7098 goto end;
-
7099 }
-
7100
-
7101 for (;;) {
-
7102 if (m_line_break.match(text, this->interval.end, end, flags)) {
-
7103 this->interval.end = m_line_break.interval.end;
-
7104 break;
-
7105 }
-
7106 else if (this->interval.end < end && text[this->interval.end])
-
7107 this->interval.end++;
-
7108 else
-
7109 goto end;
-
7110 }
-
7111
-
7112 end:
-
7113 this->interval.start = start;
-
7114 return true;
-
7115
-
7116 error:
-
7117 verb.start = 1;
-
7118 verb.end = 0;
-
7119 url.invalidate();
-
7120 protocol.invalidate();
-
7121 this->interval.start = 1;
-
7122 this->interval.end = 0;
-
7123 return false;
-
7124 }
-
7125
-
7126 virtual void invalidate()
-
7127 {
-
7128 verb.start = 1;
-
7129 verb.end = 0;
-
7130 url.invalidate();
-
7131 protocol.invalidate();
-
7132 parser::invalidate();
-
7133 }
-
7134
-
7135 public:
- -
7137 http_url url;
-
7138 http_protocol protocol;
-
7139
-
7140 protected:
-
7141 http_line_break m_line_break;
-
7142 };
+
7093 else
+
7094 goto end;
+
7095 }
+
7096 for (;;) {
+
7097 if (m_line_break.match(text, this->interval.end, end, flags)) {
+
7098 this->interval.end = m_line_break.interval.end;
+
7099 goto end;
+
7100 }
+
7101 else if (protocol.match(text, this->interval.end, end, flags)) {
+
7102 this->interval.end = protocol.interval.end;
+
7103 break;
+
7104 }
+
7105 else
+
7106 goto end;
+
7107 }
+
7108
+
7109 for (;;) {
+
7110 if (m_line_break.match(text, this->interval.end, end, flags)) {
+
7111 this->interval.end = m_line_break.interval.end;
+
7112 break;
+
7113 }
+
7114 else if (this->interval.end < end && text[this->interval.end])
+
7115 this->interval.end++;
+
7116 else
+
7117 goto end;
+
7118 }
+
7119
+
7120 end:
+
7121 this->interval.start = start;
+
7122 return true;
+
7123
+
7124 error:
+
7125 verb.start = 1;
+
7126 verb.end = 0;
+
7127 url.invalidate();
+
7128 protocol.invalidate();
+
7129 this->interval.start = 1;
+
7130 this->interval.end = 0;
+
7131 return false;
+
7132 }
+
7133
+
7134 virtual void invalidate()
+
7135 {
+
7136 verb.start = 1;
+
7137 verb.end = 0;
+
7138 url.invalidate();
+
7139 protocol.invalidate();
+
7140 parser::invalidate();
+
7141 }
+
7142
+
7143 public:
+ +
7145 http_url url;
+
7146 http_protocol protocol;
+
7147
+
7148 protected:
+
7149 http_line_break m_line_break;
+
7150 };
-
7143
-
-
7147 class http_header : public parser
-
7148 {
-
7149 public:
-
7150 virtual bool match(
-
7151 _In_reads_or_z_(end) const char* text,
-
7152 _In_ size_t start = 0,
-
7153 _In_ size_t end = (size_t)-1,
-
7154 _In_ int flags = match_default)
-
7155 {
-
7156 assert(text || start >= end);
-
7157 this->interval.end = start;
-
7158
-
7159 if (m_line_break.match(text, this->interval.end, end, flags) ||
-
7160 (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])))
-
7161 goto error;
-
7162 name.start = this->interval.end;
-
7163 for (;;) {
-
7164 if (m_line_break.match(text, this->interval.end, end, flags))
-
7165 goto error;
-
7166 else if (this->interval.end < end && text[this->interval.end]) {
-
7167 if (isspace(text[this->interval.end])) {
-
7168 name.end = this->interval.end;
-
7169 this->interval.end++;
-
7170 for (;;) {
-
7171 if (m_line_break.match(text, this->interval.end, end, flags))
-
7172 goto error;
-
7173 else if (this->interval.end < end && text[this->interval.end]) {
-
7174 if (isspace(text[this->interval.end]))
-
7175 this->interval.end++;
-
7176 else
-
7177 break;
-
7178 }
-
7179 else
+
7151
+
+
7155 class http_header : public parser
+
7156 {
+
7157 public:
+
7158 virtual bool match(
+
7159 _In_reads_or_z_(end) const char* text,
+
7160 _In_ size_t start = 0,
+
7161 _In_ size_t end = (size_t)-1,
+
7162 _In_ int flags = match_default)
+
7163 {
+
7164 assert(text || start >= end);
+
7165 this->interval.end = start;
+
7166
+
7167 if (m_line_break.match(text, this->interval.end, end, flags) ||
+
7168 (this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end])))
+
7169 goto error;
+
7170 name.start = this->interval.end;
+
7171 for (;;) {
+
7172 if (m_line_break.match(text, this->interval.end, end, flags))
+
7173 goto error;
+
7174 else if (this->interval.end < end && text[this->interval.end]) {
+
7175 if (isspace(text[this->interval.end])) {
+
7176 name.end = this->interval.end;
+
7177 this->interval.end++;
+
7178 for (;;) {
+
7179 if (m_line_break.match(text, this->interval.end, end, flags))
7180 goto error;
-
7181 }
-
7182 if (this->interval.end < end && text[this->interval.end] == ':') {
-
7183 this->interval.end++;
-
7184 break;
-
7185 }
-
7186 else
-
7187 goto error;
-
7188 break;
-
7189 }
-
7190 else if (text[this->interval.end] == ':') {
-
7191 name.end = this->interval.end;
-
7192 this->interval.end++;
-
7193 break;
-
7194 }
-
7195 else
-
7196 this->interval.end++;
-
7197 }
-
7198 else
-
7199 goto error;
-
7200 }
-
7201 value.start = (size_t)-1;
-
7202 value.end = 0;
-
7203 for (;;) {
-
7204 if (m_line_break.match(text, this->interval.end, end, flags)) {
-
7205 this->interval.end = m_line_break.interval.end;
-
7206 if (!m_line_break.match(text, this->interval.end, end, flags) &&
-
7207 this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end]))
-
7208 this->interval.end++;
-
7209 else
-
7210 break;
-
7211 }
-
7212 else if (this->interval.end < end && text[this->interval.end]) {
-
7213 if (isspace(text[this->interval.end]))
-
7214 this->interval.end++;
-
7215 else {
-
7216 if (value.start == (size_t)-1) value.start = this->interval.end;
-
7217 value.end = ++this->interval.end;
-
7218 }
+
7181 else if (this->interval.end < end && text[this->interval.end]) {
+
7182 if (isspace(text[this->interval.end]))
+
7183 this->interval.end++;
+
7184 else
+
7185 break;
+
7186 }
+
7187 else
+
7188 goto error;
+
7189 }
+
7190 if (this->interval.end < end && text[this->interval.end] == ':') {
+
7191 this->interval.end++;
+
7192 break;
+
7193 }
+
7194 else
+
7195 goto error;
+
7196 break;
+
7197 }
+
7198 else if (text[this->interval.end] == ':') {
+
7199 name.end = this->interval.end;
+
7200 this->interval.end++;
+
7201 break;
+
7202 }
+
7203 else
+
7204 this->interval.end++;
+
7205 }
+
7206 else
+
7207 goto error;
+
7208 }
+
7209 value.start = (size_t)-1;
+
7210 value.end = 0;
+
7211 for (;;) {
+
7212 if (m_line_break.match(text, this->interval.end, end, flags)) {
+
7213 this->interval.end = m_line_break.interval.end;
+
7214 if (!m_line_break.match(text, this->interval.end, end, flags) &&
+
7215 this->interval.end < end && text[this->interval.end] && isspace(text[this->interval.end]))
+
7216 this->interval.end++;
+
7217 else
+
7218 break;
7219 }
-
7220 else
-
7221 break;
-
7222 }
-
7223 this->interval.start = start;
-
7224 return true;
-
7225
-
7226 error:
-
7227 name.start = 1;
-
7228 name.end = 0;
-
7229 value.start = 1;
-
7230 value.end = 0;
-
7231 this->interval.start = 1;
-
7232 this->interval.end = 0;
-
7233 return false;
-
7234 }
-
7235
-
7236 virtual void invalidate()
-
7237 {
-
7238 name.start = 1;
-
7239 name.end = 0;
-
7240 value.start = 1;
-
7241 value.end = 0;
-
7242 parser::invalidate();
-
7243 }
-
7244
-
7245 public:
- - -
7248
-
7249 protected:
-
7250 http_line_break m_line_break;
-
7251 };
-
+
7220 else if (this->interval.end < end && text[this->interval.end]) {
+
7221 if (isspace(text[this->interval.end]))
+
7222 this->interval.end++;
+
7223 else {
+
7224 if (value.start == (size_t)-1) value.start = this->interval.end;
+
7225 value.end = ++this->interval.end;
+
7226 }
+
7227 }
+
7228 else
+
7229 break;
+
7230 }
+
7231 this->interval.start = start;
+
7232 return true;
+
7233
+
7234 error:
+
7235 name.start = 1;
+
7236 name.end = 0;
+
7237 value.start = 1;
+
7238 value.end = 0;
+
7239 this->interval.start = 1;
+
7240 this->interval.end = 0;
+
7241 return false;
+
7242 }
+
7243
+
7244 virtual void invalidate()
+
7245 {
+
7246 name.start = 1;
+
7247 name.end = 0;
+
7248 value.start = 1;
+
7249 value.end = 0;
+
7250 parser::invalidate();
+
7251 }
7252
-
7256 template <class _Key, class T>
-
-
7257 class http_value_collection : public T
-
7258 {
-
7259 public:
-
7260 void insert(
-
7261 _In_reads_or_z_(end) const char* text,
-
7262 _In_ size_t start = 0,
-
7263 _In_ size_t end = (size_t)-1,
-
7264 _In_ int flags = match_default)
-
7265 {
-
7266 while (start < end) {
-
7267 while (start < end && text[start] && isspace(text[start])) start++;
-
7268 if (start < end && text[start] == ',') {
-
7269 start++;
-
7270 while (start < end&& text[start] && isspace(text[start])) start++;
-
7271 }
-
7272 _Key el;
-
7273 if (el.match(text, start, end, flags)) {
-
7274 start = el.interval.end;
-
7275 T::insert(std::move(el));
-
7276 }
-
7277 else
-
7278 break;
-
7279 }
-
7280 }
-
7281 };
+
7253 public:
+ + +
7256
+
7257 protected:
+
7258 http_line_break m_line_break;
+
7259 };
-
7282
-
7283 template <class T>
-
- -
7285 constexpr bool operator()(const T& a, const T& b) const noexcept
-
7286 {
-
7287 return a.factor.value > b.factor.value;
+
7260
+
7264 template <class _Key, class T>
+
+
7265 class http_value_collection : public T
+
7266 {
+
7267 public:
+
7268 void insert(
+
7269 _In_reads_or_z_(end) const char* text,
+
7270 _In_ size_t start = 0,
+
7271 _In_ size_t end = (size_t)-1,
+
7272 _In_ int flags = match_default)
+
7273 {
+
7274 while (start < end) {
+
7275 while (start < end && text[start] && isspace(text[start])) start++;
+
7276 if (start < end && text[start] == ',') {
+
7277 start++;
+
7278 while (start < end&& text[start] && isspace(text[start])) start++;
+
7279 }
+
7280 _Key el;
+
7281 if (el.match(text, start, end, flags)) {
+
7282 start = el.interval.end;
+
7283 T::insert(std::move(el));
+
7284 }
+
7285 else
+
7286 break;
+
7287 }
7288 }
7289 };
7290
-
7294 template <class T, class _Alloc = std::allocator<T>>
- -
7296
-
7300 template <class T>
-
- -
7302 {
-
7303 public:
- -
7305 _In_ const std::shared_ptr<basic_parser<T>>& quote,
-
7306 _In_ const std::shared_ptr<basic_parser<T>>& chr,
-
7307 _In_ const std::shared_ptr<basic_parser<T>>& escape,
-
7308 _In_ const std::shared_ptr<basic_parser<T>>& sol,
-
7309 _In_ const std::shared_ptr<basic_parser<T>>& bs,
-
7310 _In_ const std::shared_ptr<basic_parser<T>>& ff,
-
7311 _In_ const std::shared_ptr<basic_parser<T>>& lf,
-
7312 _In_ const std::shared_ptr<basic_parser<T>>& cr,
-
7313 _In_ const std::shared_ptr<basic_parser<T>>& htab,
-
7314 _In_ const std::shared_ptr<basic_parser<T>>& uni,
-
7315 _In_ const std::shared_ptr<basic_integer16<T>>& hex,
-
7316 _In_ const std::locale& locale = std::locale()) :
-
7317 basic_parser<T>(locale),
-
7318 m_quote(quote),
-
7319 m_chr(chr),
-
7320 m_escape(escape),
-
7321 m_sol(sol),
-
7322 m_bs(bs),
-
7323 m_ff(ff),
-
7324 m_lf(lf),
-
7325 m_cr(cr),
-
7326 m_htab(htab),
-
7327 m_uni(uni),
-
7328 m_hex(hex)
-
7329 {}
-
7330
-
7331 virtual bool match(
-
7332 _In_reads_or_z_(end) const T* text,
-
7333 _In_ size_t start = 0,
-
7334 _In_ size_t end = (size_t)-1,
-
7335 _In_ int flags = match_default)
-
7336 {
-
7337 assert(text || start >= end);
-
7338 this->interval.end = start;
-
7339 if (m_quote->match(text, this->interval.end, end, flags)) {
-
7340 this->interval.end = m_quote->interval.end;
-
7341 value.clear();
-
7342 for (;;) {
-
7343 if (m_quote->match(text, this->interval.end, end, flags)) {
-
7344 this->interval.start = start;
-
7345 this->interval.end = m_quote->interval.end;
-
7346 return true;
-
7347 }
-
7348 if (m_escape->match(text, this->interval.end, end, flags)) {
-
7349 if (m_quote->match(text, m_escape->interval.end, end, flags)) {
-
7350 value += '"'; this->interval.end = m_quote->interval.end;
-
7351 continue;
-
7352 }
-
7353 if (m_sol->match(text, m_escape->interval.end, end, flags)) {
-
7354 value += '/'; this->interval.end = m_sol->interval.end;
-
7355 continue;
-
7356 }
-
7357 if (m_bs->match(text, m_escape->interval.end, end, flags)) {
-
7358 value += '\b'; this->interval.end = m_bs->interval.end;
+
7291 template <class T>
+
+ +
7293 constexpr bool operator()(const T& a, const T& b) const noexcept
+
7294 {
+
7295 return a.factor.value > b.factor.value;
+
7296 }
+
7297 };
+
+
7298
+
7302 template <class T, class _Alloc = std::allocator<T>>
+ +
7304
+
7308 template <class T>
+
+ +
7310 {
+
7311 public:
+ +
7313 _In_ const std::shared_ptr<basic_parser<T>>& quote,
+
7314 _In_ const std::shared_ptr<basic_parser<T>>& chr,
+
7315 _In_ const std::shared_ptr<basic_parser<T>>& escape,
+
7316 _In_ const std::shared_ptr<basic_parser<T>>& sol,
+
7317 _In_ const std::shared_ptr<basic_parser<T>>& bs,
+
7318 _In_ const std::shared_ptr<basic_parser<T>>& ff,
+
7319 _In_ const std::shared_ptr<basic_parser<T>>& lf,
+
7320 _In_ const std::shared_ptr<basic_parser<T>>& cr,
+
7321 _In_ const std::shared_ptr<basic_parser<T>>& htab,
+
7322 _In_ const std::shared_ptr<basic_parser<T>>& uni,
+
7323 _In_ const std::shared_ptr<basic_integer16<T>>& hex,
+
7324 _In_ const std::locale& locale = std::locale()) :
+
7325 basic_parser<T>(locale),
+
7326 m_quote(quote),
+
7327 m_chr(chr),
+
7328 m_escape(escape),
+
7329 m_sol(sol),
+
7330 m_bs(bs),
+
7331 m_ff(ff),
+
7332 m_lf(lf),
+
7333 m_cr(cr),
+
7334 m_htab(htab),
+
7335 m_uni(uni),
+
7336 m_hex(hex)
+
7337 {}
+
7338
+
7339 virtual bool match(
+
7340 _In_reads_or_z_(end) const T* text,
+
7341 _In_ size_t start = 0,
+
7342 _In_ size_t end = (size_t)-1,
+
7343 _In_ int flags = match_default)
+
7344 {
+
7345 assert(text || start >= end);
+
7346 this->interval.end = start;
+
7347 if (m_quote->match(text, this->interval.end, end, flags)) {
+
7348 this->interval.end = m_quote->interval.end;
+
7349 value.clear();
+
7350 for (;;) {
+
7351 if (m_quote->match(text, this->interval.end, end, flags)) {
+
7352 this->interval.start = start;
+
7353 this->interval.end = m_quote->interval.end;
+
7354 return true;
+
7355 }
+
7356 if (m_escape->match(text, this->interval.end, end, flags)) {
+
7357 if (m_quote->match(text, m_escape->interval.end, end, flags)) {
+
7358 value += '"'; this->interval.end = m_quote->interval.end;
7359 continue;
7360 }
-
7361 if (m_ff->match(text, m_escape->interval.end, end, flags)) {
-
7362 value += '\f'; this->interval.end = m_ff->interval.end;
+
7361 if (m_sol->match(text, m_escape->interval.end, end, flags)) {
+
7362 value += '/'; this->interval.end = m_sol->interval.end;
7363 continue;
7364 }
-
7365 if (m_lf->match(text, m_escape->interval.end, end, flags)) {
-
7366 value += '\n'; this->interval.end = m_lf->interval.end;
+
7365 if (m_bs->match(text, m_escape->interval.end, end, flags)) {
+
7366 value += '\b'; this->interval.end = m_bs->interval.end;
7367 continue;
7368 }
-
7369 if (m_cr->match(text, m_escape->interval.end, end, flags)) {
-
7370 value += '\r'; this->interval.end = m_cr->interval.end;
+
7369 if (m_ff->match(text, m_escape->interval.end, end, flags)) {
+
7370 value += '\f'; this->interval.end = m_ff->interval.end;
7371 continue;
7372 }
-
7373 if (m_htab->match(text, m_escape->interval.end, end, flags)) {
-
7374 value += '\t'; this->interval.end = m_htab->interval.end;
+
7373 if (m_lf->match(text, m_escape->interval.end, end, flags)) {
+
7374 value += '\n'; this->interval.end = m_lf->interval.end;
7375 continue;
7376 }
-
7377 if (
-
7378 m_uni->match(text, m_escape->interval.end, end, flags) &&
-
7379 m_hex->match(text, m_uni->interval.end, std::min(m_uni->interval.end + 4, end), flags | match_case_insensitive) &&
-
7380 m_hex->interval.size() == 4 /* JSON requests 4-digit Unicode sequneces: \u.... */)
-
7381 {
-
7382 assert(m_hex->value <= 0xffff);
-
7383 if (sizeof(T) == 1) {
-
7384 if (m_hex->value > 0x7ff) {
-
7385 value += (T)(0xe0 | ((m_hex->value >> 12) & 0x0f));
-
7386 value += (T)(0x80 | ((m_hex->value >> 6) & 0x3f));
-
7387 value += (T)(0x80 | (m_hex->value & 0x3f));
-
7388 }
-
7389 else if (m_hex->value > 0x7f) {
-
7390 value += (T)(0xc0 | ((m_hex->value >> 6) & 0x1f));
-
7391 value += (T)(0x80 | (m_hex->value & 0x3f));
-
7392 }
-
7393 else
-
7394 value += (T)(m_hex->value & 0x7f);
-
7395 }
-
7396 else
-
7397 value += (T)m_hex->value;
-
7398 this->interval.end = m_hex->interval.end;
-
7399 continue;
-
7400 }
-
7401 if (m_escape->match(text, m_escape->interval.end, end, flags)) {
-
7402 value += '\\'; this->interval.end = m_escape->interval.end;
-
7403 continue;
-
7404 }
-
7405 }
-
7406 if (m_chr->match(text, this->interval.end, end, flags)) {
-
7407 value.Prilepi(text + m_chr->interval.start, m_chr->interval.size());
-
7408 this->interval.end = m_chr->interval.end;
-
7409 continue;
-
7410 }
-
7411 break;
-
7412 }
-
7413 }
-
7414 value.clear();
-
7415 this->interval.start = (this->interval.end = start) + 1;
-
7416 return false;
-
7417 }
-
7418
-
7419 virtual void invalidate()
-
7420 {
-
7421 value.clear();
- -
7423 }
-
7424
-
7425 public:
-
7426 std::basic_string<T> value;
-
7427
-
7428 protected:
-
7429 std::shared_ptr<basic_parser<T>> m_quote;
-
7430 std::shared_ptr<basic_parser<T>> m_chr;
-
7431 std::shared_ptr<basic_parser<T>> m_escape;
-
7432 std::shared_ptr<basic_parser<T>> m_sol;
-
7433 std::shared_ptr<basic_parser<T>> m_bs;
-
7434 std::shared_ptr<basic_parser<T>> m_ff;
-
7435 std::shared_ptr<basic_parser<T>> m_lf;
-
7436 std::shared_ptr<basic_parser<T>> m_cr;
-
7437 std::shared_ptr<basic_parser<T>> m_htab;
-
7438 std::shared_ptr<basic_parser<T>> m_uni;
-
7439 std::shared_ptr<basic_integer16<T>> m_hex;
-
7440 };
+
7377 if (m_cr->match(text, m_escape->interval.end, end, flags)) {
+
7378 value += '\r'; this->interval.end = m_cr->interval.end;
+
7379 continue;
+
7380 }
+
7381 if (m_htab->match(text, m_escape->interval.end, end, flags)) {
+
7382 value += '\t'; this->interval.end = m_htab->interval.end;
+
7383 continue;
+
7384 }
+
7385 if (
+
7386 m_uni->match(text, m_escape->interval.end, end, flags) &&
+
7387 m_hex->match(text, m_uni->interval.end, std::min(m_uni->interval.end + 4, end), flags | match_case_insensitive) &&
+
7388 m_hex->interval.size() == 4 /* JSON requests 4-digit Unicode sequneces: \u.... */)
+
7389 {
+
7390 assert(m_hex->value <= 0xffff);
+
7391 if (sizeof(T) == 1) {
+
7392 if (m_hex->value > 0x7ff) {
+
7393 value += (T)(0xe0 | ((m_hex->value >> 12) & 0x0f));
+
7394 value += (T)(0x80 | ((m_hex->value >> 6) & 0x3f));
+
7395 value += (T)(0x80 | (m_hex->value & 0x3f));
+
7396 }
+
7397 else if (m_hex->value > 0x7f) {
+
7398 value += (T)(0xc0 | ((m_hex->value >> 6) & 0x1f));
+
7399 value += (T)(0x80 | (m_hex->value & 0x3f));
+
7400 }
+
7401 else
+
7402 value += (T)(m_hex->value & 0x7f);
+
7403 }
+
7404 else
+
7405 value += (T)m_hex->value;
+
7406 this->interval.end = m_hex->interval.end;
+
7407 continue;
+
7408 }
+
7409 if (m_escape->match(text, m_escape->interval.end, end, flags)) {
+
7410 value += '\\'; this->interval.end = m_escape->interval.end;
+
7411 continue;
+
7412 }
+
7413 }
+
7414 if (m_chr->match(text, this->interval.end, end, flags)) {
+
7415 value.Prilepi(text + m_chr->interval.start, m_chr->interval.size());
+
7416 this->interval.end = m_chr->interval.end;
+
7417 continue;
+
7418 }
+
7419 break;
+
7420 }
+
7421 }
+
7422 value.clear();
+
7423 this->interval.start = (this->interval.end = start) + 1;
+
7424 return false;
+
7425 }
+
7426
+
7427 virtual void invalidate()
+
7428 {
+
7429 value.clear();
+ +
7431 }
+
7432
+
7433 public:
+
7434 std::basic_string<T> value;
+
7435
+
7436 protected:
+
7437 std::shared_ptr<basic_parser<T>> m_quote;
+
7438 std::shared_ptr<basic_parser<T>> m_chr;
+
7439 std::shared_ptr<basic_parser<T>> m_escape;
+
7440 std::shared_ptr<basic_parser<T>> m_sol;
+
7441 std::shared_ptr<basic_parser<T>> m_bs;
+
7442 std::shared_ptr<basic_parser<T>> m_ff;
+
7443 std::shared_ptr<basic_parser<T>> m_lf;
+
7444 std::shared_ptr<basic_parser<T>> m_cr;
+
7445 std::shared_ptr<basic_parser<T>> m_htab;
+
7446 std::shared_ptr<basic_parser<T>> m_uni;
+
7447 std::shared_ptr<basic_integer16<T>> m_hex;
+
7448 };
-
7441
- - -
7444#ifdef _UNICODE
-
7445 using tjson_string = wjson_string;
-
7446#else
-
7447 using tjson_string = json_string;
-
7448#endif
-
7449 }
-
7450}
-
7451
-
7452#undef ENUM_FLAG_OPERATOR
-
7453#undef ENUM_FLAGS
-
7454
-
7455#ifdef _MSC_VER
-
7456#pragma warning(pop)
-
7457#endif
-
Test for angle in d°mm'ss.dddd form.
Definition parser.hpp:4396
-
Test for any code unit.
Definition parser.hpp:222
-
Test for beginning of line.
Definition parser.hpp:616
-
Test for any.
Definition parser.hpp:1058
-
Test for chemical formula.
Definition parser.hpp:5540
-
Test for Creditor Reference.
Definition parser.hpp:4966
-
T reference[22]
Normalized national reference number.
Definition parser.hpp:5095
-
T check_digits[3]
Two check digits.
Definition parser.hpp:5094
-
bool is_valid
Is reference valid per ISO 7064.
Definition parser.hpp:5096
-
Test for any code unit from a given string of code units.
Definition parser.hpp:721
-
Test for specific code unit.
Definition parser.hpp:292
-
Test for date.
Definition parser.hpp:4026
-
Test for valid DNS domain character.
Definition parser.hpp:2807
-
bool allow_on_edge
Is character allowed at the beginning or an end of a DNS domain?
Definition parser.hpp:2845
-
Test for DNS domain/hostname.
Definition parser.hpp:2907
-
bool m_allow_absolute
May DNS names end with a dot (absolute name)?
Definition parser.hpp:2971
-
Test for e-mail address.
Definition parser.hpp:3795
-
Test for emoticon.
Definition parser.hpp:3903
-
std::shared_ptr< basic_parser< T > > apex
apex/eyebrows/halo (e.g. O, 0)
Definition parser.hpp:3992
-
std::shared_ptr< basic_parser< T > > eyes
eyes (e.g. :, ;, >, |, B)
Definition parser.hpp:3993
-
std::shared_ptr< basic_set< T > > mouth
mouth (e.g. ), ), (, (, |, P, D, p, d)
Definition parser.hpp:3995
-
std::shared_ptr< basic_parser< T > > nose
nose (e.g. -, o)
Definition parser.hpp:3994
-
std::shared_ptr< basic_parser< T > > emoticon
emoticon as a whole (e.g. 😀, 🤔, 😶)
Definition parser.hpp:3991
-
Test for end of line.
Definition parser.hpp:654
-
Test for fraction.
Definition parser.hpp:1687
-
Test for International Bank Account Number.
Definition parser.hpp:4672
-
T bban[31]
Normalized Basic Bank Account Number.
Definition parser.hpp:4943
-
T country[3]
ISO 3166-1 alpha-2 country code.
Definition parser.hpp:4941
-
T check_digits[3]
Two check digits.
Definition parser.hpp:4942
-
bool is_valid
Is IBAN valid per ISO 7064.
Definition parser.hpp:4944
-
Test for decimal integer.
Definition parser.hpp:1296
-
Test for decimal integer possibly containing thousand separators.
Definition parser.hpp:1381
-
bool has_separators
Did integer have any separators?
Definition parser.hpp:1441
-
size_t digit_count
Total number of digits in integer.
Definition parser.hpp:1440
-
Test for hexadecimal integer.
Definition parser.hpp:1462
-
Base class for integer testing.
Definition parser.hpp:1274
-
size_t value
Calculated value of the numeral.
Definition parser.hpp:1288
-
Test for IPv4 address.
Definition parser.hpp:2347
-
stdex::interval< size_t > components[4]
Individual component intervals.
Definition parser.hpp:2462
-
struct in_addr value
IPv4 address value.
Definition parser.hpp:2463
-
Test for IPv6 address.
Definition parser.hpp:2566
-
std::shared_ptr< basic_parser< T > > scope_id
Scope ID (e.g. NIC index with link-local addresses)
Definition parser.hpp:2770
-
stdex::interval< size_t > components[8]
Individual component intervals.
Definition parser.hpp:2768
-
struct in6_addr value
IPv6 address value.
Definition parser.hpp:2769
-
Test for valid IPv6 address scope ID character.
Definition parser.hpp:2494
-
Test for repeating.
Definition parser.hpp:911
-
bool m_greedy
try to match as long sequence as possible
Definition parser.hpp:950
-
std::shared_ptr< basic_parser< T > > m_el
repeating element
Definition parser.hpp:947
-
size_t m_min_iterations
minimum number of iterations
Definition parser.hpp:948
-
size_t m_max_iterations
maximum number of iterations
Definition parser.hpp:949
-
Test for JSON string.
Definition parser.hpp:7302
-
Test for mixed numeral.
Definition parser.hpp:1923
-
std::shared_ptr< basic_parser< T > > fraction
fraction
Definition parser.hpp:2029
-
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:2027
-
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:2026
-
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:2025
-
std::shared_ptr< basic_parser< T > > integer
Integer part.
Definition parser.hpp:2028
-
Test for monetary numeral.
Definition parser.hpp:2218
-
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:2324
-
std::shared_ptr< basic_parser< T > > decimal_separator
Decimal separator.
Definition parser.hpp:2329
-
std::shared_ptr< basic_parser< T > > currency
Currency part.
Definition parser.hpp:2327
-
std::shared_ptr< basic_parser< T > > decimal
Decimal part.
Definition parser.hpp:2330
-
std::shared_ptr< basic_parser< T > > integer
Integer part.
Definition parser.hpp:2328
-
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:2325
-
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:2326
-
"No-op" match
Definition parser.hpp:190
-
Base template for all parsers.
Definition parser.hpp:71
-
interval< size_t > interval
Region of the last match.
Definition parser.hpp:170
-
Test for permutation.
Definition parser.hpp:1198
-
Test for phone number.
Definition parser.hpp:4519
-
std::basic_string< T > value
Normalized phone number.
Definition parser.hpp:4645
-
Test for any punctuation code unit.
Definition parser.hpp:464
-
Test for Roman numeral.
Definition parser.hpp:1571
-
Test for scientific numeral.
Definition parser.hpp:2049
-
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:2193
-
std::shared_ptr< basic_parser< T > > exponent_symbol
Exponent symbol (e.g. 'e')
Definition parser.hpp:2197
-
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:2191
-
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:2192
-
double value
Calculated value of the numeral.
Definition parser.hpp:2201
-
std::shared_ptr< basic_parser< T > > negative_exp_sign
Negative exponent sign (e.g. '-')
Definition parser.hpp:2199
-
std::shared_ptr< basic_integer< T > > decimal
Decimal part.
Definition parser.hpp:2196
-
std::shared_ptr< basic_parser< T > > positive_exp_sign
Positive exponent sign (e.g. '+')
Definition parser.hpp:2198
-
std::shared_ptr< basic_integer< T > > exponent
Exponent part.
Definition parser.hpp:2200
-
std::shared_ptr< basic_parser< T > > decimal_separator
Decimal separator.
Definition parser.hpp:2195
-
std::shared_ptr< basic_integer< T > > integer
Integer part.
Definition parser.hpp:2194
-
Test for match score.
Definition parser.hpp:1750
-
Test for sequence.
Definition parser.hpp:1007
-
Definition parser.hpp:689
-
Test for SI Reference delimiter.
Definition parser.hpp:5163
-
Test for SI Reference part.
Definition parser.hpp:5118
-
Test for SI Reference.
Definition parser.hpp:5201
-
basic_si_reference_part< T > part3
Reference data part 3 (P3)
Definition parser.hpp:5518
-
basic_si_reference_part< T > part1
Reference data part 1 (P1)
Definition parser.hpp:5516
-
bool is_valid
Is reference valid.
Definition parser.hpp:5519
-
T model[3]
Reference model.
Definition parser.hpp:5515
-
basic_si_reference_part< T > part2
Reference data part 2 (P2)
Definition parser.hpp:5517
-
Test for signed numeral.
Definition parser.hpp:1837
-
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:1905
-
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:1904
-
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:1903
-
std::shared_ptr< basic_parser< T > > number
Number.
Definition parser.hpp:1906
-
Test for any space code unit.
Definition parser.hpp:385
-
Test for any space or punctuation code unit.
Definition parser.hpp:538
-
Test for any string.
Definition parser.hpp:1126
-
Test for given string.
Definition parser.hpp:816
-
Test for time.
Definition parser.hpp:4293
-
Test for valid URL password character.
Definition parser.hpp:3089
-
Test for valid URL path character.
Definition parser.hpp:3189
-
Test for URL path.
Definition parser.hpp:3297
-
Test for valid URL username character.
Definition parser.hpp:2990
-
Test for URL.
Definition parser.hpp:3438
-
Test for HTTP agent.
Definition parser.hpp:6825
-
Test for HTTP any type.
Definition parser.hpp:5947
-
Test for HTTP asterisk.
Definition parser.hpp:6589
- - - - - -
Test for HTTP header.
Definition parser.hpp:7148
-
Test for HTTP language (RFC1766)
Definition parser.hpp:6457
-
Test for HTTP line break (RFC2616: CRLF | LF)
Definition parser.hpp:5621
-
Test for HTTP media range (RFC2616: media-range)
Definition parser.hpp:5979
-
Test for HTTP media type (RFC2616: media-type)
Definition parser.hpp:6034
-
Test for HTTP parameter (RFC2616: parameter)
Definition parser.hpp:5892
-
http_token name
Parameter name.
Definition parser.hpp:5936
-
http_value value
Parameter value.
Definition parser.hpp:5937
-
Test for HTTP protocol.
Definition parser.hpp:6901
-
uint16_t version
HTTP protocol version: 0x100 = 1.0, 0x101 = 1.1...
Definition parser.hpp:7003
-
Test for HTTP quoted string (RFC2616: quoted-string)
Definition parser.hpp:5782
-
stdex::interval< size_t > content
String content (without quotes)
Definition parser.hpp:5838
-
Test for HTTP request.
Definition parser.hpp:7010
-
Test for HTTP space (RFC2616: LWS)
Definition parser.hpp:5657
-
Test for HTTP text character (RFC2616: TEXT)
Definition parser.hpp:5694
-
Test for HTTP token (RFC2616: token - tolerates non-ASCII)
Definition parser.hpp:5728
-
Test for HTTP URL parameter.
Definition parser.hpp:6274
-
Test for HTTP URL path segment.
Definition parser.hpp:6185
-
Test for HTTP URL path segment.
Definition parser.hpp:6218
-
std::vector< http_url_path_segment > segments
Path segments.
Definition parser.hpp:6267
-
Test for HTTP URL port.
Definition parser.hpp:6129
-
Test for HTTP URL server.
Definition parser.hpp:6092
-
Test for HTTP URL.
Definition parser.hpp:6355
-
Collection of HTTP values.
Definition parser.hpp:7258
-
Test for HTTP value (RFC2616: value)
Definition parser.hpp:5848
-
http_quoted_string string
Value when matched as quoted string.
Definition parser.hpp:5884
-
http_token token
Value when matched as token.
Definition parser.hpp:5885
-
Test for HTTP weight factor.
Definition parser.hpp:6520
-
float value
Calculated value of the weight factor.
Definition parser.hpp:6582
-
Test for HTTP weighted value.
Definition parser.hpp:6612
-
Base template for collection-holding parsers.
Definition parser.hpp:967
-
Test for any SGML code point.
Definition parser.hpp:254
-
Test for any SGML code point from a given string of SGML code points.
Definition parser.hpp:773
-
Test for specific SGML code point.
Definition parser.hpp:341
-
Test for valid DNS domain SGML character.
Definition parser.hpp:2863
-
Test for valid IPv6 address scope ID SGML character.
Definition parser.hpp:2532
-
Test for any SGML punctuation code point.
Definition parser.hpp:505
-
Test for any SGML space code point.
Definition parser.hpp:428
-
Test for any SGML space or punctuation code point.
Definition parser.hpp:581
-
Test for SGML given string.
Definition parser.hpp:863
-
Test for valid URL password SGML character.
Definition parser.hpp:3141
-
Test for valid URL path SGML character.
Definition parser.hpp:3245
-
Test for valid URL username SGML character.
Definition parser.hpp:3041
+
7449
+ + +
7452#ifdef _UNICODE
+
7453 using tjson_string = wjson_string;
+
7454#else
+
7455 using tjson_string = json_string;
+
7456#endif
+
7457 }
+
7458}
+
7459
+
7460#undef ENUM_FLAG_OPERATOR
+
7461#undef ENUM_FLAGS
+
7462
+
7463#ifdef _MSC_VER
+
7464#pragma warning(pop)
+
7465#endif
+
Test for angle in d°mm'ss.dddd form.
Definition parser.hpp:4404
+
Test for any code unit.
Definition parser.hpp:230
+
Test for beginning of line.
Definition parser.hpp:624
+
Test for any.
Definition parser.hpp:1066
+
Test for chemical formula.
Definition parser.hpp:5548
+
Test for Creditor Reference.
Definition parser.hpp:4974
+
T reference[22]
Normalized national reference number.
Definition parser.hpp:5103
+
T check_digits[3]
Two check digits.
Definition parser.hpp:5102
+
bool is_valid
Is reference valid per ISO 7064.
Definition parser.hpp:5104
+
Test for any code unit from a given string of code units.
Definition parser.hpp:729
+
Test for specific code unit.
Definition parser.hpp:300
+
Test for date.
Definition parser.hpp:4034
+
Test for valid DNS domain character.
Definition parser.hpp:2815
+
bool allow_on_edge
Is character allowed at the beginning or an end of a DNS domain?
Definition parser.hpp:2853
+
Test for DNS domain/hostname.
Definition parser.hpp:2915
+
bool m_allow_absolute
May DNS names end with a dot (absolute name)?
Definition parser.hpp:2979
+
Test for e-mail address.
Definition parser.hpp:3803
+
Test for emoticon.
Definition parser.hpp:3911
+
std::shared_ptr< basic_parser< T > > apex
apex/eyebrows/halo (e.g. O, 0)
Definition parser.hpp:4000
+
std::shared_ptr< basic_parser< T > > eyes
eyes (e.g. :, ;, >, |, B)
Definition parser.hpp:4001
+
std::shared_ptr< basic_set< T > > mouth
mouth (e.g. ), ), (, (, |, P, D, p, d)
Definition parser.hpp:4003
+
std::shared_ptr< basic_parser< T > > nose
nose (e.g. -, o)
Definition parser.hpp:4002
+
std::shared_ptr< basic_parser< T > > emoticon
emoticon as a whole (e.g. 😀, 🤔, 😶)
Definition parser.hpp:3999
+
Test for end of line.
Definition parser.hpp:662
+
Test for fraction.
Definition parser.hpp:1695
+
Test for International Bank Account Number.
Definition parser.hpp:4680
+
T bban[31]
Normalized Basic Bank Account Number.
Definition parser.hpp:4951
+
T country[3]
ISO 3166-1 alpha-2 country code.
Definition parser.hpp:4949
+
T check_digits[3]
Two check digits.
Definition parser.hpp:4950
+
bool is_valid
Is IBAN valid per ISO 7064.
Definition parser.hpp:4952
+
Test for decimal integer.
Definition parser.hpp:1304
+
Test for decimal integer possibly containing thousand separators.
Definition parser.hpp:1389
+
bool has_separators
Did integer have any separators?
Definition parser.hpp:1449
+
size_t digit_count
Total number of digits in integer.
Definition parser.hpp:1448
+
Test for hexadecimal integer.
Definition parser.hpp:1470
+
Base class for integer testing.
Definition parser.hpp:1282
+
size_t value
Calculated value of the numeral.
Definition parser.hpp:1296
+
Test for IPv4 address.
Definition parser.hpp:2355
+
stdex::interval< size_t > components[4]
Individual component intervals.
Definition parser.hpp:2470
+
struct in_addr value
IPv4 address value.
Definition parser.hpp:2471
+
Test for IPv6 address.
Definition parser.hpp:2574
+
std::shared_ptr< basic_parser< T > > scope_id
Scope ID (e.g. NIC index with link-local addresses)
Definition parser.hpp:2778
+
stdex::interval< size_t > components[8]
Individual component intervals.
Definition parser.hpp:2776
+
struct in6_addr value
IPv6 address value.
Definition parser.hpp:2777
+
Test for valid IPv6 address scope ID character.
Definition parser.hpp:2502
+
Test for repeating.
Definition parser.hpp:919
+
bool m_greedy
try to match as long sequence as possible
Definition parser.hpp:958
+
std::shared_ptr< basic_parser< T > > m_el
repeating element
Definition parser.hpp:955
+
size_t m_min_iterations
minimum number of iterations
Definition parser.hpp:956
+
size_t m_max_iterations
maximum number of iterations
Definition parser.hpp:957
+
Test for JSON string.
Definition parser.hpp:7310
+
Test for mixed numeral.
Definition parser.hpp:1931
+
std::shared_ptr< basic_parser< T > > fraction
fraction
Definition parser.hpp:2037
+
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:2035
+
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:2034
+
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:2033
+
std::shared_ptr< basic_parser< T > > integer
Integer part.
Definition parser.hpp:2036
+
Test for monetary numeral.
Definition parser.hpp:2226
+
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:2332
+
std::shared_ptr< basic_parser< T > > decimal_separator
Decimal separator.
Definition parser.hpp:2337
+
std::shared_ptr< basic_parser< T > > currency
Currency part.
Definition parser.hpp:2335
+
std::shared_ptr< basic_parser< T > > decimal
Decimal part.
Definition parser.hpp:2338
+
std::shared_ptr< basic_parser< T > > integer
Integer part.
Definition parser.hpp:2336
+
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:2333
+
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:2334
+
"No-op" match
Definition parser.hpp:198
+
Base template for all parsers.
Definition parser.hpp:79
+
interval< size_t > interval
Region of the last match.
Definition parser.hpp:178
+
Test for permutation.
Definition parser.hpp:1206
+
Test for phone number.
Definition parser.hpp:4527
+
std::basic_string< T > value
Normalized phone number.
Definition parser.hpp:4653
+
Test for any punctuation code unit.
Definition parser.hpp:472
+
Test for Roman numeral.
Definition parser.hpp:1579
+
Test for scientific numeral.
Definition parser.hpp:2057
+
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:2201
+
std::shared_ptr< basic_parser< T > > exponent_symbol
Exponent symbol (e.g. 'e')
Definition parser.hpp:2205
+
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:2199
+
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:2200
+
double value
Calculated value of the numeral.
Definition parser.hpp:2209
+
std::shared_ptr< basic_parser< T > > negative_exp_sign
Negative exponent sign (e.g. '-')
Definition parser.hpp:2207
+
std::shared_ptr< basic_integer< T > > decimal
Decimal part.
Definition parser.hpp:2204
+
std::shared_ptr< basic_parser< T > > positive_exp_sign
Positive exponent sign (e.g. '+')
Definition parser.hpp:2206
+
std::shared_ptr< basic_integer< T > > exponent
Exponent part.
Definition parser.hpp:2208
+
std::shared_ptr< basic_parser< T > > decimal_separator
Decimal separator.
Definition parser.hpp:2203
+
std::shared_ptr< basic_integer< T > > integer
Integer part.
Definition parser.hpp:2202
+
Test for match score.
Definition parser.hpp:1758
+
Test for sequence.
Definition parser.hpp:1015
+
Definition parser.hpp:697
+
Test for SI Reference delimiter.
Definition parser.hpp:5171
+
Test for SI Reference part.
Definition parser.hpp:5126
+
Test for SI Reference.
Definition parser.hpp:5209
+
basic_si_reference_part< T > part3
Reference data part 3 (P3)
Definition parser.hpp:5526
+
basic_si_reference_part< T > part1
Reference data part 1 (P1)
Definition parser.hpp:5524
+
bool is_valid
Is reference valid.
Definition parser.hpp:5527
+
T model[3]
Reference model.
Definition parser.hpp:5523
+
basic_si_reference_part< T > part2
Reference data part 2 (P2)
Definition parser.hpp:5525
+
Test for signed numeral.
Definition parser.hpp:1845
+
std::shared_ptr< basic_parser< T > > special_sign
Special sign (e.g. plus-minus '±')
Definition parser.hpp:1913
+
std::shared_ptr< basic_parser< T > > negative_sign
Negative sign.
Definition parser.hpp:1912
+
std::shared_ptr< basic_parser< T > > positive_sign
Positive sign.
Definition parser.hpp:1911
+
std::shared_ptr< basic_parser< T > > number
Number.
Definition parser.hpp:1914
+
Test for any space code unit.
Definition parser.hpp:393
+
Test for any space or punctuation code unit.
Definition parser.hpp:546
+
Test for any string.
Definition parser.hpp:1134
+
Test for given string.
Definition parser.hpp:824
+
Test for time.
Definition parser.hpp:4301
+
Test for valid URL password character.
Definition parser.hpp:3097
+
Test for valid URL path character.
Definition parser.hpp:3197
+
Test for URL path.
Definition parser.hpp:3305
+
Test for valid URL username character.
Definition parser.hpp:2998
+
Test for URL.
Definition parser.hpp:3446
+
Test for HTTP agent.
Definition parser.hpp:6833
+
Test for HTTP any type.
Definition parser.hpp:5955
+
Test for HTTP asterisk.
Definition parser.hpp:6597
+ + + + + +
Test for HTTP header.
Definition parser.hpp:7156
+
Test for HTTP language (RFC1766)
Definition parser.hpp:6465
+
Test for HTTP line break (RFC2616: CRLF | LF)
Definition parser.hpp:5629
+
Test for HTTP media range (RFC2616: media-range)
Definition parser.hpp:5987
+
Test for HTTP media type (RFC2616: media-type)
Definition parser.hpp:6042
+
Test for HTTP parameter (RFC2616: parameter)
Definition parser.hpp:5900
+
http_token name
Parameter name.
Definition parser.hpp:5944
+
http_value value
Parameter value.
Definition parser.hpp:5945
+
Test for HTTP protocol.
Definition parser.hpp:6909
+
uint16_t version
HTTP protocol version: 0x100 = 1.0, 0x101 = 1.1...
Definition parser.hpp:7011
+
Test for HTTP quoted string (RFC2616: quoted-string)
Definition parser.hpp:5790
+
stdex::interval< size_t > content
String content (without quotes)
Definition parser.hpp:5846
+
Test for HTTP request.
Definition parser.hpp:7018
+
Test for HTTP space (RFC2616: LWS)
Definition parser.hpp:5665
+
Test for HTTP text character (RFC2616: TEXT)
Definition parser.hpp:5702
+
Test for HTTP token (RFC2616: token - tolerates non-ASCII)
Definition parser.hpp:5736
+
Test for HTTP URL parameter.
Definition parser.hpp:6282
+
Test for HTTP URL path segment.
Definition parser.hpp:6193
+
Test for HTTP URL path segment.
Definition parser.hpp:6226
+
std::vector< http_url_path_segment > segments
Path segments.
Definition parser.hpp:6275
+
Test for HTTP URL port.
Definition parser.hpp:6137
+
Test for HTTP URL server.
Definition parser.hpp:6100
+
Test for HTTP URL.
Definition parser.hpp:6363
+
Collection of HTTP values.
Definition parser.hpp:7266
+
Test for HTTP value (RFC2616: value)
Definition parser.hpp:5856
+
http_quoted_string string
Value when matched as quoted string.
Definition parser.hpp:5892
+
http_token token
Value when matched as token.
Definition parser.hpp:5893
+
Test for HTTP weight factor.
Definition parser.hpp:6528
+
float value
Calculated value of the weight factor.
Definition parser.hpp:6590
+
Test for HTTP weighted value.
Definition parser.hpp:6620
+
Base template for collection-holding parsers.
Definition parser.hpp:975
+
Test for any SGML code point.
Definition parser.hpp:262
+
Test for any SGML code point from a given string of SGML code points.
Definition parser.hpp:781
+
Test for specific SGML code point.
Definition parser.hpp:349
+
Test for valid DNS domain SGML character.
Definition parser.hpp:2871
+
Test for valid IPv6 address scope ID SGML character.
Definition parser.hpp:2540
+
Test for any SGML punctuation code point.
Definition parser.hpp:513
+
Test for any SGML space code point.
Definition parser.hpp:436
+
Test for any SGML space or punctuation code point.
Definition parser.hpp:589
+
Test for SGML given string.
Definition parser.hpp:871
+
Test for valid URL password SGML character.
Definition parser.hpp:3149
+
Test for valid URL path SGML character.
Definition parser.hpp:3253
+
Test for valid URL username SGML character.
Definition parser.hpp:3049
Numerical interval.
Definition interval.hpp:18
T size() const
Returns interval size.
Definition interval.hpp:47
T end
interval end
Definition interval.hpp:20
interval() noexcept
Constructs an invalid interval.
Definition interval.hpp:25
T start
interval start
Definition interval.hpp:19
-
Definition parser.hpp:7284
+
Definition parser.hpp:7292
diff --git a/pch_8h_source.html b/pch_8h_source.html index 2c30894d3..3809c5aa4 100644 --- a/pch_8h_source.html +++ b/pch_8h_source.html @@ -116,7 +116,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/progress_8hpp_source.html b/progress_8hpp_source.html index 7525006da..b271895c2 100644 --- a/progress_8hpp_source.html +++ b/progress_8hpp_source.html @@ -331,7 +331,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/ring_8cpp_source.html b/ring_8cpp_source.html index a58781a9c..83d51120b 100644 --- a/ring_8cpp_source.html +++ b/ring_8cpp_source.html @@ -144,7 +144,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/ring_8hpp_source.html b/ring_8hpp_source.html index b49c4e8fa..2a6abaf24 100644 --- a/ring_8hpp_source.html +++ b/ring_8hpp_source.html @@ -224,7 +224,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/sgml_8cpp_source.html b/sgml_8cpp_source.html index fa8787a69..8fa871813 100644 --- a/sgml_8cpp_source.html +++ b/sgml_8cpp_source.html @@ -153,7 +153,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/sgml_8hpp_source.html b/sgml_8hpp_source.html index c6a441d83..e10b68b93 100644 --- a/sgml_8hpp_source.html +++ b/sgml_8hpp_source.html @@ -773,7 +773,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/sgml__unicode_8hpp_source.html b/sgml__unicode_8hpp_source.html index 78f91565e..ea8d5f1f4 100644 --- a/sgml__unicode_8hpp_source.html +++ b/sgml__unicode_8hpp_source.html @@ -3175,7 +3175,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/stream_8cpp_source.html b/stream_8cpp_source.html index 55aefc055..8a9ac36d8 100644 --- a/stream_8cpp_source.html +++ b/stream_8cpp_source.html @@ -257,7 +257,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/stream_8hpp_source.html b/stream_8hpp_source.html index c6b93324e..17ef4d8b5 100644 --- a/stream_8hpp_source.html +++ b/stream_8hpp_source.html @@ -3971,7 +3971,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/string_8hpp_source.html b/string_8hpp_source.html index 4362e2f7b..d8d48c628 100644 --- a/string_8hpp_source.html +++ b/string_8hpp_source.html @@ -998,7 +998,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/structstdex_1_1chrono_1_1aosn__date-members.html b/structstdex_1_1chrono_1_1aosn__date-members.html index 45dc7d54a..cd34a09bf 100644 --- a/structstdex_1_1chrono_1_1aosn__date-members.html +++ b/structstdex_1_1chrono_1_1aosn__date-members.html @@ -96,7 +96,7 @@ $(function() {
diff --git a/structstdex_1_1chrono_1_1aosn__date.html b/structstdex_1_1chrono_1_1aosn__date.html index 9bb075fcb..e0fc55eb2 100644 --- a/structstdex_1_1chrono_1_1aosn__date.html +++ b/structstdex_1_1chrono_1_1aosn__date.html @@ -152,7 +152,7 @@ static constexpr bool is_s
diff --git a/structstdex_1_1chrono_1_1aosn__timestamp-members.html b/structstdex_1_1chrono_1_1aosn__timestamp-members.html index f1e0e3cf4..a628a3a4b 100644 --- a/structstdex_1_1chrono_1_1aosn__timestamp-members.html +++ b/structstdex_1_1chrono_1_1aosn__timestamp-members.html @@ -110,7 +110,7 @@ $(function() {
diff --git a/structstdex_1_1chrono_1_1aosn__timestamp.html b/structstdex_1_1chrono_1_1aosn__timestamp.html index c4999af09..0aed6fff5 100644 --- a/structstdex_1_1chrono_1_1aosn__timestamp.html +++ b/structstdex_1_1chrono_1_1aosn__timestamp.html @@ -197,7 +197,7 @@ static constexpr rep p_wee
diff --git a/structstdex_1_1free__locale__delete-members.html b/structstdex_1_1free__locale__delete-members.html index 5eb1a7255..07db59ce7 100644 --- a/structstdex_1_1free__locale__delete-members.html +++ b/structstdex_1_1free__locale__delete-members.html @@ -84,7 +84,7 @@ $(function() {
diff --git a/structstdex_1_1free__locale__delete.html b/structstdex_1_1free__locale__delete.html index 72d6abde3..f18904ff6 100644 --- a/structstdex_1_1free__locale__delete.html +++ b/structstdex_1_1free__locale__delete.html @@ -101,7 +101,7 @@ void operator() (local
diff --git a/structstdex_1_1interval-members.html b/structstdex_1_1interval-members.html index 368ee062f..dff4488e8 100644 --- a/structstdex_1_1interval-members.html +++ b/structstdex_1_1interval-members.html @@ -92,7 +92,7 @@ $(function() {
diff --git a/structstdex_1_1interval.html b/structstdex_1_1interval.html index c1cc374a6..9385c3224 100644 --- a/structstdex_1_1interval.html +++ b/structstdex_1_1interval.html @@ -344,7 +344,7 @@ template<class T >
diff --git a/structstdex_1_1mapping-members.html b/structstdex_1_1mapping-members.html index bbfac793c..d13554c4f 100644 --- a/structstdex_1_1mapping-members.html +++ b/structstdex_1_1mapping-members.html @@ -90,7 +90,7 @@ $(function() {
diff --git a/structstdex_1_1mapping.html b/structstdex_1_1mapping.html index ca3c5ba0a..3ea93dbaa 100644 --- a/structstdex_1_1mapping.html +++ b/structstdex_1_1mapping.html @@ -283,7 +283,7 @@ template<class T >
diff --git a/structstdex_1_1no__delete-members.html b/structstdex_1_1no__delete-members.html index dcaf1228f..1d6b86555 100644 --- a/structstdex_1_1no__delete-members.html +++ b/structstdex_1_1no__delete-members.html @@ -86,7 +86,7 @@ $(function() {
diff --git a/structstdex_1_1no__delete.html b/structstdex_1_1no__delete.html index a8832820d..398c17db6 100644 --- a/structstdex_1_1no__delete.html +++ b/structstdex_1_1no__delete.html @@ -105,7 +105,7 @@ struct stdex::no_delete< T >

Noop deleter.

diff --git a/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html b/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html index 20730c1b3..754ca8027 100644 --- a/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html +++ b/structstdex_1_1no__delete_3_01_t_0f_0e_4-members.html @@ -86,7 +86,7 @@ $(function() {
diff --git a/structstdex_1_1no__delete_3_01_t_0f_0e_4.html b/structstdex_1_1no__delete_3_01_t_0f_0e_4.html index d4e684833..d93050e6f 100644 --- a/structstdex_1_1no__delete_3_01_t_0f_0e_4.html +++ b/structstdex_1_1no__delete_3_01_t_0f_0e_4.html @@ -106,7 +106,7 @@ struct stdex::no_delete< T[]>

Noop array deleter.

diff --git a/structstdex_1_1parser_1_1http__factor__more-members.html b/structstdex_1_1parser_1_1http__factor__more-members.html index 5b02b0276..09f51b3cb 100644 --- a/structstdex_1_1parser_1_1http__factor__more-members.html +++ b/structstdex_1_1parser_1_1http__factor__more-members.html @@ -84,7 +84,7 @@ $(function() {
diff --git a/structstdex_1_1parser_1_1http__factor__more.html b/structstdex_1_1parser_1_1http__factor__more.html index d81c991b7..3a4b62b07 100644 --- a/structstdex_1_1parser_1_1http__factor__more.html +++ b/structstdex_1_1parser_1_1http__factor__more.html @@ -93,7 +93,7 @@ Public Member Functions
diff --git a/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html b/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html index 0d345a0de..829812f37 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t-members.html @@ -89,7 +89,7 @@ $(function() {
diff --git a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html index d8cbd6cda..c66d9f6f6 100644 --- a/structstdex_1_1stream_1_1buffer_1_1buffer__t.html +++ b/structstdex_1_1stream_1_1buffer_1_1buffer__t.html @@ -109,7 +109,7 @@ size_t capacity diff --git a/structstdex_1_1stream_1_1cache_1_1cache__t-members.html b/structstdex_1_1stream_1_1cache_1_1cache__t-members.html index 8bd8c19b9..9c56c294b 100644 --- a/structstdex_1_1stream_1_1cache_1_1cache__t-members.html +++ b/structstdex_1_1stream_1_1cache_1_1cache__t-members.html @@ -90,7 +90,7 @@ $(function() {
diff --git a/structstdex_1_1stream_1_1cache_1_1cache__t.html b/structstdex_1_1stream_1_1cache_1_1cache__t.html index 7b0b4767f..214ca6118 100644 --- a/structstdex_1_1stream_1_1cache_1_1cache__t.html +++ b/structstdex_1_1stream_1_1cache_1_1cache__t.html @@ -119,7 +119,7 @@ enum stdex::stream::cache::cache_t::status_t  diff --git a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html index 645233c59..eff4cefc9 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t-members.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t-members.html @@ -86,7 +86,7 @@ $(function() {
diff --git a/structstdex_1_1stream_1_1fifo_1_1node__t.html b/structstdex_1_1stream_1_1fifo_1_1node__t.html index c73dac5ac..6cae3f987 100644 --- a/structstdex_1_1stream_1_1fifo_1_1node__t.html +++ b/structstdex_1_1stream_1_1fifo_1_1node__t.html @@ -99,7 +99,7 @@ uint8_t data [0]<
diff --git a/system_8hpp_source.html b/system_8hpp_source.html index 332ad84dd..503c7ce2b 100644 --- a/system_8hpp_source.html +++ b/system_8hpp_source.html @@ -286,7 +286,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/unicode_8cpp_source.html b/unicode_8cpp_source.html index dbfb4d529..8f295aa32 100644 --- a/unicode_8cpp_source.html +++ b/unicode_8cpp_source.html @@ -181,7 +181,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/unicode_8hpp_source.html b/unicode_8hpp_source.html index ee48c367d..1a4bc5a38 100644 --- a/unicode_8hpp_source.html +++ b/unicode_8hpp_source.html @@ -658,7 +658,7 @@ $(document).ready(function() { init_codefold(0); });
diff --git a/vector__queue_8hpp_source.html b/vector__queue_8hpp_source.html index 7f21cccef..b5f51398f 100644 --- a/vector__queue_8hpp_source.html +++ b/vector__queue_8hpp_source.html @@ -451,7 +451,7 @@ $(document).ready(function() { init_codefold(0); });