aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/uri/encodefsm.rl6
diff options
context:
space:
mode:
authoralbert <albert@yandex-team.ru>2022-02-10 16:48:14 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:14 +0300
commit9f25ef3232c288ca664ceee6c376cf64e4349a2e (patch)
treeb192eaf3150845f7302fafd460a972b0439d6fe5 /library/cpp/uri/encodefsm.rl6
parent6a1e535429145ec1ecfbc5f1efd3c95323261fb5 (diff)
downloadydb-9f25ef3232c288ca664ceee6c376cf64e4349a2e.tar.gz
Restoring authorship annotation for <albert@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/uri/encodefsm.rl6')
-rw-r--r--library/cpp/uri/encodefsm.rl646
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/uri/encodefsm.rl6 b/library/cpp/uri/encodefsm.rl6
index 6a323aa85a..396fd40b36 100644
--- a/library/cpp/uri/encodefsm.rl6
+++ b/library/cpp/uri/encodefsm.rl6
@@ -4,21 +4,21 @@
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
-namespace NUri {
-namespace NEncode {
-
+namespace NUri {
+namespace NEncode {
+
%%{
- machine TEncoder;
+ machine TEncoder;
- hex = (
- digit >{ HexDigit(fc); } |
- [A-F] >{ HexUpper(fc); } |
- [a-f] >{ HexLower(fc); }
- );
+ hex = (
+ digit >{ HexDigit(fc); } |
+ [A-F] >{ HexUpper(fc); } |
+ [a-f] >{ HexLower(fc); }
+ );
- escaped = ( "%" hex hex )
- > { HexReset(); }
- % { DoHex(); };
+ escaped = ( "%" hex hex )
+ > { HexReset(); }
+ % { DoHex(); };
bad_escaped = ( "%" hex )
% {
@@ -30,22 +30,22 @@ namespace NEncode {
main := ( escaped | bad_escaped | sym )**;
- write data;
+ write data;
}%%
-ui64 TEncoder::ReEncode(const TStringBuf &url)
+ui64 TEncoder::ReEncode(const TStringBuf &url)
{
- const char *p = url.data();
- const char *pe = p + url.length();
- const char *eof = pe;
+ const char *p = url.data();
+ const char *pe = p + url.length();
+ const char *eof = pe;
int cs;
- OutFlags = 0;
+ OutFlags = 0;
%% write init;
%% write exec;
-
- return OutFlags;
-}
-
-}
+
+ return OutFlags;
}
+
+}
+}