/src/spicy/build/ci/fuzz/HTTP_Request_HTTP.cc
Line | Count | Source |
1 | | // Begin of HTTP (from "/src/spicy/spicy-http/analyzer/analyzer.spicy") |
2 | | // Compiled by HILTI version 1.16.0-dev.86 |
3 | | |
4 | | #include <hilti/rt/compiler-setup.h> |
5 | | |
6 | | #include <spicy/rt/libspicy.h> |
7 | | #include <hilti/rt/libhilti.h> |
8 | | |
9 | | extern uint64_t hlt_internal_HTTP_Request_hlto_scope; |
10 | | |
11 | | namespace hlt_internal_HTTP_Request::type_info { namespace { |
12 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__DeliveryMode_namex2aHTTP__DeliveryModex2b; |
13 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Message_namex2aHTTP__Messagex2b; |
14 | | extern const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_Header___vectorx2anamex2aHTTP__Headerx2bx2b; |
15 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_Header__value_refx2anamex2aHTTP__Headerx2bx2b; |
16 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Header_namex2aHTTP__Headerx2b; |
17 | | extern const ::hilti::rt::TypeInfo _t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b; |
18 | | extern const ::hilti::rt::TypeInfo _t_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b; |
19 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_Body__value_refx2anamex2aHTTP__Bodyx2bx2b; |
20 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Body_namex2aHTTP__Bodyx2b; |
21 | | extern const ::hilti::rt::TypeInfo _t_ti_strong_ref_spicy_rt__Sink__strong_refx2anamex2aspicy_rt__Sinkx2bx2b; |
22 | | extern const ::hilti::rt::TypeInfo _t_ti_spicy_rt__Sink_namex2aspicy_rt__Sinkx2b; |
23 | | extern const ::hilti::rt::TypeInfo _t_ti_spicy_rt__SinkState_libraryx2aspicy__rt__sink__detail__Statex2cx2b; |
24 | | extern const ::hilti::rt::TypeInfo _t_ti_tuple_bytes__bytes__tuplex2abytes_bytes_x2b; |
25 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Chunks_namex2aHTTP__Chunksx2b; |
26 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Chunk_namex2aHTTP__Chunkx2b; |
27 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Content_namex2aHTTP__Contentx2b; |
28 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Version_namex2aHTTP__Versionx2b; |
29 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__ReplyLine_namex2aHTTP__ReplyLinex2b; |
30 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Reply_namex2aHTTP__Replyx2b; |
31 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_Message__value_refx2anamex2aHTTP__Messagex2bx2b; |
32 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Replies_namex2aHTTP__Repliesx2b; |
33 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_HTTP__Replies__value_refx2anamex2aHTTP__Repliesx2bx2b; |
34 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__RequestLine_namex2aHTTP__RequestLinex2b; |
35 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Request_namex2aHTTP__Requestx2b; |
36 | | extern const ::hilti::rt::TypeInfo _t_ti_HTTP__Requests_namex2aHTTP__Requestsx2b; |
37 | | extern const ::hilti::rt::TypeInfo _t_ti_value_ref_HTTP__Requests__value_refx2anamex2aHTTP__Requestsx2bx2b; |
38 | | extern const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Body__strong_refx2anamex2aHTTP__Bodyx2bx2b; |
39 | | extern const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Content__strong_refx2anamex2aHTTP__Contentx2bx2b; |
40 | | extern const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Replies__strong_refx2anamex2aHTTP__Repliesx2bx2b; |
41 | | extern const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Requests__strong_refx2anamex2aHTTP__Requestsx2bx2b; |
42 | | } } |
43 | | |
44 | | namespace hlt_internal_HTTP_Request::HTTP { |
45 | | struct Message; |
46 | | struct Header; |
47 | | struct Chunks; |
48 | | struct Chunk; |
49 | | struct Body; |
50 | | struct Content; |
51 | | } |
52 | | |
53 | | namespace hlt_internal_HTTP_Request::filter { |
54 | | struct Zlib; |
55 | | } |
56 | | |
57 | | namespace hlt_internal_HTTP_Request::HTTP { |
58 | | struct Version; |
59 | | struct ReplyLine; |
60 | | struct Reply; |
61 | | struct Replies; |
62 | | struct RequestLine; |
63 | | struct Request; |
64 | | struct Requests; |
65 | | HILTI_RT_ENUM(DeliveryMode, EndOfData = 0, Length = 1, Multipart = 2, Chunked = 3); |
66 | | struct Message : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Message> { |
67 | 202k | auto _t_self() { return ::hilti::rt::ValueReference<Message>::self(this); } |
68 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<Header>>> headers{}; |
69 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> end_of_hdr{}; |
70 | | void _t_on_end_of_hdr(); |
71 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<Body>> body{}; |
72 | | ::hilti::rt::Bool has_body{}; |
73 | | // ::hilti::rt::Bool is_request{}; |
74 | | ::hilti::rt::Optional<::hilti::rt::Bytes> content_encoding{}; |
75 | | // ::hilti::rt::Bool use_content_length{}; |
76 | | // ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> body_len{}; |
77 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> content_length{}; |
78 | | ::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes> content_type{}; |
79 | | ::hilti::rt::Optional<::hilti::rt::Bytes> content_type_parameter{}; |
80 | | HTTP::DeliveryMode delivery_mode{}; |
81 | | ::hilti::rt::Optional<::hilti::rt::Bytes> multipart_boundary{}; |
82 | | ::hilti::rt::Optional<::hilti::rt::Bytes> transfer_encoding{}; |
83 | | void _t_on_0x25_init(); |
84 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
85 | | auto _t_parse_headers_5_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<Header>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
86 | | auto _t_parse_HTTP__Message_5_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
87 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
88 | | ::hilti::rt::Bool _t_p_body_default{}; |
89 | | ::hilti::rt::Bool _t_p_is_request{}; |
90 | | Message(); |
91 | 0 | Message(const Message&) = default; |
92 | 0 | Message(Message&&) = default; |
93 | 0 | Message& operator=(const Message&) = default; |
94 | 40.9k | Message& operator=(Message&&) = default; |
95 | | explicit Message(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<Header>>>> headers, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<Body>>> body, ::hilti::rt::Optional<::hilti::rt::Bool> has_body, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> content_encoding, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> content_length, ::hilti::rt::Optional<::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes>> content_type, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> content_type_parameter, ::hilti::rt::Optional<HTTP::DeliveryMode> delivery_mode, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> multipart_boundary, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> transfer_encoding); |
96 | | explicit Message(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::Bool& _t_p_body_default, const ::hilti::rt::Bool& _t_p_is_request); |
97 | | |
98 | 0 | std::string __to_string() const { |
99 | 0 | return "["s + "$headers=" + hilti::rt::to_string(headers) + ", "s + hilti::rt::to_string_for_print("$end_of_hdr=(optimized out)") + ", "s + "$body=" + hilti::rt::to_string(body) + ", "s + "$has_body=" + hilti::rt::to_string(has_body) + ", "s + hilti::rt::to_string_for_print("$is_request=(optimized out)") + ", "s + "$content_encoding=" + hilti::rt::to_string(content_encoding) + ", "s + hilti::rt::to_string_for_print("$use_content_length=(optimized out)") + ", "s + hilti::rt::to_string_for_print("$body_len=(optimized out)") + ", "s + "$content_length=" + hilti::rt::to_string(content_length) + ", "s + "$content_type=" + hilti::rt::to_string(content_type) + ", "s + "$content_type_parameter=" + hilti::rt::to_string(content_type_parameter) + ", "s + "$delivery_mode=" + hilti::rt::to_string(delivery_mode) + ", "s + "$multipart_boundary=" + hilti::rt::to_string(multipart_boundary) + ", "s + "$transfer_encoding=" + hilti::rt::to_string(transfer_encoding) + "]"; |
100 | 0 | } |
101 | | }; |
102 | | |
103 | | struct Header : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Header> { |
104 | 533k | auto _t_self() { return ::hilti::rt::ValueReference<Header>::self(this); } |
105 | | ::hilti::rt::Optional<::hilti::rt::Bytes> name{}; |
106 | | ::hilti::rt::Optional<::hilti::rt::Bytes> content{}; |
107 | | void _t_on_content(); |
108 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
109 | | auto _t_parse_HTTP__Header_6_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
110 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
111 | | ::hilti::rt::WeakReference<Message> _t_p_msg{}; |
112 | | Header(); |
113 | 255k | Header(const Header&) = default; |
114 | 356k | Header(Header&&) = default; |
115 | 0 | Header& operator=(const Header&) = default; |
116 | | Header& operator=(Header&&) = default; |
117 | | explicit Header(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> name, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> content); |
118 | | explicit Header(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<Message>& _t_p_msg); |
119 | | |
120 | 0 | std::string __to_string() const { |
121 | 0 | return "["s + "$name=" + hilti::rt::to_string(name) + ", "s + "$content=" + hilti::rt::to_string(content) + "]"; |
122 | 0 | } |
123 | | }; |
124 | | |
125 | | struct Chunks : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Chunks> { |
126 | 96.0k | auto _t_self() { return ::hilti::rt::ValueReference<Chunks>::self(this); } |
127 | | ::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<Header>>> trailer{}; |
128 | | void _t_on_trailer_foreach(const ::hilti::rt::ValueReference<Header>& _t_dd); |
129 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
130 | | auto _t_parse__anon_21_7_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
131 | | auto _t_parse_trailer_7_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<Header>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
132 | | auto _t_parse_HTTP__Chunks_7_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
133 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
134 | | ::hilti::rt::WeakReference<Body> _t_p_body{}; |
135 | | ::hilti::rt::WeakReference<Message> _t_p_msg{}; |
136 | | Chunks(); |
137 | 0 | Chunks(const Chunks&) = default; |
138 | 9.15k | Chunks(Chunks&&) = default; |
139 | 0 | Chunks& operator=(const Chunks&) = default; |
140 | | Chunks& operator=(Chunks&&) = default; |
141 | | explicit Chunks(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<Header>>>> trailer); |
142 | | explicit Chunks(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<Body>& _t_p_body, ::hilti::rt::ValueReference<Message>& _t_p_msg); |
143 | | |
144 | 0 | std::string __to_string() const { |
145 | 0 | return "["s + "$trailer=" + hilti::rt::to_string(trailer) + "]"; |
146 | 0 | } |
147 | | }; |
148 | | |
149 | | struct Chunk : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Chunk> { |
150 | 26.9k | auto _t_self() { return ::hilti::rt::ValueReference<Chunk>::self(this); } |
151 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> length{}; |
152 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> extension{}; |
153 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
154 | | auto _t_parse_HTTP__Chunk_8_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
155 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
156 | | ::hilti::rt::WeakReference<Body> _t_p_body{}; |
157 | | Chunk(); |
158 | 13.0k | Chunk(const Chunk&) = default; |
159 | 26.9k | Chunk(Chunk&&) = default; |
160 | 0 | Chunk& operator=(const Chunk&) = default; |
161 | | Chunk& operator=(Chunk&&) = default; |
162 | | explicit Chunk(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> length); |
163 | | explicit Chunk(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<Body>& _t_p_body); |
164 | | |
165 | 0 | std::string __to_string() const { |
166 | 0 | return "["s + "$length=" + hilti::rt::to_string(length) + ", "s + hilti::rt::to_string_for_print("$extension=(optimized out)") + "]"; |
167 | 0 | } |
168 | | }; |
169 | | |
170 | | struct Body : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Body> { |
171 | 432k | auto _t_self() { return ::hilti::rt::ValueReference<Body>::self(this); } |
172 | | void _t_on__anon_18_foreach(const ::hilti::rt::Bytes& _t_dd); |
173 | | ::hilti::rt::StrongReference<::spicy::rt::Sink> data{}; |
174 | | void _t_on_0x25_init(); |
175 | | void _t_on_0x25_done(); |
176 | | void _t_on_0x25_error(const std::string& _t_except); |
177 | | inline static ::spicy::rt::Parser _t_parser{}; |
178 | | ::spicy::rt::sink::detail::State* _t_sink{}; |
179 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
180 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
181 | | static auto parse2(::hilti::rt::ValueReference<Body>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
182 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
183 | | auto _t_parse__anon_18_6_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::Bytes>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
184 | | auto _t_parse_switch_6_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
185 | | auto _t_parse_HTTP__Body_6_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
186 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
187 | | ::hilti::rt::WeakReference<Message> _t_p_msg{}; |
188 | | HTTP::DeliveryMode _t_p_delivery_mode; |
189 | | ::hilti::rt::Bool _t_p_is_request{}; |
190 | | Body(); |
191 | 0 | Body(const Body&) = default; |
192 | 0 | Body(Body&&) = default; |
193 | 0 | Body& operator=(const Body&) = default; |
194 | 25.7k | Body& operator=(Body&&) = default; |
195 | | explicit Body(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::StrongReference<::spicy::rt::Sink>> data); |
196 | | explicit Body(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<Message>& _t_p_msg, const HTTP::DeliveryMode& _t_p_delivery_mode, const ::hilti::rt::Bool& _t_p_is_request); |
197 | | |
198 | 0 | std::string __to_string() const { |
199 | 0 | return "["s + "$data=" + hilti::rt::to_string(data) + "]"; |
200 | 0 | } |
201 | | }; |
202 | | |
203 | | struct Content : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Content> { |
204 | 366k | auto _t_self() { return ::hilti::rt::ValueReference<Content>::self(this); } |
205 | | ::hilti::rt::Optional<::hilti::rt::Bytes> data{}; |
206 | | void _t_on_data(); |
207 | | // ::hilti::rt::Bool have_content{}; |
208 | | inline static ::spicy::rt::Parser _t_parser{}; |
209 | | ::spicy::rt::sink::detail::State* _t_sink{}; |
210 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
211 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
212 | | static auto parse2(::hilti::rt::ValueReference<Content>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
213 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
214 | | auto _t_parse_HTTP__Content_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
215 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
216 | | ::hilti::rt::WeakReference<Message> _t_p_msg{}; |
217 | | Content(); |
218 | | Content(const Content&) = default; |
219 | 25.7k | Content(Content&&) = default; |
220 | | Content& operator=(const Content&) = default; |
221 | | Content& operator=(Content&&) = default; |
222 | | explicit Content(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> data); |
223 | | explicit Content(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::ValueReference<Message>& _t_p_msg); |
224 | | |
225 | 0 | std::string __to_string() const { |
226 | 0 | return "["s + "$data=" + hilti::rt::to_string(data) + ", "s + hilti::rt::to_string_for_print("$have_content=(optimized out)") + "]"; |
227 | 0 | } |
228 | | }; |
229 | | |
230 | | } |
231 | | |
232 | | namespace hlt_internal_HTTP_Request::filter { |
233 | | struct Zlib : ::hilti::rt::trait::isStruct, hilti::rt::trait::hasParameters, ::hilti::rt::Controllable<Zlib> { |
234 | | auto _t_self() { return ::hilti::rt::ValueReference<Zlib>::self(this); } |
235 | | void _t_on__anon_28(const ::hilti::rt::Bytes& _t_dd); |
236 | | ::spicy::rt::zlib::Stream z{}; |
237 | | void _t_on_0x25_init(); |
238 | | void _t_on_0x25_done(); |
239 | | inline static ::spicy::rt::Parser _t_parser{}; |
240 | | ::hilti::rt::WeakReference<::spicy::rt::filter::detail::Forward> _t_forward{}; |
241 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
242 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
243 | | static auto parse2(::hilti::rt::ValueReference<Zlib>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
244 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
245 | | auto _t_parse_filter__Zlib_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
246 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
247 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<int64_t>> _t_p_window_bits; |
248 | | Zlib(); |
249 | | Zlib(const Zlib&) = default; |
250 | 9.75k | Zlib(Zlib&&) = default; |
251 | | Zlib& operator=(const Zlib&) = default; |
252 | | Zlib& operator=(Zlib&&) = default; |
253 | | explicit Zlib(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::spicy::rt::zlib::Stream> z); |
254 | | explicit Zlib(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::Optional<::hilti::rt::integer::safe<int64_t>>& _t_p_window_bits); |
255 | | |
256 | | std::string __to_string() const { |
257 | | return "["s + "$z=" + hilti::rt::to_string(z) + "]"; |
258 | | } |
259 | | }; |
260 | | |
261 | | } |
262 | | |
263 | | namespace hlt_internal_HTTP_Request::HTTP { |
264 | | struct Version : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<Version> { |
265 | 82.2k | auto _t_self() { return ::hilti::rt::ValueReference<Version>::self(this); } |
266 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> number{}; |
267 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
268 | | auto _t_parse_HTTP__Version_5_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
269 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
270 | | Version(); |
271 | | Version(const Version&) = default; |
272 | 0 | Version(Version&&) = default; |
273 | | Version& operator=(const Version&) = default; |
274 | 41.1k | Version& operator=(Version&&) = default; |
275 | | |
276 | 0 | std::string __to_string() const { |
277 | 0 | return "["s + hilti::rt::to_string_for_print("$number=(optimized out)") + "]"; |
278 | 0 | } |
279 | | }; |
280 | | |
281 | | struct ReplyLine : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<ReplyLine> { |
282 | 0 | auto _t_self() { return ::hilti::rt::ValueReference<ReplyLine>::self(this); } |
283 | | ::hilti::rt::Optional<Version> version{}; |
284 | | ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>> status{}; |
285 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> reason{}; |
286 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
287 | | auto _t_parse_HTTP__ReplyLine_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
288 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
289 | | ReplyLine(); |
290 | | ReplyLine(const ReplyLine&) = default; |
291 | 0 | ReplyLine(ReplyLine&&) = default; |
292 | | ReplyLine& operator=(const ReplyLine&) = default; |
293 | 0 | ReplyLine& operator=(ReplyLine&&) = default; |
294 | | explicit ReplyLine(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<Version>> version, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> status); |
295 | | |
296 | 0 | std::string __to_string() const { |
297 | 0 | return "["s + "$version=" + hilti::rt::to_string(version) + ", "s + "$status=" + hilti::rt::to_string(status) + ", "s + hilti::rt::to_string_for_print("$reason=(optimized out)") + "]"; |
298 | 0 | } |
299 | | }; |
300 | | |
301 | | struct Reply : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<Reply> { |
302 | 0 | auto _t_self() { return ::hilti::rt::ValueReference<Reply>::self(this); } |
303 | | ::hilti::rt::Optional<ReplyLine> reply{}; |
304 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<Message>> message{}; |
305 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
306 | | auto _t_parse_HTTP__Reply_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
307 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
308 | | Reply(); |
309 | | Reply(const Reply&) = default; |
310 | | Reply(Reply&&) = default; |
311 | | Reply& operator=(const Reply&) = default; |
312 | 0 | Reply& operator=(Reply&&) = default; |
313 | | explicit Reply(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<ReplyLine>> reply, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<Message>>> message); |
314 | | |
315 | 0 | std::string __to_string() const { |
316 | 0 | return "["s + "$reply=" + hilti::rt::to_string(reply) + ", "s + "$message=" + hilti::rt::to_string(message) + "]"; |
317 | 0 | } |
318 | | }; |
319 | | |
320 | | struct Replies : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<Replies> { |
321 | 0 | auto _t_self() { return ::hilti::rt::ValueReference<Replies>::self(this); } |
322 | | inline static ::spicy::rt::Parser _t_parser{}; |
323 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
324 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
325 | | static auto parse2(::hilti::rt::ValueReference<Replies>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
326 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
327 | | auto _t_parse__anon_4_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
328 | | auto _t_parse_HTTP__Replies_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
329 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
330 | | Replies(); |
331 | | Replies(const Replies&) = default; |
332 | 0 | Replies(Replies&&) = default; |
333 | | Replies& operator=(const Replies&) = default; |
334 | | Replies& operator=(Replies&&) = default; |
335 | | |
336 | 0 | std::string __to_string() const { |
337 | 0 | return "["s + + "]"; |
338 | 0 | } |
339 | | }; |
340 | | |
341 | | struct RequestLine : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<RequestLine> { |
342 | 82.8k | auto _t_self() { return ::hilti::rt::ValueReference<RequestLine>::self(this); } |
343 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> method{}; |
344 | | // ::hilti::rt::Optional<::hilti::rt::Bytes> uri{}; |
345 | | ::hilti::rt::Optional<Version> version{}; |
346 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
347 | | auto _t_parse_HTTP__RequestLine_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
348 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
349 | | RequestLine(); |
350 | | RequestLine(const RequestLine&) = default; |
351 | 0 | RequestLine(RequestLine&&) = default; |
352 | | RequestLine& operator=(const RequestLine&) = default; |
353 | 41.4k | RequestLine& operator=(RequestLine&&) = default; |
354 | | explicit RequestLine(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<Version>> version); |
355 | | |
356 | 0 | std::string __to_string() const { |
357 | 0 | return "["s + hilti::rt::to_string_for_print("$method=(optimized out)") + ", "s + hilti::rt::to_string_for_print("$uri=(optimized out)") + ", "s + "$version=" + hilti::rt::to_string(version) + "]"; |
358 | 0 | } |
359 | | }; |
360 | | |
361 | | struct Request : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<Request> { |
362 | 82.8k | auto _t_self() { return ::hilti::rt::ValueReference<Request>::self(this); } |
363 | | ::hilti::rt::Optional<RequestLine> request{}; |
364 | | ::hilti::rt::Optional<::hilti::rt::ValueReference<Message>> message{}; |
365 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
366 | | auto _t_parse_HTTP__Request_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
367 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
368 | | Request(); |
369 | | Request(const Request&) = default; |
370 | | Request(Request&&) = default; |
371 | | Request& operator=(const Request&) = default; |
372 | 41.4k | Request& operator=(Request&&) = default; |
373 | | explicit Request(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<RequestLine>> request, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<Message>>> message); |
374 | | |
375 | 0 | std::string __to_string() const { |
376 | 0 | return "["s + "$request=" + hilti::rt::to_string(request) + ", "s + "$message=" + hilti::rt::to_string(message) + "]"; |
377 | 0 | } |
378 | | }; |
379 | | |
380 | | struct Requests : ::hilti::rt::trait::isStruct, ::hilti::rt::Controllable<Requests> { |
381 | 15.9k | auto _t_self() { return ::hilti::rt::ValueReference<Requests>::self(this); } |
382 | | inline static ::spicy::rt::Parser _t_parser{}; |
383 | | auto _t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
384 | | static auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
385 | | static auto parse2(::hilti::rt::ValueReference<Requests>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
386 | | static auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View; |
387 | | auto _t_parse__anon_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
388 | | auto _t_parse_HTTP__Requests_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>>; |
389 | | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error{}; |
390 | | Requests(); |
391 | | Requests(const Requests&) = default; |
392 | 10.6k | Requests(Requests&&) = default; |
393 | | Requests& operator=(const Requests&) = default; |
394 | | Requests& operator=(Requests&&) = default; |
395 | | |
396 | 0 | std::string __to_string() const { |
397 | 0 | return "["s + + "]"; |
398 | 0 | } |
399 | | }; |
400 | | |
401 | | const ::hilti::rt::RegExp FullLine = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^\\r\\n]*\\r?\\n", false, 0}}, {}); |
402 | | const ::hilti::rt::RegExp _t_ctor__regexp_14 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^\\r\\n]*\\r?\\n", false, 0}}, {}); |
403 | | const ::hilti::rt::RegExp _t_ctor__regexp_10 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^\\r\\n]*", false, 0}}, {}); |
404 | | const ::hilti::rt::RegExp _t_ctor__regexp_15 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[0-9a-zA-Z]+", false, 0}}, {}); |
405 | | const ::hilti::rt::RegExp _t_ctor__regexp_7 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"\\r?\\n", false, 0}}, {}); |
406 | | const ::hilti::rt::RegExp _t_ctor__regexp_9 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[ \\t]*", false, 0}}, {}); |
407 | | const ::hilti::rt::RegExp _t_ctor__regexp_11 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"\\r?\\n", false, 1}, ::hilti::rt::regexp::Pattern{"[^:\\r\\n]+", false, 2}}, {.no_sub = true}); |
408 | | const ::hilti::rt::RegExp _t_ctor__regexp_12 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^:\\r\\n]+", false, 0}}, {}); |
409 | | const ::hilti::rt::RegExp _t_ctor__regexp_13 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{":[\\t ]*", false, 0}}, {}); |
410 | | const ::hilti::rt::RegExp _t_ctor__regexp_2 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"HTTP/", false, 4}}, {.no_sub = true}); |
411 | | const ::hilti::rt::RegExp _t_ctor__regexp_6 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[ \\t]+", false, 0}}, {}); |
412 | | const ::hilti::rt::RegExp _t_ctor__regexp_8 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[0-9]+", false, 0}}, {}); |
413 | | const ::hilti::rt::RegExp _t_ctor__regexp_5 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^ \\t\\r\\n]+", false, 0}}, {}); |
414 | | const ::hilti::rt::RegExp _t_ctor__regexp = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^ \\t\\r\\n]+", false, 3}}, {.no_sub = true}); |
415 | | const ::hilti::rt::RegExp _t_ctor__regexp_3 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"HTTP/", false, 0}}, {}); |
416 | | const ::hilti::rt::RegExp _t_ctor__regexp_4 = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[0-9]+\\.[0-9]*", false, 0}}, {}); |
417 | | const ::hilti::rt::RegExp HeaderName = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^:\\r\\n]+", false, 0}}, {}); |
418 | | const ::hilti::rt::RegExp HeaderValue = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^\\r\\n]*", false, 0}}, {}); |
419 | | const ::hilti::rt::RegExp HexInteger = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[0-9a-zA-Z]+", false, 0}}, {}); |
420 | | const ::hilti::rt::RegExp Integer = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[0-9]+", false, 0}}, {}); |
421 | | const ::hilti::rt::RegExp NewLine = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"\\r?\\n", false, 0}}, {}); |
422 | | const ::hilti::rt::RegExp OptionalWhiteSpace = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[ \\t]*", false, 0}}, {}); |
423 | | const ::hilti::rt::RegExp RestOfLine = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^\\r\\n]*", false, 0}}, {}); |
424 | | const ::hilti::rt::RegExp Token = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^ \\t\\r\\n]+", false, 0}}, {}); |
425 | | const ::hilti::rt::RegExp URI = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[^ \\t\\r\\n]+", false, 0}}, {}); |
426 | | const ::hilti::rt::RegExp WhiteSpace = ::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"[ \\t]+", false, 0}}, {}); |
427 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25is_filter = ::hilti::rt::Bool(false); |
428 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25supports_filters = ::hilti::rt::Bool(false); |
429 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25supports_sinks = ::hilti::rt::Bool(true); |
430 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25synchronization = ::hilti::rt::Bool(false); |
431 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25uses_offset = ::hilti::rt::Bool(false); |
432 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25uses_random_access = ::hilti::rt::Bool(false); |
433 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25uses_stream = ::hilti::rt::Bool(false); |
434 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Body0x25uses_sync_advance = ::hilti::rt::Bool(false); |
435 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25is_filter = ::hilti::rt::Bool(false); |
436 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25supports_filters = ::hilti::rt::Bool(false); |
437 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25supports_sinks = ::hilti::rt::Bool(false); |
438 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25synchronization = ::hilti::rt::Bool(false); |
439 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25uses_offset = ::hilti::rt::Bool(false); |
440 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25uses_random_access = ::hilti::rt::Bool(false); |
441 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25uses_stream = ::hilti::rt::Bool(false); |
442 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunk0x25uses_sync_advance = ::hilti::rt::Bool(false); |
443 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25is_filter = ::hilti::rt::Bool(false); |
444 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25supports_filters = ::hilti::rt::Bool(false); |
445 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25supports_sinks = ::hilti::rt::Bool(false); |
446 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25synchronization = ::hilti::rt::Bool(false); |
447 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25uses_offset = ::hilti::rt::Bool(false); |
448 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25uses_random_access = ::hilti::rt::Bool(false); |
449 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25uses_stream = ::hilti::rt::Bool(false); |
450 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Chunks0x25uses_sync_advance = ::hilti::rt::Bool(false); |
451 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25is_filter = ::hilti::rt::Bool(false); |
452 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25supports_filters = ::hilti::rt::Bool(false); |
453 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25supports_sinks = ::hilti::rt::Bool(true); |
454 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25synchronization = ::hilti::rt::Bool(false); |
455 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25uses_offset = ::hilti::rt::Bool(false); |
456 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25uses_random_access = ::hilti::rt::Bool(false); |
457 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25uses_stream = ::hilti::rt::Bool(false); |
458 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Content0x25uses_sync_advance = ::hilti::rt::Bool(false); |
459 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25is_filter = ::hilti::rt::Bool(false); |
460 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25supports_filters = ::hilti::rt::Bool(false); |
461 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25supports_sinks = ::hilti::rt::Bool(false); |
462 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25synchronization = ::hilti::rt::Bool(false); |
463 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25uses_offset = ::hilti::rt::Bool(false); |
464 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25uses_random_access = ::hilti::rt::Bool(false); |
465 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25uses_stream = ::hilti::rt::Bool(false); |
466 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Header0x25uses_sync_advance = ::hilti::rt::Bool(false); |
467 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25is_filter = ::hilti::rt::Bool(false); |
468 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25supports_filters = ::hilti::rt::Bool(false); |
469 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25supports_sinks = ::hilti::rt::Bool(false); |
470 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25synchronization = ::hilti::rt::Bool(false); |
471 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25uses_offset = ::hilti::rt::Bool(false); |
472 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25uses_random_access = ::hilti::rt::Bool(false); |
473 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25uses_stream = ::hilti::rt::Bool(false); |
474 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Message0x25uses_sync_advance = ::hilti::rt::Bool(false); |
475 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25is_filter = ::hilti::rt::Bool(false); |
476 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25supports_filters = ::hilti::rt::Bool(false); |
477 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25supports_sinks = ::hilti::rt::Bool(false); |
478 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25synchronization = ::hilti::rt::Bool(false); |
479 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25uses_offset = ::hilti::rt::Bool(false); |
480 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25uses_random_access = ::hilti::rt::Bool(false); |
481 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25uses_stream = ::hilti::rt::Bool(false); |
482 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Replies0x25uses_sync_advance = ::hilti::rt::Bool(false); |
483 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25is_filter = ::hilti::rt::Bool(false); |
484 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25supports_filters = ::hilti::rt::Bool(false); |
485 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25supports_sinks = ::hilti::rt::Bool(false); |
486 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25synchronization = ::hilti::rt::Bool(false); |
487 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25uses_offset = ::hilti::rt::Bool(false); |
488 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25uses_random_access = ::hilti::rt::Bool(false); |
489 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25uses_stream = ::hilti::rt::Bool(false); |
490 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Reply0x25uses_sync_advance = ::hilti::rt::Bool(false); |
491 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25is_filter = ::hilti::rt::Bool(false); |
492 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25supports_filters = ::hilti::rt::Bool(false); |
493 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25supports_sinks = ::hilti::rt::Bool(false); |
494 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25synchronization = ::hilti::rt::Bool(false); |
495 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25uses_offset = ::hilti::rt::Bool(false); |
496 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25uses_random_access = ::hilti::rt::Bool(false); |
497 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25uses_stream = ::hilti::rt::Bool(false); |
498 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40ReplyLine0x25uses_sync_advance = ::hilti::rt::Bool(false); |
499 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25is_filter = ::hilti::rt::Bool(false); |
500 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25supports_filters = ::hilti::rt::Bool(false); |
501 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25supports_sinks = ::hilti::rt::Bool(false); |
502 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25synchronization = ::hilti::rt::Bool(false); |
503 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25uses_offset = ::hilti::rt::Bool(false); |
504 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25uses_random_access = ::hilti::rt::Bool(false); |
505 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25uses_stream = ::hilti::rt::Bool(false); |
506 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Request0x25uses_sync_advance = ::hilti::rt::Bool(false); |
507 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25is_filter = ::hilti::rt::Bool(false); |
508 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25supports_filters = ::hilti::rt::Bool(false); |
509 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25supports_sinks = ::hilti::rt::Bool(false); |
510 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25synchronization = ::hilti::rt::Bool(false); |
511 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25uses_offset = ::hilti::rt::Bool(false); |
512 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25uses_random_access = ::hilti::rt::Bool(false); |
513 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25uses_stream = ::hilti::rt::Bool(false); |
514 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40RequestLine0x25uses_sync_advance = ::hilti::rt::Bool(false); |
515 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25is_filter = ::hilti::rt::Bool(false); |
516 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25supports_filters = ::hilti::rt::Bool(false); |
517 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25supports_sinks = ::hilti::rt::Bool(false); |
518 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25synchronization = ::hilti::rt::Bool(false); |
519 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25uses_offset = ::hilti::rt::Bool(false); |
520 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25uses_random_access = ::hilti::rt::Bool(false); |
521 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25uses_stream = ::hilti::rt::Bool(false); |
522 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Requests0x25uses_sync_advance = ::hilti::rt::Bool(false); |
523 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25is_filter = ::hilti::rt::Bool(false); |
524 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25supports_filters = ::hilti::rt::Bool(false); |
525 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25supports_sinks = ::hilti::rt::Bool(false); |
526 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25synchronization = ::hilti::rt::Bool(false); |
527 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25uses_offset = ::hilti::rt::Bool(false); |
528 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25uses_random_access = ::hilti::rt::Bool(false); |
529 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25uses_stream = ::hilti::rt::Bool(false); |
530 | | const ::hilti::rt::Bool _t_feat0x25HTTP0x400x40Version0x25uses_sync_advance = ::hilti::rt::Bool(false); |
531 | | } |
532 | | |
533 | | namespace hlt_HTTP_Request::HTTP::Replies { |
534 | | using Type = hlt_internal_HTTP_Request::HTTP::Replies; |
535 | | } |
536 | | |
537 | | namespace hlt_HTTP_Request::HTTP::Requests { |
538 | | using Type = hlt_internal_HTTP_Request::HTTP::Requests; |
539 | | } |
540 | | |
541 | | namespace hilti::rt::detail::adl { |
542 | | inline auto to_string(hlt_internal_HTTP_Request::HTTP::DeliveryMode x, adl::tag) -> std::string; |
543 | | } |
544 | | |
545 | | namespace hlt_internal_HTTP_Request::HTTP { |
546 | | inline auto operator<<(std::ostream& o, DeliveryMode x) -> std::ostream&; |
547 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Message& x) -> std::ostream&; |
548 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Header& x) -> std::ostream&; |
549 | | extern void _t_hook_Message__t_on_end_of_hdr(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>& _t_self); |
550 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Body& x) -> std::ostream&; |
551 | | extern void _t_hook_Message__t_on_0x25_init(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>& _t_self); |
552 | 123k | Message::Message() { |
553 | 123k | } |
554 | | |
555 | 40.9k | Message::Message(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::Bool& _t_p_body_default, const ::hilti::rt::Bool& _t_p_is_request) : _t_p_body_default(_t_p_body_default), _t_p_is_request(_t_p_is_request) { |
556 | 40.9k | { |
557 | 40.9k | content_type = ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make("TEXT"_b), ::hilti::rt::optional::make("PLAIN"_b)); |
558 | 40.9k | delivery_mode = HTTP::DeliveryMode{HTTP::DeliveryMode::EndOfData}; |
559 | 40.9k | } |
560 | 40.9k | } |
561 | | |
562 | 0 | Message::Message(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>>> headers, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>>> body, ::hilti::rt::Optional<::hilti::rt::Bool> has_body, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> content_encoding, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> content_length, ::hilti::rt::Optional<::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes>> content_type, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> content_type_parameter, ::hilti::rt::Optional<HTTP::DeliveryMode> delivery_mode, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> multipart_boundary, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> transfer_encoding) : Message() { |
563 | 0 | if ( headers ) this->headers = std::move(*headers); |
564 | 0 | if ( body ) this->body = std::move(*body); |
565 | 0 | if ( has_body ) this->has_body = std::move(*has_body); |
566 | 0 | if ( content_encoding ) this->content_encoding = std::move(*content_encoding); |
567 | 0 | if ( content_length ) this->content_length = std::move(*content_length); |
568 | 0 | if ( content_type ) this->content_type = std::move(*content_type); |
569 | 0 | if ( content_type_parameter ) this->content_type_parameter = std::move(*content_type_parameter); |
570 | 0 | if ( delivery_mode ) this->delivery_mode = std::move(*delivery_mode); |
571 | 0 | if ( multipart_boundary ) this->multipart_boundary = std::move(*multipart_boundary); |
572 | 0 | if ( transfer_encoding ) this->transfer_encoding = std::move(*transfer_encoding); |
573 | 0 | } |
574 | | |
575 | | |
576 | | extern void _t_hook_Header__t_on_content(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_self); |
577 | 0 | Header::Header() { |
578 | 0 | } |
579 | | |
580 | 178k | Header::Header(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>& _t_p_msg) : _t_p_msg(_t_p_msg) { |
581 | 178k | } |
582 | | |
583 | 0 | Header::Header(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> name, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> content) : Header() { |
584 | 0 | if ( name ) this->name = std::move(*name); |
585 | 0 | if ( content ) this->content = std::move(*content); |
586 | 0 | } |
587 | | |
588 | | |
589 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Chunks& x) -> std::ostream&; |
590 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Chunk& x) -> std::ostream&; |
591 | | extern void _t_hook_Chunks__t_on_trailer_foreach(const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_dd, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Chunks>& _t_self); |
592 | 0 | Chunks::Chunks() { |
593 | 0 | } |
594 | | |
595 | 4.57k | Chunks::Chunks(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_p_body, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>& _t_p_msg) : _t_p_body(_t_p_body), _t_p_msg(_t_p_msg) { |
596 | 4.57k | } |
597 | | |
598 | 0 | Chunks::Chunks(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>>> trailer) : Chunks() { |
599 | 0 | if ( trailer ) this->trailer = std::move(*trailer); |
600 | 0 | } |
601 | | |
602 | | |
603 | 0 | Chunk::Chunk() { |
604 | 0 | } |
605 | | |
606 | 13.4k | Chunk::Chunk(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_p_body) : _t_p_body(_t_p_body) { |
607 | 13.4k | } |
608 | | |
609 | 0 | Chunk::Chunk(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> length) : Chunk() { |
610 | 0 | if ( length ) this->length = std::move(*length); |
611 | 0 | } |
612 | | |
613 | | |
614 | | extern void _t_hook_Body__t_on__anon_18_foreach(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_self); |
615 | | extern void _t_hook_Body__t_on_0x25_init(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_self); |
616 | | extern void _t_hook_Body__t_on_0x25_done(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_self); |
617 | | extern void _t_hook_Body__t_on_0x25_error(const std::string& _t_except, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_self); |
618 | 39.2k | Body::Body() { |
619 | 39.2k | _t_p_delivery_mode = HTTP::DeliveryMode::Undef; |
620 | 39.2k | } |
621 | | |
622 | 25.7k | Body::Body(::hilti::rt::struct_::tag::Parameters, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>& _t_p_msg, const HTTP::DeliveryMode& _t_p_delivery_mode, const ::hilti::rt::Bool& _t_p_is_request) : _t_p_msg(_t_p_msg), _t_p_delivery_mode(_t_p_delivery_mode), _t_p_is_request(_t_p_is_request) { |
623 | 25.7k | data = ::hilti::rt::reference::make_strong<::spicy::rt::Sink>(); |
624 | 25.7k | } |
625 | | |
626 | 0 | Body::Body(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::StrongReference<::spicy::rt::Sink>> data) : Body() { |
627 | 0 | if ( data ) this->data = std::move(*data); |
628 | 0 | } |
629 | | |
630 | | |
631 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Content& x) -> std::ostream&; |
632 | | extern void _t_hook_Content__t_on_data(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Content>& _t_self); |
633 | 0 | Content::Content() { |
634 | 0 | } |
635 | | |
636 | 25.7k | Content::Content(::hilti::rt::struct_::tag::Parameters, const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>& _t_p_msg) : _t_p_msg(_t_p_msg) { |
637 | 25.7k | } |
638 | | |
639 | 0 | Content::Content(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::Bytes>> data) : Content() { |
640 | 0 | if ( data ) this->data = std::move(*data); |
641 | 0 | } |
642 | | |
643 | | |
644 | | extern void _t_hook_Body__t_on_0x25_done_b977(::hilti::rt::ValueReference<Body>& _t_self); |
645 | | extern void _t_hook_Body__t_on_0x25_done(::hilti::rt::ValueReference<Body>& _t_self); |
646 | | extern void _t_hook_Body__t_on_0x25_done_b977(::hilti::rt::ValueReference<Body>& _t_self); |
647 | | extern void _t_hook_Body__t_on_0x25_error_3735(const std::string& _t_except, ::hilti::rt::ValueReference<Body>& _t_self); |
648 | | extern void _t_hook_Body__t_on_0x25_error(const std::string& _t_except, ::hilti::rt::ValueReference<Body>& _t_self); |
649 | | extern void _t_hook_Body__t_on_0x25_error_3735(const std::string& _t_except, ::hilti::rt::ValueReference<Body>& _t_self); |
650 | | } |
651 | | |
652 | | namespace hlt_internal_HTTP_Request::filter { |
653 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::filter::Zlib& x) -> std::ostream&; |
654 | | extern void _t_hook_Zlib__t_on__anon_28(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::filter::Zlib>& _t_self); |
655 | | extern void _t_hook_Zlib__t_on_0x25_init(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::filter::Zlib>& _t_self); |
656 | | extern void _t_hook_Zlib__t_on_0x25_done(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::filter::Zlib>& _t_self); |
657 | | } |
658 | | |
659 | | namespace hlt_internal_HTTP_Request::HTTP { |
660 | | extern void _t_hook_Body__t_on_0x25_init_948(::hilti::rt::ValueReference<Body>& _t_self); |
661 | | extern void _t_hook_Body__t_on_0x25_init(::hilti::rt::ValueReference<Body>& _t_self); |
662 | | extern void _t_hook_Body__t_on_0x25_init_948(::hilti::rt::ValueReference<Body>& _t_self); |
663 | | extern void _t_hook_Body__t_on__anon_18_foreach_5059(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<Body>& _t_self); |
664 | | extern void _t_hook_Body__t_on__anon_18_foreach(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<Body>& _t_self); |
665 | | extern void _t_hook_Body__t_on__anon_18_foreach_5059(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<Body>& _t_self); |
666 | | } |
667 | | |
668 | | namespace hlt_HTTP_Request::HTTP::Body { |
669 | | extern auto parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
670 | | } |
671 | | |
672 | | namespace hlt_internal_HTTP_Request::HTTP { |
673 | | extern void _t_hook_Chunks__t_on_trailer_foreach_9de9(const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_dd, ::hilti::rt::ValueReference<Chunks>& _t_self); |
674 | | extern void _t_hook_Chunks__t_on_trailer_foreach(const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_dd, ::hilti::rt::ValueReference<Chunks>& _t_self); |
675 | | extern void _t_hook_Chunks__t_on_trailer_foreach_9de9(const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_dd, ::hilti::rt::ValueReference<Chunks>& _t_self); |
676 | | extern void _t_hook_Content__t_on_data_94d7(::hilti::rt::ValueReference<Content>& _t_self); |
677 | | extern void _t_hook_Content__t_on_data(::hilti::rt::ValueReference<Content>& _t_self); |
678 | | extern void _t_hook_Content__t_on_data_94d7(::hilti::rt::ValueReference<Content>& _t_self); |
679 | | } |
680 | | |
681 | | namespace hlt_HTTP_Request::HTTP::Content { |
682 | | extern auto parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Content>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
683 | | } |
684 | | |
685 | | namespace hlt_internal_HTTP_Request::HTTP { |
686 | | extern void _t_hook_Header__t_on_content_b0e0(::hilti::rt::ValueReference<Header>& _t_self); |
687 | | extern void _t_hook_Header__t_on_content(::hilti::rt::ValueReference<Header>& _t_self); |
688 | | extern void _t_hook_Header__t_on_content_b0e0(::hilti::rt::ValueReference<Header>& _t_self); |
689 | | extern void _t_hook_Message__t_on_0x25_init_ad09(::hilti::rt::ValueReference<Message>& _t_self); |
690 | | extern void _t_hook_Message__t_on_0x25_init(::hilti::rt::ValueReference<Message>& _t_self); |
691 | | extern void _t_hook_Message__t_on_0x25_init_ad09(::hilti::rt::ValueReference<Message>& _t_self); |
692 | | extern void _t_hook_Message__t_on_end_of_hdr_960d(::hilti::rt::ValueReference<Message>& _t_self); |
693 | | extern void _t_hook_Message__t_on_end_of_hdr(::hilti::rt::ValueReference<Message>& _t_self); |
694 | | extern void _t_hook_Message__t_on_end_of_hdr_960d(::hilti::rt::ValueReference<Message>& _t_self); |
695 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Version& x) -> std::ostream&; |
696 | 82.2k | Version::Version() { |
697 | 82.2k | } |
698 | | |
699 | | |
700 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::ReplyLine& x) -> std::ostream&; |
701 | 0 | ReplyLine::ReplyLine() { |
702 | 0 | } |
703 | | |
704 | 0 | ReplyLine::ReplyLine(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_HTTP_Request::HTTP::Version>> version, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>> status) : ReplyLine() { |
705 | 0 | if ( version ) this->version = std::move(*version); |
706 | 0 | if ( status ) this->status = std::move(*status); |
707 | 0 | } |
708 | | |
709 | | |
710 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Reply& x) -> std::ostream&; |
711 | 0 | Reply::Reply() { |
712 | 0 | } |
713 | | |
714 | 0 | Reply::Reply(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_HTTP_Request::HTTP::ReplyLine>> reply, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>>> message) : Reply() { |
715 | 0 | if ( reply ) this->reply = std::move(*reply); |
716 | 0 | if ( message ) this->message = std::move(*message); |
717 | 0 | } |
718 | | |
719 | | |
720 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Replies& x) -> std::ostream&; |
721 | 0 | Replies::Replies() { |
722 | 0 | } |
723 | | |
724 | | |
725 | | } |
726 | | |
727 | | namespace hlt_HTTP_Request::HTTP::Replies { |
728 | | extern auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
729 | | extern auto parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Replies>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
730 | | extern auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
731 | | } |
732 | | |
733 | | namespace hlt_internal_HTTP_Request::HTTP { |
734 | | static auto reply_code_needs_body(const ::hilti::rt::integer::safe<uint64_t>& status) -> ::hilti::rt::Bool; |
735 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::RequestLine& x) -> std::ostream&; |
736 | 82.8k | RequestLine::RequestLine() { |
737 | 82.8k | } |
738 | | |
739 | 0 | RequestLine::RequestLine(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_HTTP_Request::HTTP::Version>> version) : RequestLine() { |
740 | 0 | if ( version ) this->version = std::move(*version); |
741 | 0 | } |
742 | | |
743 | | |
744 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Request& x) -> std::ostream&; |
745 | 82.8k | Request::Request() { |
746 | 82.8k | } |
747 | | |
748 | 0 | Request::Request(::hilti::rt::struct_::tag::Inits, ::hilti::rt::Optional<::hilti::rt::Optional<hlt_internal_HTTP_Request::HTTP::RequestLine>> request, ::hilti::rt::Optional<::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>>> message) : Request() { |
749 | 0 | if ( request ) this->request = std::move(*request); |
750 | 0 | if ( message ) this->message = std::move(*message); |
751 | 0 | } |
752 | | |
753 | | |
754 | | extern auto operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Requests& x) -> std::ostream&; |
755 | 5.30k | Requests::Requests() { |
756 | 5.30k | } |
757 | | |
758 | | |
759 | | } |
760 | | |
761 | | namespace hlt_HTTP_Request::HTTP::Requests { |
762 | | extern auto parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
763 | | extern auto parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Requests>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
764 | | extern auto parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable; |
765 | | } |
766 | | |
767 | | namespace hlt_internal_HTTP_Request::HTTP { |
768 | | extern void _t_register_HTTP_Body(); |
769 | | extern void _t_register_HTTP_Chunk(); |
770 | | extern void _t_register_HTTP_Chunks(); |
771 | | extern void _t_register_HTTP_Content(); |
772 | | extern void _t_register_HTTP_Header(); |
773 | | extern void _t_register_HTTP_Message(); |
774 | | extern void _t_register_HTTP_Replies(); |
775 | | extern void _t_register_HTTP_Reply(); |
776 | | extern void _t_register_HTTP_ReplyLine(); |
777 | | extern void _t_register_HTTP_Request(); |
778 | | extern void _t_register_HTTP_RequestLine(); |
779 | | extern void _t_register_HTTP_Requests(); |
780 | | extern void _t_register_HTTP_Version(); |
781 | | extern void _t_init_module(); |
782 | | extern void _t_register_module(); |
783 | | } |
784 | | |
785 | | namespace hlt_internal_HTTP_Request::type_info { namespace { |
786 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__DeliveryMode_namex2aHTTP__DeliveryModex2b = { "HTTP::DeliveryMode", "HTTP::DeliveryMode", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const HTTP::DeliveryMode*>(self)); }, new ::hilti::rt::type_info::Enum(std::vector<::hilti::rt::type_info::enum_::Label>({::hilti::rt::type_info::enum_::Label{ "EndOfData", 0 }, ::hilti::rt::type_info::enum_::Label{ "Length", 1 }, ::hilti::rt::type_info::enum_::Label{ "Multipart", 2 }, ::hilti::rt::type_info::enum_::Label{ "Chunked", 3 }, ::hilti::rt::type_info::enum_::Label{ "Undef", -1 }})) }; |
787 | 0 | const ::hilti::rt::TypeInfo _t_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b = { "hilti::RecoverableFailure", "hilti::RecoverableFailure", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::RecoverableFailure*>(self)); }, new ::hilti::rt::type_info::Exception() }; |
788 | 0 | const ::hilti::rt::TypeInfo _t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b = { {}, "optional<spicy::RecoverableFailure>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>*>(self)); }, new ::hilti::rt::type_info::Optional(&type_info::_t_ti_hilti__RecoverableFailure_namex2ahilti__RecoverableFailurex2b, ::hilti::rt::type_info::Optional::accessor<::hilti::rt::RecoverableFailure>()) }; |
789 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Header_namex2aHTTP__Headerx2b = { "HTTP::Header", "HTTP::Header", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Header*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "name", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Header, name)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "content", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Header, content)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Header, _t_error)), true, false, true }})) }; |
790 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_Header__value_refx2anamex2aHTTP__Headerx2bx2b = { {}, "value_ref<Header>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_HTTP__Header_namex2aHTTP__Headerx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_HTTP_Request::HTTP::Header>()) }; |
791 | 0 | const ::hilti::rt::TypeInfo _t_ti_vector_value_ref_Header___vectorx2anamex2aHTTP__Headerx2bx2b = { {}, "vector<value_ref<Header>>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>*>(self)); }, new ::hilti::rt::type_info::Vector(&type_info::_t_ti_value_ref_Header__value_refx2anamex2aHTTP__Headerx2bx2b, ::hilti::rt::type_info::Vector::accessor<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>()) }; |
792 | 0 | const ::hilti::rt::TypeInfo _t_ti_spicy_rt__Sink_namex2aspicy_rt__Sinkx2b = { "spicy_rt::Sink", "spicy_rt::Sink", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::spicy::rt::Sink*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({})) }; |
793 | 0 | const ::hilti::rt::TypeInfo _t_ti_strong_ref_spicy_rt__Sink__strong_refx2anamex2aspicy_rt__Sinkx2bx2b = { {}, "strong_ref<spicy_rt::Sink>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<::spicy::rt::Sink>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_t_ti_spicy_rt__Sink_namex2aspicy_rt__Sinkx2b, ::hilti::rt::type_info::StrongReference::accessor<::spicy::rt::Sink>()) }; |
794 | 0 | const ::hilti::rt::TypeInfo _t_ti_spicy_rt__SinkState_libraryx2aspicy__rt__sink__detail__Statex2cx2b = { "spicy_rt::SinkState", "spicy_rt::SinkState", [](const void *self) { return "<::spicy::rt::sink::detail::State*>"s; }, new ::hilti::rt::type_info::Library("::spicy::rt::sink::detail::State*") }; |
795 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Body_namex2aHTTP__Bodyx2b = { "HTTP::Body", "HTTP::Body", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Body*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "data", &type_info::_t_ti_strong_ref_spicy_rt__Sink__strong_refx2anamex2aspicy_rt__Sinkx2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Body, data)), true, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_sink", &type_info::_t_ti_spicy_rt__SinkState_libraryx2aspicy__rt__sink__detail__Statex2cx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Body, _t_sink)), true, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Body, _t_error)), true, false, true }})) }; |
796 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_Body__value_refx2anamex2aHTTP__Bodyx2bx2b = { {}, "value_ref<Body>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_HTTP__Body_namex2aHTTP__Bodyx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_HTTP_Request::HTTP::Body>()) }; |
797 | 0 | const ::hilti::rt::TypeInfo _t_ti_tuple_bytes__bytes__tuplex2abytes_bytes_x2b = { {}, "tuple<bytes, bytes>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes>*>(self)); }, new ::hilti::rt::type_info::Tuple(std::vector<::hilti::rt::type_info::tuple::Element>({::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::bytes, ::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes>::elementOffset<0>() }, ::hilti::rt::type_info::tuple::Element{ "", &::hilti::rt::type_info::bytes, ::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes>::elementOffset<1>() }})) }; |
798 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Message_namex2aHTTP__Messagex2b = { "HTTP::Message", "HTTP::Message", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Message*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "headers", &type_info::_t_ti_vector_value_ref_Header___vectorx2anamex2aHTTP__Headerx2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, headers)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>>() }, ::hilti::rt::type_info::struct_::Field{ "end_of_hdr", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "body", &type_info::_t_ti_value_ref_Body__value_refx2anamex2aHTTP__Bodyx2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, body)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>>() }, ::hilti::rt::type_info::struct_::Field{ "has_body", &::hilti::rt::type_info::bool_, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, has_body)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "is_request", &::hilti::rt::type_info::bool_, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "content_encoding", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, content_encoding)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "use_content_length", &::hilti::rt::type_info::bool_, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "body_len", &::hilti::rt::type_info::uint64, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "content_length", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, content_length)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint64_t>>() }, ::hilti::rt::type_info::struct_::Field{ "content_type", &type_info::_t_ti_tuple_bytes__bytes__tuplex2abytes_bytes_x2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, content_type)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "content_type_parameter", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, content_type_parameter)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "delivery_mode", &type_info::_t_ti_HTTP__DeliveryMode_namex2aHTTP__DeliveryModex2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, delivery_mode)), false, false, true }, ::hilti::rt::type_info::struct_::Field{ "multipart_boundary", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, multipart_boundary)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "transfer_encoding", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, transfer_encoding)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Message, _t_error)), true, false, true }})) }; |
799 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Chunks_namex2aHTTP__Chunksx2b = { "HTTP::Chunks", "HTTP::Chunks", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Chunks*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "trailer", &type_info::_t_ti_vector_value_ref_Header___vectorx2anamex2aHTTP__Headerx2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Chunks, trailer)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Chunks, _t_error)), true, false, true }})) }; |
800 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Chunk_namex2aHTTP__Chunkx2b = { "HTTP::Chunk", "HTTP::Chunk", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Chunk*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "length", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(HTTP::Chunk, length)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint64_t>>() }, ::hilti::rt::type_info::struct_::Field{ "extension", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Chunk, _t_error)), true, false, true }})) }; |
801 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Content_namex2aHTTP__Contentx2b = { "HTTP::Content", "HTTP::Content", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Content*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "data", &::hilti::rt::type_info::bytes, static_cast<std::ptrdiff_t>(offsetof(HTTP::Content, data)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::Bytes>() }, ::hilti::rt::type_info::struct_::Field{ "have_content", &::hilti::rt::type_info::bool_, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_sink", &type_info::_t_ti_spicy_rt__SinkState_libraryx2aspicy__rt__sink__detail__Statex2cx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Content, _t_sink)), true, false, true }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Content, _t_error)), true, false, true }})) }; |
802 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Version_namex2aHTTP__Versionx2b = { "HTTP::Version", "HTTP::Version", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Version*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "number", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Version, _t_error)), true, false, true }})) }; |
803 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__ReplyLine_namex2aHTTP__ReplyLinex2b = { "HTTP::ReplyLine", "HTTP::ReplyLine", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::ReplyLine*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "version", &type_info::_t_ti_HTTP__Version_namex2aHTTP__Versionx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::ReplyLine, version)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_HTTP_Request::HTTP::Version>() }, ::hilti::rt::type_info::struct_::Field{ "status", &::hilti::rt::type_info::uint64, static_cast<std::ptrdiff_t>(offsetof(HTTP::ReplyLine, status)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::integer::safe<uint64_t>>() }, ::hilti::rt::type_info::struct_::Field{ "reason", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::ReplyLine, _t_error)), true, false, true }})) }; |
804 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_Message__value_refx2anamex2aHTTP__Messagex2bx2b = { {}, "value_ref<Message>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_HTTP__Message_namex2aHTTP__Messagex2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_HTTP_Request::HTTP::Message>()) }; |
805 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Reply_namex2aHTTP__Replyx2b = { "HTTP::Reply", "HTTP::Reply", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Reply*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "reply", &type_info::_t_ti_HTTP__ReplyLine_namex2aHTTP__ReplyLinex2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Reply, reply)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_HTTP_Request::HTTP::ReplyLine>() }, ::hilti::rt::type_info::struct_::Field{ "message", &type_info::_t_ti_value_ref_Message__value_refx2anamex2aHTTP__Messagex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Reply, message)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Reply, _t_error)), true, false, true }})) }; |
806 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Replies_namex2aHTTP__Repliesx2b = { "HTTP::Replies", "HTTP::Replies", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Replies*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Replies, _t_error)), true, false, true }})) }; |
807 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_HTTP__Replies__value_refx2anamex2aHTTP__Repliesx2bx2b = { {}, "value_ref<HTTP::Replies>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Replies>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_HTTP__Replies_namex2aHTTP__Repliesx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_HTTP_Request::HTTP::Replies>()) }; |
808 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__RequestLine_namex2aHTTP__RequestLinex2b = { "HTTP::RequestLine", "HTTP::RequestLine", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::RequestLine*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "method", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "uri", &::hilti::rt::type_info::bytes, std::ptrdiff_t{-1}, false, false, false }, ::hilti::rt::type_info::struct_::Field{ "version", &type_info::_t_ti_HTTP__Version_namex2aHTTP__Versionx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::RequestLine, version)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_HTTP_Request::HTTP::Version>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::RequestLine, _t_error)), true, false, true }})) }; |
809 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Request_namex2aHTTP__Requestx2b = { "HTTP::Request", "HTTP::Request", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Request*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "request", &type_info::_t_ti_HTTP__RequestLine_namex2aHTTP__RequestLinex2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Request, request)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<hlt_internal_HTTP_Request::HTTP::RequestLine>() }, ::hilti::rt::type_info::struct_::Field{ "message", &type_info::_t_ti_value_ref_Message__value_refx2anamex2aHTTP__Messagex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Request, message)), false, false, true, ::hilti::rt::type_info::struct_::Field::accessor_optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message>>() }, ::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Request, _t_error)), true, false, true }})) }; |
810 | 0 | const ::hilti::rt::TypeInfo _t_ti_HTTP__Requests_namex2aHTTP__Requestsx2b = { "HTTP::Requests", "HTTP::Requests", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const hlt_internal_HTTP_Request::HTTP::Requests*>(self)); }, new ::hilti::rt::type_info::Struct(std::vector<::hilti::rt::type_info::struct_::Field>({::hilti::rt::type_info::struct_::Field{ "_t_error", &type_info::_t_ti_optional_spicy__RecoverableFailure__optionalx2anamex2ahilti__RecoverableFailurex2bx2b, static_cast<std::ptrdiff_t>(offsetof(HTTP::Requests, _t_error)), true, false, true }})) }; |
811 | 0 | const ::hilti::rt::TypeInfo _t_ti_value_ref_HTTP__Requests__value_refx2anamex2aHTTP__Requestsx2bx2b = { {}, "value_ref<HTTP::Requests>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Requests>*>(self)); }, new ::hilti::rt::type_info::ValueReference(&type_info::_t_ti_HTTP__Requests_namex2aHTTP__Requestsx2b, ::hilti::rt::type_info::ValueReference::accessor<hlt_internal_HTTP_Request::HTTP::Requests>()) }; |
812 | 0 | const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Body__strong_refx2anamex2aHTTP__Bodyx2bx2b = { {}, "strong_ref<const HTTP::Body>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Body>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_t_ti_HTTP__Body_namex2aHTTP__Bodyx2b, ::hilti::rt::type_info::StrongReference::accessor<hlt_internal_HTTP_Request::HTTP::Body>()) }; |
813 | 0 | const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Content__strong_refx2anamex2aHTTP__Contentx2bx2b = { {}, "strong_ref<const HTTP::Content>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Content>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_t_ti_HTTP__Content_namex2aHTTP__Contentx2b, ::hilti::rt::type_info::StrongReference::accessor<hlt_internal_HTTP_Request::HTTP::Content>()) }; |
814 | 0 | const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Replies__strong_refx2anamex2aHTTP__Repliesx2bx2b = { {}, "strong_ref<const HTTP::Replies>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Replies>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_t_ti_HTTP__Replies_namex2aHTTP__Repliesx2b, ::hilti::rt::type_info::StrongReference::accessor<hlt_internal_HTTP_Request::HTTP::Replies>()) }; |
815 | 0 | const ::hilti::rt::TypeInfo _t_ti_strong_ref_const_HTTP__Requests__strong_refx2anamex2aHTTP__Requestsx2bx2b = { {}, "strong_ref<const HTTP::Requests>", [](const void *self) { return hilti::rt::to_string(*reinterpret_cast<const ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Requests>*>(self)); }, new ::hilti::rt::type_info::StrongReference(&type_info::_t_ti_HTTP__Requests_namex2aHTTP__Requestsx2b, ::hilti::rt::type_info::StrongReference::accessor<hlt_internal_HTTP_Request::HTTP::Requests>()) }; |
816 | | } } |
817 | | |
818 | | HILTI_PRE_INIT(hlt_internal_HTTP_Request::HTTP::_t_register_module) |
819 | | |
820 | 0 | inline auto ::hilti::rt::detail::adl::to_string(hlt_internal_HTTP_Request::HTTP::DeliveryMode x, adl::tag) -> std::string { |
821 | 0 | switch ( x.value() ) { |
822 | 0 | case hlt_internal_HTTP_Request::HTTP::DeliveryMode::Chunked: return "DeliveryMode::Chunked"; |
823 | 0 | case hlt_internal_HTTP_Request::HTTP::DeliveryMode::Multipart: return "DeliveryMode::Multipart"; |
824 | 0 | case hlt_internal_HTTP_Request::HTTP::DeliveryMode::Length: return "DeliveryMode::Length"; |
825 | 0 | case hlt_internal_HTTP_Request::HTTP::DeliveryMode::EndOfData: return "DeliveryMode::EndOfData"; |
826 | 0 | case hlt_internal_HTTP_Request::HTTP::DeliveryMode::Undef: return "DeliveryMode::Undef"; |
827 | 0 | default: return ::hilti::rt::fmt("DeliveryMode::<unknown-%" PRIu64 ">", x.value()); |
828 | 0 | } |
829 | 0 | } |
830 | | |
831 | 0 | extern auto hlt_HTTP_Request::HTTP::Body::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
832 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_unit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
833 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
834 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
835 | 0 | return hlt_internal_HTTP_Request::HTTP::Body::parse2(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
836 | 0 | }; |
837 | |
|
838 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
839 | 0 | r->run(); |
840 | 0 | return std::move(*r); |
841 | 0 | } |
842 | | |
843 | 25.7k | extern auto hlt_HTTP_Request::HTTP::Content::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Content>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
844 | 25.7k | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_unit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
845 | 25.7k | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
846 | 25.7k | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
847 | 25.7k | return hlt_internal_HTTP_Request::HTTP::Content::parse2(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
848 | 25.7k | }; |
849 | | |
850 | 25.7k | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
851 | 25.7k | r->run(); |
852 | 25.7k | return std::move(*r); |
853 | 25.7k | } |
854 | | |
855 | 0 | extern auto hlt_HTTP_Request::HTTP::Replies::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
856 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
857 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
858 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
859 | 0 | return hlt_internal_HTTP_Request::HTTP::Replies::parse1(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap)); |
860 | 0 | }; |
861 | |
|
862 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
863 | 0 | r->run(); |
864 | 0 | return std::move(*r); |
865 | 0 | } |
866 | | |
867 | 0 | extern auto hlt_HTTP_Request::HTTP::Replies::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Replies>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
868 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_unit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
869 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
870 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
871 | 0 | return hlt_internal_HTTP_Request::HTTP::Replies::parse2(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
872 | 0 | }; |
873 | |
|
874 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
875 | 0 | r->run(); |
876 | 0 | return std::move(*r); |
877 | 0 | } |
878 | | |
879 | 0 | extern auto hlt_HTTP_Request::HTTP::Replies::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
880 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_gunit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
881 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
882 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
883 | 0 | return hlt_internal_HTTP_Request::HTTP::Replies::parse3(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
884 | 0 | }; |
885 | |
|
886 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
887 | 0 | r->run(); |
888 | 0 | return std::move(*r); |
889 | 0 | } |
890 | | |
891 | 5.30k | extern auto hlt_HTTP_Request::HTTP::Requests::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
892 | 5.30k | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
893 | 5.30k | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
894 | 5.30k | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
895 | 5.30k | return hlt_internal_HTTP_Request::HTTP::Requests::parse1(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap)); |
896 | 5.30k | }; |
897 | | |
898 | 5.30k | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
899 | 5.30k | r->run(); |
900 | 5.30k | return std::move(*r); |
901 | 5.30k | } |
902 | | |
903 | 0 | extern auto hlt_HTTP_Request::HTTP::Requests::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Requests>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
904 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_unit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
905 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
906 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
907 | 0 | return hlt_internal_HTTP_Request::HTTP::Requests::parse2(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
908 | 0 | }; |
909 | |
|
910 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
911 | 0 | r->run(); |
912 | 0 | return std::move(*r); |
913 | 0 | } |
914 | | |
915 | 0 | extern auto hlt_HTTP_Request::HTTP::Requests::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::Resumable { |
916 | 0 | auto args = std::make_tuple(::hilti::rt::resumable::detail::copyArg(_t_gunit), ::hilti::rt::resumable::detail::copyArg(_t_data), ::hilti::rt::resumable::detail::copyArg(_t_cur), ::hilti::rt::resumable::detail::copyArg(_t_context)); |
917 | 0 | auto args_on_heap = std::make_shared<decltype(args)>(std::move(args)); |
918 | 0 | auto cb = [args_on_heap = std::move(args_on_heap)](::hilti::rt::resumable::Handle* r) -> ::hilti::rt::any { |
919 | 0 | return hlt_internal_HTTP_Request::HTTP::Requests::parse3(std::get<0>(*args_on_heap), std::get<1>(*args_on_heap), std::get<2>(*args_on_heap), std::get<3>(*args_on_heap)); |
920 | 0 | }; |
921 | |
|
922 | 0 | auto r = std::make_unique<::hilti::rt::Resumable>(std::move(cb)); |
923 | 0 | r->run(); |
924 | 0 | return std::move(*r); |
925 | 0 | } |
926 | | |
927 | 23.8k | inline void hlt_internal_HTTP_Request::HTTP::Body::_t_on_0x25_done() { |
928 | 23.8k | auto _t_self = HTTP::Body::_t_self(); |
929 | 23.8k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on_0x25_done(_t_self); |
930 | 23.8k | } |
931 | | |
932 | 184 | inline void hlt_internal_HTTP_Request::HTTP::Body::_t_on_0x25_error(const std::string& _t_except) { |
933 | 184 | auto _t_self = HTTP::Body::_t_self(); |
934 | 184 | return hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on_0x25_error(_t_except, _t_self); |
935 | 184 | } |
936 | | |
937 | 25.7k | inline void hlt_internal_HTTP_Request::HTTP::Body::_t_on_0x25_init() { |
938 | 25.7k | auto _t_self = HTTP::Body::_t_self(); |
939 | 25.7k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on_0x25_init(_t_self); |
940 | 25.7k | } |
941 | | |
942 | 302k | inline void hlt_internal_HTTP_Request::HTTP::Body::_t_on__anon_18_foreach(const ::hilti::rt::Bytes& _t_dd) { |
943 | 302k | auto _t_self = HTTP::Body::_t_self(); |
944 | 302k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on__anon_18_foreach(_t_dd, _t_self); |
945 | 302k | } |
946 | | |
947 | 25.7k | auto hlt_internal_HTTP_Request::HTTP::Body::_t_parse_HTTP__Body_6_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
948 | 25.7k | auto _t_self = Body::_t_self(); |
949 | 25.7k | ::hilti::rt::detail::checkStack(); |
950 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
951 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:146:5-156:6"); |
952 | | |
953 | | // Begin parsing production: Switch: switch_6 -> [DeliveryMode::EndOfData] -> switch_6_case_1 | [DeliveryMode::Length] -> switch_6_case_2 | [DeliveryMode::Multipart] -> switch_6_case_3 | [DeliveryMode::Chunked] -> switch_6_case_4; |
954 | 25.7k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self)._t_parse_switch_6_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
955 | | // End parsing production: Switch: switch_6 -> [DeliveryMode::EndOfData] -> switch_6_case_1 | [DeliveryMode::Length] -> switch_6_case_2 | [DeliveryMode::Multipart] -> switch_6_case_3 | [DeliveryMode::Chunked] -> switch_6_case_4; |
956 | | |
957 | 25.7k | (*_t_self)._t_error = _t_error; |
958 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
959 | 25.7k | (*_t_self)._t_on_0x25_done(); |
960 | 25.7k | _t_error = (*_t_self)._t_error; |
961 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
962 | 25.7k | (*(*_t_self).data).close(); |
963 | 25.7k | ::hilti::rt::debug::dedent("spicy"sv); |
964 | 25.7k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
965 | 25.7k | } |
966 | | |
967 | 2.88k | auto hlt_internal_HTTP_Request::HTTP::Body::_t_parse__anon_18_6_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::Bytes>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
968 | 2.88k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_1; |
969 | 2.88k | auto _t_self = Body::_t_self(); |
970 | 2.88k | ::hilti::rt::detail::checkStack(); |
971 | 2.88k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:152:34-153:67"); |
972 | 305k | while ( ! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_1=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>())))) ) { |
973 | 305k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_3; |
974 | 305k | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
975 | 305k | ::hilti::rt::Bytes _t_elem; |
976 | 305k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:14:20-14:34"); |
977 | | |
978 | | // Begin parsing production: Ctor: _anon_17_6 -> /[^\r\n]*\r?\n/ (regexp) (container '_anon_18'); |
979 | 305k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
980 | 305k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_14.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
981 | 305k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
982 | 305k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:14:20-14:34"); |
983 | 305k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
984 | 305k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
985 | 47 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_2; |
986 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
987 | 47 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_2=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
988 | 47 | continue; |
989 | 47 | } |
990 | | |
991 | 305k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
992 | 1 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:14:20-14:34"); |
993 | 1 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:14:20-14:34"); |
994 | 1 | } |
995 | | |
996 | 305k | else { |
997 | 305k | ms.captures(_t_cur); |
998 | 305k | _t_elem = _t_cur.sub(_t_ncur.begin()).data(); |
999 | 305k | _t_cur = _t_ncur; |
1000 | 305k | if ( _t_trim ) { |
1001 | 305k | (*_t_data).trim(_t_cur.begin()); |
1002 | 305k | } |
1003 | | |
1004 | 305k | break; |
1005 | 305k | } |
1006 | 305k | } |
1007 | | |
1008 | | // End parsing production: Ctor: _anon_17_6 -> /[^\r\n]*\r?\n/ (regexp) (container '_anon_18'); |
1009 | | |
1010 | 305k | ::hilti::rt::Bool _t_stop = ::hilti::rt::Bool(false); |
1011 | 305k | ::hilti::rt::Bytes _t_dd = _t_elem; |
1012 | 305k | _t_stop = (_t_stop) || ((_t_dd == (*_t_self->_t_p_msg.derefAsValue()).multipart_boundary.value())); |
1013 | 305k | if ( ! (_t_stop) ) { |
1014 | 302k | (*_t_self)._t_error = _t_error; |
1015 | 302k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:152:34-153:67"); |
1016 | 302k | (*_t_self)._t_on__anon_18_foreach(_t_elem); |
1017 | 302k | _t_error = (*_t_self)._t_error; |
1018 | 302k | } |
1019 | | |
1020 | 305k | if ( ! (_t_stop) ) { |
1021 | 302k | _t_dst.emplace_back(_t_elem); |
1022 | 302k | } |
1023 | | |
1024 | 305k | if ( _t_stop ) { |
1025 | 2.44k | break; |
1026 | 2.44k | } |
1027 | | |
1028 | 302k | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_3=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
1029 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:152:34-153:67"); |
1030 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:152:34-153:67"); |
1031 | 0 | } |
1032 | 302k | } |
1033 | | |
1034 | 2.88k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
1035 | 2.88k | } |
1036 | | |
1037 | 25.7k | auto hlt_internal_HTTP_Request::HTTP::Body::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1038 | 25.7k | auto _t_self = Body::_t_self(); |
1039 | 25.7k | ::hilti::rt::detail::checkStack(); |
1040 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
1041 | 25.7k | ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> _t_result; |
1042 | 25.7k | try { |
1043 | 25.7k | ::hilti::rt::debug::indent("spicy"sv); |
1044 | 25.7k | ::hilti::rt::stream::SafeConstIterator _t_begin = _t_cur.begin(); |
1045 | 25.7k | (*_t_self)._t_error = _t_error; |
1046 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
1047 | 25.7k | (*_t_self)._t_on_0x25_init(); |
1048 | 25.7k | _t_error = (*_t_self)._t_error; |
1049 | 25.7k | _t_result = (*_t_self)._t_parse_HTTP__Body_6_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
1050 | 25.7k | } |
1051 | 25.7k | catch ( const ::std::exception& _t_except ) { |
1052 | 184 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
1053 | 184 | (*_t_self)._t_on_0x25_error(::hilti::rt::exception::what(_t_except)); |
1054 | 184 | (*(*_t_self).data).close(); |
1055 | 184 | throw; |
1056 | 184 | } |
1057 | | |
1058 | 23.8k | return _t_result; |
1059 | 25.7k | } |
1060 | | |
1061 | 25.7k | auto hlt_internal_HTTP_Request::HTTP::Body::_t_parse_switch_6_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1062 | 25.7k | auto _t_self = Body::_t_self(); |
1063 | 25.7k | ::hilti::rt::detail::checkStack(); |
1064 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:146:5-156:6"); |
1065 | 25.7k | ::hilti::rt::debug::indent("spicy"sv); |
1066 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:146:5-156:6"); |
1067 | 25.7k | if ( HTTP::DeliveryMode _t_x = _t_self->_t_p_delivery_mode; _t_x == HTTP::DeliveryMode{HTTP::DeliveryMode::EndOfData} ) { |
1068 | 199 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:148:7-148:68"); |
1069 | 199 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:148:7-148:68"); |
1070 | | |
1071 | | // Begin parsing production: Block: switch_6_case_1 -> _anon_15_6; |
1072 | 199 | ::hilti::rt::debug::indent("spicy"sv); |
1073 | 199 | ::hilti::rt::Bytes _t_transient__anon_15; |
1074 | 199 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:148:36-148:40"); |
1075 | | |
1076 | | // Begin parsing production: Variable: _anon_15_6 -> bytes; |
1077 | 528 | while ( ::hilti::rt::Bool(true) ) { |
1078 | 329 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_4; |
1079 | 329 | ::hilti::rt::Bool more_data = ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_4=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1080 | 329 | if ( ::hilti::rt::Bool(static_cast<bool>(_t_cur.size())) ) { |
1081 | 164 | _t_transient__anon_15 = _t_cur.data(); |
1082 | 164 | _t_cur = _t_cur.advance(_t_cur.size()); |
1083 | 164 | if ( _t_trim ) { |
1084 | 164 | (*_t_data).trim(_t_cur.begin()); |
1085 | 164 | } |
1086 | | |
1087 | 164 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:148:34-148:68"); |
1088 | 164 | (*(*_t_self).data).write(_t_transient__anon_15, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(), ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>()); |
1089 | 164 | } |
1090 | | |
1091 | 329 | if ( ! (more_data) ) { |
1092 | 0 | break; |
1093 | 0 | } |
1094 | 329 | } |
1095 | | |
1096 | 199 | if ( _t_trim ) { |
1097 | 0 | (*_t_data).trim(_t_cur.begin()); |
1098 | 0 | } |
1099 | | |
1100 | | // End parsing production: Variable: _anon_15_6 -> bytes; |
1101 | | |
1102 | 199 | ::hilti::rt::debug::dedent("spicy"sv); |
1103 | | // End parsing production: Block: switch_6_case_1 -> _anon_15_6; |
1104 | 199 | } |
1105 | | |
1106 | 25.5k | else if ( _t_x == HTTP::DeliveryMode{HTTP::DeliveryMode::Length} ) { |
1107 | 18.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:150:7-150:93"); |
1108 | 18.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:150:7-150:93"); |
1109 | | |
1110 | | // Begin parsing production: Block: switch_6_case_2 -> _anon_16_6; |
1111 | 18.1k | ::hilti::rt::debug::indent("spicy"sv); |
1112 | 18.1k | ::hilti::rt::Bytes _t_transient__anon_16; |
1113 | 18.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:150:36-150:40"); |
1114 | | |
1115 | | // Begin parsing production: Variable: _anon_16_6 -> bytes; |
1116 | 18.1k | ::hilti::rt::integer::safe<uint64_t> _t_size = (*_t_self->_t_p_msg.derefAsValue()).content_length.value(); |
1117 | 18.1k | ::hilti::rt::stream::View _t_limited_ = _t_cur.limit(_t_size); |
1118 | 18.1k | ::hilti::rt::stream::View _t_ncur = _t_cur.advance(_t_size); |
1119 | 29.2k | while ( ::hilti::rt::Bool(true) ) { |
1120 | 28.6k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_5; |
1121 | 28.6k | ::hilti::rt::Bool more_data = ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_limited_, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_5=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1122 | 28.6k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_limited_.size())) ) { |
1123 | 10.5k | _t_transient__anon_16 = _t_limited_.data(); |
1124 | 10.5k | _t_limited_ = _t_limited_.advance(_t_limited_.size()); |
1125 | 10.5k | if ( _t_trim ) { |
1126 | 10.5k | (*_t_data).trim(_t_limited_.begin()); |
1127 | 10.5k | } |
1128 | | |
1129 | 10.5k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:150:34-150:93"); |
1130 | 10.5k | (*(*_t_self).data).write(_t_transient__anon_16, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(), ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>()); |
1131 | 10.5k | } |
1132 | | |
1133 | 28.6k | if ( ! (more_data) ) { |
1134 | 17.5k | break; |
1135 | 17.5k | } |
1136 | 28.6k | } |
1137 | | |
1138 | 18.1k | _t_limited_ = _t_limited_.advance(_t_limited_.end()); |
1139 | 18.1k | if ( _t_trim ) { |
1140 | 17.5k | (*_t_data).trim(_t_limited_.begin()); |
1141 | 17.5k | } |
1142 | | |
1143 | 18.1k | if ( _t_trim ) { |
1144 | 17.5k | (*_t_data).trim(_t_limited_.begin()); |
1145 | 17.5k | } |
1146 | | |
1147 | | // End parsing production: Variable: _anon_16_6 -> bytes; |
1148 | | |
1149 | 18.1k | _t_cur = _t_ncur; |
1150 | 18.1k | ::hilti::rt::debug::dedent("spicy"sv); |
1151 | | // End parsing production: Block: switch_6_case_2 -> _anon_16_6; |
1152 | 18.1k | } |
1153 | | |
1154 | 7.46k | else if ( _t_x == HTTP::DeliveryMode{HTTP::DeliveryMode::Multipart} ) { |
1155 | 2.88k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:152:7-153:67"); |
1156 | 2.88k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:152:7-153:67"); |
1157 | | |
1158 | | // Begin parsing production: Block: switch_6_case_3 -> _anon_18_6; |
1159 | 2.88k | ::hilti::rt::debug::indent("spicy"sv); |
1160 | 2.88k | ::hilti::rt::Vector<::hilti::rt::Bytes> _t_transient__anon_18; |
1161 | 2.88k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:152:34-153:67"); |
1162 | | |
1163 | | // Begin parsing production: ForEach: _anon_18_6 -> foreach: _anon_17_6; |
1164 | 2.88k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_error), (*_t_self)._t_parse__anon_18_6_stage1(_t_data, _t_cur, _t_trim, _t_error, _t_transient__anon_18)); |
1165 | | // End parsing production: ForEach: _anon_18_6 -> foreach: _anon_17_6; |
1166 | | |
1167 | 2.88k | ::hilti::rt::debug::dedent("spicy"sv); |
1168 | | // End parsing production: Block: switch_6_case_3 -> _anon_18_6; |
1169 | 2.88k | } |
1170 | | |
1171 | 4.57k | else if ( _t_x == HTTP::DeliveryMode{HTTP::DeliveryMode::Chunked} ) { |
1172 | 4.57k | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message> _t_lhs_6; |
1173 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:155:7-155:53"); |
1174 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:155:7-155:53"); |
1175 | | |
1176 | | // Begin parsing production: Block: switch_6_case_4 -> Resolved_59; |
1177 | 4.57k | ::hilti::rt::debug::indent("spicy"sv); |
1178 | 4.57k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Chunks>> _t_transient__anon_19; |
1179 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:199:15-204:1"); |
1180 | | |
1181 | | // Begin parsing production: Unit: HTTP__Chunks_6 -> _anon_21_6 trailer_6 _anon_23_6 (field '_anon_19', id n/a, parser, args: (self, msg)); |
1182 | 4.57k | _t_transient__anon_19 = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Chunks>>((hlt_internal_HTTP_Request::HTTP::Chunks(::hilti::rt::struct_::tag::Parameters(), _t_self, (_t_lhs_6=(_t_self->_t_p_msg.derefAsValue()).asSharedPtr())))); |
1183 | 4.57k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_transient__anon_19.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
1184 | | // End parsing production: Unit: HTTP__Chunks_6 -> _anon_21_6 trailer_6 _anon_23_6 (field '_anon_19', id n/a, parser, args: (self, msg)); |
1185 | | |
1186 | 4.57k | ::hilti::rt::debug::dedent("spicy"sv); |
1187 | | // End parsing production: Block: switch_6_case_4 -> Resolved_59; |
1188 | 4.57k | } |
1189 | | |
1190 | 0 | else { |
1191 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:146:5-156:6"); |
1192 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("no matching case in switch statement for value '%s'"sv, _t_self->_t_p_delivery_mode), "/src/spicy/spicy-http/analyzer/analyzer.spicy:146:5-156:6"); |
1193 | 0 | } |
1194 | | |
1195 | 25.7k | ::hilti::rt::debug::dedent("spicy"sv); |
1196 | 25.7k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
1197 | 25.7k | } |
1198 | | |
1199 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::Body::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
1200 | 0 | ::hilti::rt::detail::checkStack(); |
1201 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
1202 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
1203 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1204 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
1205 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
1206 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
1207 | | |
1208 | | // Begin parsing production: Unit: HTTP__Body_6 -> switch_6; |
1209 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
1210 | | // End parsing production: Unit: HTTP__Body_6 -> switch_6; |
1211 | |
|
1212 | 0 | if ( _t_error.hasValue() ) { |
1213 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
1214 | 0 | } |
1215 | | |
1216 | 0 | return _t_ncur; |
1217 | 0 | } |
1218 | | |
1219 | 13.4k | auto hlt_internal_HTTP_Request::HTTP::Chunk::_t_parse_HTTP__Chunk_8_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1220 | 13.4k | auto _t_self = Chunk::_t_self(); |
1221 | 13.4k | ::hilti::rt::detail::checkStack(); |
1222 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:206:14-213:1"); |
1223 | 13.4k | ::hilti::rt::integer::safe<uint64_t> _t_v_length; |
1224 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:16:20-16:33"); |
1225 | 13.4k | ::hilti::rt::Bytes _t_parsed_length; |
1226 | | |
1227 | | // Begin parsing production: Ctor: length_8 -> /[0-9a-zA-Z]+/ (regexp); |
1228 | 13.4k | ::hilti::rt::stream::View _t_ncur_ = _t_cur; |
1229 | 13.4k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_15.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1230 | 13.4k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1231 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:16:20-16:33"); |
1232 | 13.4k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur_), ms.advance(_t_ncur_)); |
1233 | 13.4k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1234 | 29 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_7; |
1235 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1236 | 29 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur_, (_t_lhs_7=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1237 | 29 | continue; |
1238 | 29 | } |
1239 | | |
1240 | 13.4k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1241 | 19 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:16:20-16:33"); |
1242 | 19 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:16:20-16:33"); |
1243 | 19 | } |
1244 | | |
1245 | 13.4k | else { |
1246 | 13.4k | ms.captures(_t_cur); |
1247 | 13.4k | _t_parsed_length = _t_cur.sub(_t_ncur_.begin()).data(); |
1248 | 13.4k | _t_cur = _t_ncur_; |
1249 | 13.4k | if ( _t_trim ) { |
1250 | 13.4k | (*_t_data).trim(_t_cur.begin()); |
1251 | 13.4k | } |
1252 | | |
1253 | 13.4k | break; |
1254 | 13.4k | } |
1255 | 13.4k | } |
1256 | | |
1257 | | // End parsing production: Ctor: length_8 -> /[0-9a-zA-Z]+/ (regexp); |
1258 | | |
1259 | 13.4k | ::hilti::rt::Bytes _t_dd = _t_parsed_length; |
1260 | 13.4k | _t_v_length = _t_dd.toUInt(::hilti::rt::integer::safe<std::uint64_t>{16U}); |
1261 | 13.4k | (*_t_self).length.valueOrInit() = _t_v_length; |
1262 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
1263 | | |
1264 | | // Begin parsing production: Ctor: _anon_24_8 -> /[ \t]*/ (regexp); |
1265 | 13.4k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1266 | 13.4k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_9.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1267 | 13.3k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1268 | 13.3k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
1269 | 13.3k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1270 | 13.3k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1271 | 1 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_8; |
1272 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1273 | 1 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_8=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1274 | 1 | continue; |
1275 | 1 | } |
1276 | | |
1277 | 13.3k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1278 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
1279 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
1280 | 0 | } |
1281 | | |
1282 | 13.3k | else { |
1283 | 13.3k | ms.captures(_t_cur); |
1284 | 13.3k | _t_cur.sub(_t_ncur.begin()).data(); |
1285 | 13.3k | _t_cur = _t_ncur; |
1286 | 13.3k | if ( _t_trim ) { |
1287 | 13.3k | (*_t_data).trim(_t_cur.begin()); |
1288 | 13.3k | } |
1289 | | |
1290 | 13.3k | break; |
1291 | 13.3k | } |
1292 | 13.3k | } |
1293 | | |
1294 | | // End parsing production: Ctor: _anon_24_8 -> /[ \t]*/ (regexp); |
1295 | | |
1296 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
1297 | | |
1298 | | // Begin parsing production: Ctor: extension_8 -> /[^\r\n]*/ (regexp); |
1299 | 13.4k | ::hilti::rt::stream::View _t_ncur__ = _t_cur; |
1300 | 13.4k | for ( ::hilti::rt::regexp::MatchState ms_ = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_10.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1301 | 13.3k | ::hilti::rt::integer::safe<int32_t> _t_rc_; |
1302 | 13.3k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
1303 | 13.3k | ::hilti::rt::tuple::assign(std::tie(_t_rc_, _t_ncur__), ms_.advance(_t_ncur__)); |
1304 | 13.3k | if ( ::hilti::rt::integer::safe<int32_t> _t_x_ = _t_rc_; _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1305 | 23 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_9; |
1306 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1307 | 23 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur__, (_t_lhs_9=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1308 | 23 | continue; |
1309 | 23 | } |
1310 | | |
1311 | 13.3k | else if ( _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1312 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
1313 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
1314 | 0 | } |
1315 | | |
1316 | 13.3k | else { |
1317 | 13.3k | ms_.captures(_t_cur); |
1318 | 13.3k | _t_cur.sub(_t_ncur__.begin()).data(); |
1319 | 13.3k | _t_cur = _t_ncur__; |
1320 | 13.3k | if ( _t_trim ) { |
1321 | 13.3k | (*_t_data).trim(_t_cur.begin()); |
1322 | 13.3k | } |
1323 | | |
1324 | 13.3k | break; |
1325 | 13.3k | } |
1326 | 13.3k | } |
1327 | | |
1328 | | // End parsing production: Ctor: extension_8 -> /[^\r\n]*/ (regexp); |
1329 | | |
1330 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1331 | | |
1332 | | // Begin parsing production: Ctor: _anon_25_8 -> /\r?\n/ (regexp); |
1333 | 13.4k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
1334 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
1335 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1336 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1337 | 0 | } |
1338 | | |
1339 | 0 | _t_cur.sub(_t_lahe).data(); |
1340 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1341 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
1342 | 0 | if ( _t_trim ) { |
1343 | 0 | (*_t_data).trim(_t_cur.begin()); |
1344 | 0 | } |
1345 | 0 | } |
1346 | 13.4k | else { |
1347 | 13.4k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1348 | 13.4k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1349 | 13.3k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1350 | 13.3k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1351 | 13.3k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1352 | 13.3k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1353 | 3 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_10; |
1354 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1355 | 3 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_10=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1356 | 3 | continue; |
1357 | 3 | } |
1358 | | |
1359 | 13.3k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1360 | 1 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1361 | 1 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1362 | 1 | } |
1363 | | |
1364 | 13.3k | else { |
1365 | 13.3k | ms.captures(_t_cur); |
1366 | 13.3k | _t_cur.sub(_t_ncur.begin()).data(); |
1367 | 13.3k | _t_cur = _t_ncur; |
1368 | 13.3k | if ( _t_trim ) { |
1369 | 13.3k | (*_t_data).trim(_t_cur.begin()); |
1370 | 13.3k | } |
1371 | | |
1372 | 13.3k | break; |
1373 | 13.3k | } |
1374 | 13.3k | } |
1375 | 13.4k | } |
1376 | | |
1377 | | // End parsing production: Ctor: _anon_25_8 -> /\r?\n/ (regexp); |
1378 | | |
1379 | 13.4k | ::hilti::rt::Bytes _t_transient__anon_26; |
1380 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:211:16-211:20"); |
1381 | | |
1382 | | // Begin parsing production: Variable: _anon_26_8 -> bytes; |
1383 | 13.4k | ::hilti::rt::integer::safe<uint64_t> _t_size = (*_t_self).length.value(); |
1384 | 13.4k | ::hilti::rt::stream::View _t_limited_ = _t_cur.limit(_t_size); |
1385 | 13.4k | ::hilti::rt::stream::View _t_ncur_2 = _t_cur.advance(_t_size); |
1386 | 22.8k | while ( ::hilti::rt::Bool(true) ) { |
1387 | 22.5k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_11; |
1388 | 22.5k | ::hilti::rt::Bool more_data = ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_limited_, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_11=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1389 | 22.5k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_limited_.size())) ) { |
1390 | 9.22k | _t_transient__anon_26 = _t_limited_.data(); |
1391 | 9.22k | _t_limited_ = _t_limited_.advance(_t_limited_.size()); |
1392 | 9.22k | if ( _t_trim ) { |
1393 | 9.22k | (*_t_data).trim(_t_limited_.begin()); |
1394 | 9.22k | } |
1395 | | |
1396 | 9.22k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:211:5-211:66"); |
1397 | 9.22k | (*(*_t_self->_t_p_body.derefAsValue()).data).write(_t_transient__anon_26, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(), ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>()); |
1398 | 9.22k | } |
1399 | | |
1400 | 22.5k | if ( ! (more_data) ) { |
1401 | 13.1k | break; |
1402 | 13.1k | } |
1403 | 22.5k | } |
1404 | | |
1405 | 13.4k | _t_limited_ = _t_limited_.advance(_t_limited_.end()); |
1406 | 13.4k | if ( _t_trim ) { |
1407 | 13.1k | (*_t_data).trim(_t_limited_.begin()); |
1408 | 13.1k | } |
1409 | | |
1410 | 13.4k | if ( _t_trim ) { |
1411 | 13.1k | (*_t_data).trim(_t_limited_.begin()); |
1412 | 13.1k | } |
1413 | | |
1414 | | // End parsing production: Variable: _anon_26_8 -> bytes; |
1415 | | |
1416 | 13.4k | _t_cur = _t_ncur_2; |
1417 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1418 | 13.4k | if ( (*_t_self).length.value() != ::hilti::rt::integer::safe<std::uint64_t>{0U} ) { |
1419 | | // Begin parsing production: Ctor: _anon_27_8 -> /\r?\n/ (regexp); |
1420 | 9.05k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
1421 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
1422 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1423 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1424 | 0 | } |
1425 | | |
1426 | 0 | _t_cur.sub(_t_lahe).data(); |
1427 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1428 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
1429 | 0 | if ( _t_trim ) { |
1430 | 0 | (*_t_data).trim(_t_cur.begin()); |
1431 | 0 | } |
1432 | 0 | } |
1433 | 9.05k | else { |
1434 | 9.05k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1435 | 9.11k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1436 | 9.05k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1437 | 9.05k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1438 | 9.05k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1439 | 9.05k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1440 | 57 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_12; |
1441 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1442 | 57 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_12=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1443 | 57 | continue; |
1444 | 57 | } |
1445 | | |
1446 | 9.00k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1447 | 39 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1448 | 39 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1449 | 39 | } |
1450 | | |
1451 | 8.96k | else { |
1452 | 8.96k | ms.captures(_t_cur); |
1453 | 8.96k | _t_cur.sub(_t_ncur.begin()).data(); |
1454 | 8.96k | _t_cur = _t_ncur; |
1455 | 8.96k | if ( _t_trim ) { |
1456 | 8.96k | (*_t_data).trim(_t_cur.begin()); |
1457 | 8.96k | } |
1458 | | |
1459 | 8.96k | break; |
1460 | 8.96k | } |
1461 | 9.05k | } |
1462 | 9.05k | } |
1463 | | |
1464 | | // End parsing production: Ctor: _anon_27_8 -> /\r?\n/ (regexp); |
1465 | 9.05k | } |
1466 | | |
1467 | 13.3k | ::hilti::rt::debug::dedent("spicy"sv); |
1468 | 13.3k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
1469 | 13.4k | } |
1470 | | |
1471 | 13.4k | auto hlt_internal_HTTP_Request::HTTP::Chunk::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1472 | 13.4k | auto _t_self = Chunk::_t_self(); |
1473 | 13.4k | ::hilti::rt::detail::checkStack(); |
1474 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:206:14-213:1"); |
1475 | 13.4k | ::hilti::rt::debug::indent("spicy"sv); |
1476 | 13.4k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1477 | 13.4k | return (*_t_self)._t_parse_HTTP__Chunk_8_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
1478 | 13.4k | } |
1479 | | |
1480 | 78.1k | inline void hlt_internal_HTTP_Request::HTTP::Chunks::_t_on_trailer_foreach(const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_dd) { |
1481 | 78.1k | auto _t_self = HTTP::Chunks::_t_self(); |
1482 | 78.1k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Chunks__t_on_trailer_foreach(_t_dd, _t_self); |
1483 | 78.1k | } |
1484 | | |
1485 | 4.57k | auto hlt_internal_HTTP_Request::HTTP::Chunks::_t_parse_HTTP__Chunks_7_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1486 | 4.57k | auto _t_self = Chunks::_t_self(); |
1487 | 4.57k | ::hilti::rt::detail::checkStack(); |
1488 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:199:15-204:1"); |
1489 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:200:5-200:53"); |
1490 | | |
1491 | | // Begin parsing production: ForEach: _anon_21_7 -> foreach: Resolved_65; |
1492 | 4.57k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self)._t_parse__anon_21_7_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
1493 | | // End parsing production: ForEach: _anon_21_7 -> foreach: Resolved_65; |
1494 | | |
1495 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1496 | | |
1497 | | // Begin parsing production: While: trailer_7 -> while(<look-ahead-found>): Resolved_66; |
1498 | 4.57k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self)._t_parse_trailer_7_stage1(_t_data, _t_begin, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error, (*_t_self).trailer.valueOrInit())); |
1499 | | // End parsing production: While: trailer_7 -> while(<look-ahead-found>): Resolved_66; |
1500 | | |
1501 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1502 | | |
1503 | | // Begin parsing production: Ctor: _anon_23_7 -> /\r?\n/ (regexp); |
1504 | 4.57k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
1505 | 3.87k | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
1506 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1507 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1508 | 0 | } |
1509 | | |
1510 | 3.87k | _t_cur.sub(_t_lahe).data(); |
1511 | 3.87k | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1512 | 3.87k | _t_cur = _t_cur.advance(_t_lahe); |
1513 | 3.87k | if ( _t_trim ) { |
1514 | 3.87k | (*_t_data).trim(_t_cur.begin()); |
1515 | 3.87k | } |
1516 | 3.87k | } |
1517 | 698 | else { |
1518 | 698 | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1519 | 698 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1520 | 3 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1521 | 3 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1522 | 3 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1523 | 3 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1524 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_13; |
1525 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1526 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_13=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1527 | 0 | continue; |
1528 | 0 | } |
1529 | | |
1530 | 3 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1531 | 3 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1532 | 3 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1533 | 3 | } |
1534 | | |
1535 | 0 | else { |
1536 | 0 | ms.captures(_t_cur); |
1537 | 0 | _t_cur.sub(_t_ncur.begin()).data(); |
1538 | 0 | _t_cur = _t_ncur; |
1539 | 0 | if ( _t_trim ) { |
1540 | 0 | (*_t_data).trim(_t_cur.begin()); |
1541 | 0 | } |
1542 | |
|
1543 | 0 | break; |
1544 | 0 | } |
1545 | 3 | } |
1546 | 698 | } |
1547 | | |
1548 | | // End parsing production: Ctor: _anon_23_7 -> /\r?\n/ (regexp); |
1549 | | |
1550 | 4.57k | ::hilti::rt::debug::dedent("spicy"sv); |
1551 | 4.57k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
1552 | 4.57k | } |
1553 | | |
1554 | 4.57k | auto hlt_internal_HTTP_Request::HTTP::Chunks::_t_parse__anon_21_7_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1555 | 4.57k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_14; |
1556 | 4.57k | auto _t_self = Chunks::_t_self(); |
1557 | 4.57k | ::hilti::rt::detail::checkStack(); |
1558 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:200:5-200:53"); |
1559 | 13.9k | while ( ! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_14=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>())))) ) { |
1560 | 13.4k | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Body> _t_lhs_15;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_16; |
1561 | 13.4k | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
1562 | 13.4k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Chunk>> _t_elem; |
1563 | 13.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:206:14-213:1"); |
1564 | | |
1565 | | // Begin parsing production: Unit: HTTP__Chunk_7 -> length_7 _anon_24_7 extension_7 _anon_25_7 _anon_26_7 _anon_27_7 (field '_anon_20', id n/a, parser, args: (body)) (container '_anon_21'); |
1566 | 13.4k | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Chunk>>((hlt_internal_HTTP_Request::HTTP::Chunk(::hilti::rt::struct_::tag::Parameters(), (_t_lhs_15=(_t_self->_t_p_body.derefAsValue()).asSharedPtr())))); |
1567 | 13.4k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
1568 | | // End parsing production: Unit: HTTP__Chunk_7 -> length_7 _anon_24_7 extension_7 _anon_25_7 _anon_26_7 _anon_27_7 (field '_anon_20', id n/a, parser, args: (body)) (container '_anon_21'); |
1569 | | |
1570 | 13.4k | ::hilti::rt::Bool _t_stop = ::hilti::rt::Bool(false); |
1571 | 13.4k | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Chunk> _t_dd = _t_elem.value(); |
1572 | 13.4k | _t_stop = (_t_stop) || (((*_t_dd).length.value() == ::hilti::rt::integer::safe<std::uint64_t>{0U})); |
1573 | 13.4k | if ( ! (_t_stop) ) { |
1574 | 8.96k | } |
1575 | | |
1576 | 13.4k | if ( _t_stop ) { |
1577 | 4.11k | break; |
1578 | 4.11k | } |
1579 | | |
1580 | 9.33k | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_16=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
1581 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:200:5-200:53"); |
1582 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:200:5-200:53"); |
1583 | 0 | } |
1584 | 9.33k | } |
1585 | | |
1586 | 4.57k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
1587 | 4.57k | } |
1588 | | |
1589 | 4.57k | auto hlt_internal_HTTP_Request::HTTP::Chunks::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1590 | 4.57k | auto _t_self = Chunks::_t_self(); |
1591 | 4.57k | ::hilti::rt::detail::checkStack(); |
1592 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:199:15-204:1"); |
1593 | 4.57k | ::hilti::rt::debug::indent("spicy"sv); |
1594 | 4.57k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1595 | 4.57k | return (*_t_self)._t_parse_HTTP__Chunks_7_stage2(_t_data, _t_begin_, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
1596 | 4.57k | } |
1597 | | |
1598 | 4.11k | auto hlt_internal_HTTP_Request::HTTP::Chunks::_t_parse_trailer_7_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1599 | 4.11k | auto _t_self = Chunks::_t_self(); |
1600 | 4.11k | ::hilti::rt::detail::checkStack(); |
1601 | 4.11k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1602 | 82.3k | while ( ::hilti::rt::Bool(true) ) { |
1603 | 82.2k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_17; |
1604 | 82.2k | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_17=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1605 | 82.2k | if ( ! (::hilti::rt::Bool(static_cast<bool>(_t_lah))) ) { |
1606 | 82.1k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_18; |
1607 | 82.1k | if ( ::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_18=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
1608 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
1609 | 0 | } |
1610 | 82.1k | else { |
1611 | 82.1k | ::hilti::rt::stream::View ncur = _t_cur; |
1612 | 82.1k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_11.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1613 | 82.1k | ::hilti::rt::integer::safe<int32_t> rc; |
1614 | 82.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1615 | 82.1k | ::hilti::rt::tuple::assign(std::tie(rc, ncur), ms.advance(ncur)); |
1616 | 82.1k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1617 | 33 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_19; |
1618 | 33 | if ( ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, (_t_lhs_19=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
1619 | 0 | continue; |
1620 | 0 | } |
1621 | | |
1622 | 33 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
1623 | 33 | _t_lahe = _t_cur.begin(); |
1624 | 33 | break; |
1625 | 33 | } |
1626 | | |
1627 | 82.0k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1628 | 3 | ::spicy::rt::detail::printParserState("HTTP::Chunks"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
1629 | 3 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1630 | 3 | _t_lahe = _t_cur.begin(); |
1631 | 3 | break; |
1632 | 3 | } |
1633 | | |
1634 | 82.0k | else { |
1635 | 82.0k | _t_lah = ::hilti::rt::integer::safe<int64_t>(rc); |
1636 | 82.0k | _t_lahe = ncur.begin(); |
1637 | 82.0k | break; |
1638 | 82.0k | } |
1639 | 82.1k | } |
1640 | | |
1641 | 82.1k | ::spicy::rt::detail::printParserState("HTTP::Chunks"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
1642 | 82.1k | } |
1643 | 82.1k | } |
1644 | | |
1645 | 82.2k | if ( ::hilti::rt::integer::safe<int64_t> _t_x = _t_lah; _t_x == ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
1646 | 3.87k | break; |
1647 | 3.87k | } |
1648 | | |
1649 | 78.3k | else if ( _t_x == ::hilti::rt::integer::safe<std::int64_t>{2} ) { |
1650 | 78.2k | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Message> _t_lhs_20;::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_21; |
1651 | 78.2k | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
1652 | 78.2k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>> _t_elem; |
1653 | 78.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:114:15-143:1"); |
1654 | | |
1655 | | // Begin parsing production: Unit: HTTP__Header_8 -> name_8 _anon_13_8 content_8 _anon_14_8 (field '_anon_22', id n/a, parser, args: (msg)) (container 'trailer'); |
1656 | 78.2k | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>((hlt_internal_HTTP_Request::HTTP::Header(::hilti::rt::struct_::tag::Parameters(), (_t_lhs_20=(_t_self->_t_p_msg.derefAsValue()).asSharedPtr())))); |
1657 | 78.2k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
1658 | | // End parsing production: Unit: HTTP__Header_8 -> name_8 _anon_13_8 content_8 _anon_14_8 (field '_anon_22', id n/a, parser, args: (msg)) (container 'trailer'); |
1659 | | |
1660 | 78.2k | (*_t_self)._t_error = _t_error; |
1661 | 78.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1662 | 78.2k | (*_t_self)._t_on_trailer_foreach(_t_elem.value()); |
1663 | 78.2k | _t_error = (*_t_self)._t_error; |
1664 | 78.2k | _t_dst.emplace_back(_t_elem.value()); |
1665 | 78.2k | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_21=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
1666 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1667 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1668 | 0 | } |
1669 | 78.2k | } |
1670 | | |
1671 | 182 | else if ( _t_x == ::hilti::rt::integer::safe<std::int64_t>{-1} ) { |
1672 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1673 | 0 | throw ::spicy::rt::ParseError("expected look-ahead token, but reached end-of-data"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:201:5-202:54"); |
1674 | 0 | } |
1675 | | |
1676 | 182 | else { |
1677 | 182 | break; |
1678 | 182 | } |
1679 | 82.2k | } |
1680 | | |
1681 | 4.11k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
1682 | 4.11k | } |
1683 | | |
1684 | 315k | inline void hlt_internal_HTTP_Request::HTTP::Content::_t_on_data() { |
1685 | 315k | auto _t_self = HTTP::Content::_t_self(); |
1686 | 315k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Content__t_on_data(_t_self); |
1687 | 315k | } |
1688 | | |
1689 | 25.7k | auto hlt_internal_HTTP_Request::HTTP::Content::_t_parse_HTTP__Content_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1690 | 25.7k | auto _t_self = Content::_t_self(); |
1691 | 25.7k | ::hilti::rt::detail::checkStack(); |
1692 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:188:16-197:1"); |
1693 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:189:11-189:15"); |
1694 | | |
1695 | | // Begin parsing production: Variable: data -> bytes; |
1696 | 341k | while ( ::hilti::rt::Bool(true) ) { |
1697 | 341k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_22; |
1698 | 341k | ::hilti::rt::Bool more_data = ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_22=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1699 | 341k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_cur.size())) ) { |
1700 | 315k | (*_t_self).data.valueOrInit() = _t_cur.data(); |
1701 | 315k | _t_cur = _t_cur.advance(_t_cur.size()); |
1702 | 315k | if ( _t_trim ) { |
1703 | 315k | (*_t_data).trim(_t_cur.begin()); |
1704 | 315k | } |
1705 | | |
1706 | 315k | (*_t_self)._t_error = _t_error; |
1707 | 315k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:189:5-194:2"); |
1708 | 315k | (*_t_self)._t_on_data(); |
1709 | 315k | _t_error = (*_t_self)._t_error; |
1710 | 315k | } |
1711 | | |
1712 | 341k | if ( ! (more_data) ) { |
1713 | 25.7k | break; |
1714 | 25.7k | } |
1715 | 341k | } |
1716 | | |
1717 | 25.7k | if ( _t_trim ) { |
1718 | 25.7k | (*_t_data).trim(_t_cur.begin()); |
1719 | 25.7k | } |
1720 | | |
1721 | | // End parsing production: Variable: data -> bytes; |
1722 | | |
1723 | 25.7k | ::hilti::rt::debug::dedent("spicy"sv); |
1724 | 25.7k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_error)); |
1725 | 25.7k | } |
1726 | | |
1727 | 25.7k | auto hlt_internal_HTTP_Request::HTTP::Content::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1728 | 25.7k | auto _t_self = Content::_t_self(); |
1729 | 25.7k | ::hilti::rt::detail::checkStack(); |
1730 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:188:16-197:1"); |
1731 | 25.7k | ::hilti::rt::debug::indent("spicy"sv); |
1732 | 25.7k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1733 | 25.7k | return (*_t_self)._t_parse_HTTP__Content_stage2(_t_data, _t_cur, _t_trim, _t_error); |
1734 | 25.7k | } |
1735 | | |
1736 | 25.7k | extern auto hlt_internal_HTTP_Request::HTTP::Content::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Content>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
1737 | 25.7k | ::hilti::rt::detail::checkStack(); |
1738 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:188:16-197:1"); |
1739 | 25.7k | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
1740 | 25.7k | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
1741 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:188:16-197:1"); |
1742 | | |
1743 | | // Begin parsing production: Unit: HTTP__Content -> data; |
1744 | 25.7k | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_error)); |
1745 | | // End parsing production: Unit: HTTP__Content -> data; |
1746 | | |
1747 | 25.7k | if ( _t_error.hasValue() ) { |
1748 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
1749 | 0 | } |
1750 | | |
1751 | 25.7k | return _t_ncur; |
1752 | 25.7k | } |
1753 | | |
1754 | 177k | inline void hlt_internal_HTTP_Request::HTTP::Header::_t_on_content() { |
1755 | 177k | auto _t_self = HTTP::Header::_t_self(); |
1756 | 177k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Header__t_on_content(_t_self); |
1757 | 177k | } |
1758 | | |
1759 | 178k | auto hlt_internal_HTTP_Request::HTTP::Header::_t_parse_HTTP__Header_6_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1760 | 178k | auto _t_self = Header::_t_self(); |
1761 | 178k | ::hilti::rt::detail::checkStack(); |
1762 | 178k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:114:15-143:1"); |
1763 | 178k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:111:21-111:31"); |
1764 | | |
1765 | | // Begin parsing production: Ctor: name_6 -> /[^:\r\n]+/ (regexp); |
1766 | 178k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
1767 | 178k | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{2} ) { |
1768 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:111:21-111:31"); |
1769 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:111:21-111:31"); |
1770 | 0 | } |
1771 | | |
1772 | 178k | (*_t_self).name.valueOrInit() = _t_cur.sub(_t_lahe).data(); |
1773 | 178k | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1774 | 178k | _t_cur = _t_cur.advance(_t_lahe); |
1775 | 178k | if ( _t_trim ) { |
1776 | 178k | (*_t_data).trim(_t_cur.begin()); |
1777 | 178k | } |
1778 | 178k | } |
1779 | 0 | else { |
1780 | 0 | ::hilti::rt::stream::View _t_ncur_ = _t_cur; |
1781 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_12.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1782 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1783 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:111:21-111:31"); |
1784 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur_), ms.advance(_t_ncur_)); |
1785 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1786 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_23; |
1787 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1788 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur_, (_t_lhs_23=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1789 | 0 | continue; |
1790 | 0 | } |
1791 | | |
1792 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1793 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:111:21-111:31"); |
1794 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:111:21-111:31"); |
1795 | 0 | } |
1796 | | |
1797 | 0 | else { |
1798 | 0 | ms.captures(_t_cur); |
1799 | 0 | (*_t_self).name.valueOrInit() = _t_cur.sub(_t_ncur_.begin()).data(); |
1800 | 0 | _t_cur = _t_ncur_; |
1801 | 0 | if ( _t_trim ) { |
1802 | 0 | (*_t_data).trim(_t_cur.begin()); |
1803 | 0 | } |
1804 | |
|
1805 | 0 | break; |
1806 | 0 | } |
1807 | 0 | } |
1808 | 0 | } |
1809 | | |
1810 | | // End parsing production: Ctor: name_6 -> /[^:\r\n]+/ (regexp); |
1811 | | |
1812 | 178k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:116:14-116:22"); |
1813 | | |
1814 | | // Begin parsing production: Ctor: _anon_13_6 -> /:[\t ]*/ (regexp); |
1815 | 178k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1816 | 178k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_13.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1817 | 178k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1818 | 178k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:116:14-116:22"); |
1819 | 178k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1820 | 178k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1821 | 49 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_24; |
1822 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1823 | 49 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_24=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1824 | 49 | continue; |
1825 | 49 | } |
1826 | | |
1827 | 177k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1828 | 78 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:116:14-116:22"); |
1829 | 78 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:116:14-116:22"); |
1830 | 78 | } |
1831 | | |
1832 | 177k | else { |
1833 | 177k | ms.captures(_t_cur); |
1834 | 177k | _t_cur.sub(_t_ncur.begin()).data(); |
1835 | 177k | _t_cur = _t_ncur; |
1836 | 177k | if ( _t_trim ) { |
1837 | 177k | (*_t_data).trim(_t_cur.begin()); |
1838 | 177k | } |
1839 | | |
1840 | 177k | break; |
1841 | 177k | } |
1842 | 178k | } |
1843 | | |
1844 | | // End parsing production: Ctor: _anon_13_6 -> /:[\t ]*/ (regexp); |
1845 | | |
1846 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:112:21-112:30"); |
1847 | | |
1848 | | // Begin parsing production: Ctor: content_6 -> /[^\r\n]*/ (regexp); |
1849 | 177k | ::hilti::rt::stream::View _t_ncur__ = _t_cur; |
1850 | 177k | for ( ::hilti::rt::regexp::MatchState ms_ = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_10.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1851 | 177k | ::hilti::rt::integer::safe<int32_t> _t_rc_; |
1852 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:112:21-112:30"); |
1853 | 177k | ::hilti::rt::tuple::assign(std::tie(_t_rc_, _t_ncur__), ms_.advance(_t_ncur__)); |
1854 | 177k | if ( ::hilti::rt::integer::safe<int32_t> _t_x_ = _t_rc_; _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1855 | 16 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_25; |
1856 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1857 | 16 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur__, (_t_lhs_25=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1858 | 16 | continue; |
1859 | 16 | } |
1860 | | |
1861 | 177k | else if ( _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1862 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:112:21-112:30"); |
1863 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:112:21-112:30"); |
1864 | 0 | } |
1865 | | |
1866 | 177k | else { |
1867 | 177k | ms_.captures(_t_cur); |
1868 | 177k | (*_t_self).content.valueOrInit() = _t_cur.sub(_t_ncur__.begin()).data(); |
1869 | 177k | _t_cur = _t_ncur__; |
1870 | 177k | if ( _t_trim ) { |
1871 | 177k | (*_t_data).trim(_t_cur.begin()); |
1872 | 177k | } |
1873 | | |
1874 | 177k | break; |
1875 | 177k | } |
1876 | 177k | } |
1877 | | |
1878 | | // End parsing production: Ctor: content_6 -> /[^\r\n]*/ (regexp); |
1879 | | |
1880 | 177k | (*_t_self)._t_error = _t_error; |
1881 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:117:5-117:25"); |
1882 | 177k | (*_t_self)._t_on_content(); |
1883 | 177k | _t_error = (*_t_self)._t_error; |
1884 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1885 | | |
1886 | | // Begin parsing production: Ctor: _anon_14_6 -> /\r?\n/ (regexp); |
1887 | 177k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
1888 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
1889 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1890 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1891 | 0 | } |
1892 | | |
1893 | 0 | _t_cur.sub(_t_lahe).data(); |
1894 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1895 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
1896 | 0 | if ( _t_trim ) { |
1897 | 0 | (*_t_data).trim(_t_cur.begin()); |
1898 | 0 | } |
1899 | 0 | } |
1900 | 177k | else { |
1901 | 177k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1902 | 177k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1903 | 177k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1904 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1905 | 177k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1906 | 177k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1907 | 16 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_26; |
1908 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1909 | 16 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_26=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1910 | 16 | continue; |
1911 | 16 | } |
1912 | | |
1913 | 177k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1914 | 2 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1915 | 2 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1916 | 2 | } |
1917 | | |
1918 | 177k | else { |
1919 | 177k | ms.captures(_t_cur); |
1920 | 177k | _t_cur.sub(_t_ncur.begin()).data(); |
1921 | 177k | _t_cur = _t_ncur; |
1922 | 177k | if ( _t_trim ) { |
1923 | 177k | (*_t_data).trim(_t_cur.begin()); |
1924 | 177k | } |
1925 | | |
1926 | 177k | break; |
1927 | 177k | } |
1928 | 177k | } |
1929 | 177k | } |
1930 | | |
1931 | | // End parsing production: Ctor: _anon_14_6 -> /\r?\n/ (regexp); |
1932 | | |
1933 | 177k | ::hilti::rt::debug::dedent("spicy"sv); |
1934 | 177k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
1935 | 177k | } |
1936 | | |
1937 | 178k | auto hlt_internal_HTTP_Request::HTTP::Header::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1938 | 178k | auto _t_self = Header::_t_self(); |
1939 | 178k | ::hilti::rt::detail::checkStack(); |
1940 | 178k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:114:15-143:1"); |
1941 | 178k | ::hilti::rt::debug::indent("spicy"sv); |
1942 | 178k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
1943 | 178k | return (*_t_self)._t_parse_HTTP__Header_6_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
1944 | 178k | } |
1945 | | |
1946 | 40.9k | inline void hlt_internal_HTTP_Request::HTTP::Message::_t_on_0x25_init() { |
1947 | 40.9k | auto _t_self = HTTP::Message::_t_self(); |
1948 | 40.9k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Message__t_on_0x25_init(_t_self); |
1949 | 40.9k | } |
1950 | | |
1951 | 39.0k | inline void hlt_internal_HTTP_Request::HTTP::Message::_t_on_end_of_hdr() { |
1952 | 39.0k | auto _t_self = HTTP::Message::_t_self(); |
1953 | 39.0k | return hlt_internal_HTTP_Request::HTTP::_t_hook_Message__t_on_end_of_hdr(_t_self); |
1954 | 39.0k | } |
1955 | | |
1956 | 40.9k | auto hlt_internal_HTTP_Request::HTTP::Message::_t_parse_HTTP__Message_5_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
1957 | 40.9k | auto _t_self = Message::_t_self(); |
1958 | 40.9k | ::hilti::rt::detail::checkStack(); |
1959 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:69:16-109:1"); |
1960 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
1961 | | |
1962 | | // Begin parsing production: While: headers_5 -> while(<look-ahead-found>): Resolved_51; |
1963 | 40.9k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self)._t_parse_headers_5_stage1(_t_data, _t_begin, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error, (*_t_self).headers.valueOrInit())); |
1964 | | // End parsing production: While: headers_5 -> while(<look-ahead-found>): Resolved_51; |
1965 | | |
1966 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1967 | | |
1968 | | // Begin parsing production: Ctor: end_of_hdr_5 -> /\r?\n/ (regexp); |
1969 | 40.9k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
1970 | 39.0k | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
1971 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1972 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1973 | 0 | } |
1974 | | |
1975 | 39.0k | _t_cur.sub(_t_lahe).data(); |
1976 | 39.0k | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
1977 | 39.0k | _t_cur = _t_cur.advance(_t_lahe); |
1978 | 39.0k | if ( _t_trim ) { |
1979 | 39.0k | (*_t_data).trim(_t_cur.begin()); |
1980 | 39.0k | } |
1981 | 39.0k | } |
1982 | 1.91k | else { |
1983 | 1.91k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
1984 | 1.91k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
1985 | 26 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
1986 | 26 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1987 | 26 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
1988 | 26 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
1989 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_27; |
1990 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
1991 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_27=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
1992 | 0 | continue; |
1993 | 0 | } |
1994 | | |
1995 | 26 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
1996 | 26 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1997 | 26 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
1998 | 26 | } |
1999 | | |
2000 | 0 | else { |
2001 | 0 | ms.captures(_t_cur); |
2002 | 0 | _t_cur.sub(_t_ncur.begin()).data(); |
2003 | 0 | _t_cur = _t_ncur; |
2004 | 0 | if ( _t_trim ) { |
2005 | 0 | (*_t_data).trim(_t_cur.begin()); |
2006 | 0 | } |
2007 | |
|
2008 | 0 | break; |
2009 | 0 | } |
2010 | 26 | } |
2011 | 1.91k | } |
2012 | | |
2013 | | // End parsing production: Ctor: end_of_hdr_5 -> /\r?\n/ (regexp); |
2014 | | |
2015 | 40.9k | (*_t_self)._t_error = _t_error; |
2016 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:71:5-71:24"); |
2017 | 40.9k | (*_t_self)._t_on_end_of_hdr(); |
2018 | 40.9k | _t_error = (*_t_self)._t_error; |
2019 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:145:13-186:1"); |
2020 | 40.9k | if ( (*_t_self).has_body ) { |
2021 | | // Begin parsing production: Unit: HTTP__Body_5 -> switch_5 (field 'body', id n/a, parser, args: (self, self.delivery_mode, is_request)); |
2022 | 25.7k | (*_t_self).body.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::Body(::hilti::rt::struct_::tag::Parameters(), _t_self, (*_t_self).delivery_mode, _t_self->_t_p_is_request)); |
2023 | 25.7k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*(*_t_self).body.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2024 | | // End parsing production: Unit: HTTP__Body_5 -> switch_5 (field 'body', id n/a, parser, args: (self, self.delivery_mode, is_request)); |
2025 | 25.7k | } |
2026 | | |
2027 | 40.9k | ::hilti::rt::debug::dedent("spicy"sv); |
2028 | 40.9k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2029 | 40.9k | } |
2030 | | |
2031 | 40.9k | auto hlt_internal_HTTP_Request::HTTP::Message::_t_parse_headers_5_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error, ::hilti::rt::Vector<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>& _t_dst) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2032 | 40.9k | auto _t_self = Message::_t_self(); |
2033 | 40.9k | ::hilti::rt::detail::checkStack(); |
2034 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
2035 | 140k | while ( ::hilti::rt::Bool(true) ) { |
2036 | 140k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_28; |
2037 | 140k | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_28=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2038 | 140k | if ( ! (::hilti::rt::Bool(static_cast<bool>(_t_lah))) ) { |
2039 | 138k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_29; |
2040 | 138k | if ( ::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_29=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
2041 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
2042 | 0 | } |
2043 | 138k | else { |
2044 | 138k | ::hilti::rt::stream::View ncur = _t_cur; |
2045 | 138k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_11.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2046 | 138k | ::hilti::rt::integer::safe<int32_t> rc; |
2047 | 138k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
2048 | 138k | ::hilti::rt::tuple::assign(std::tie(rc, ncur), ms.advance(ncur)); |
2049 | 138k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2050 | 92 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_30; |
2051 | 92 | if ( ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, (_t_lhs_30=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
2052 | 0 | continue; |
2053 | 0 | } |
2054 | | |
2055 | 92 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
2056 | 92 | _t_lahe = _t_cur.begin(); |
2057 | 92 | break; |
2058 | 92 | } |
2059 | | |
2060 | 138k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2061 | 26 | ::spicy::rt::detail::printParserState("HTTP::Message"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
2062 | 26 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2063 | 26 | _t_lahe = _t_cur.begin(); |
2064 | 26 | break; |
2065 | 26 | } |
2066 | | |
2067 | 138k | else { |
2068 | 138k | _t_lah = ::hilti::rt::integer::safe<int64_t>(rc); |
2069 | 138k | _t_lahe = ncur.begin(); |
2070 | 138k | break; |
2071 | 138k | } |
2072 | 138k | } |
2073 | | |
2074 | 138k | ::spicy::rt::detail::printParserState("HTTP::Message"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
2075 | 138k | } |
2076 | 138k | } |
2077 | | |
2078 | 140k | if ( ::hilti::rt::integer::safe<int64_t> _t_x = _t_lah; _t_x == ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
2079 | 39.0k | break; |
2080 | 39.0k | } |
2081 | | |
2082 | 101k | else if ( _t_x == ::hilti::rt::integer::safe<std::int64_t>{2} ) { |
2083 | 99.8k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_31; |
2084 | 99.8k | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
2085 | 99.8k | ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>> _t_elem; |
2086 | 99.8k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:114:15-143:1"); |
2087 | | |
2088 | | // Begin parsing production: Unit: HTTP__Header_5 -> name_5 _anon_13_5 content_5 _anon_14_5 (field '_anon_12', id n/a, parser, args: (self)) (container 'headers'); |
2089 | 99.8k | _t_elem = ::hilti::rt::Optional<::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>>((hlt_internal_HTTP_Request::HTTP::Header(::hilti::rt::struct_::tag::Parameters(), _t_self))); |
2090 | 99.8k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_elem.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2091 | | // End parsing production: Unit: HTTP__Header_5 -> name_5 _anon_13_5 content_5 _anon_14_5 (field '_anon_12', id n/a, parser, args: (self)) (container 'headers'); |
2092 | | |
2093 | 99.8k | _t_dst.emplace_back(_t_elem.value()); |
2094 | 99.8k | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_31=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
2095 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
2096 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
2097 | 0 | } |
2098 | 99.8k | } |
2099 | | |
2100 | 1.56k | else if ( _t_x == ::hilti::rt::integer::safe<std::int64_t>{-1} ) { |
2101 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
2102 | 0 | throw ::spicy::rt::ParseError("expected look-ahead token, but reached end-of-data"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:70:5-70:33"); |
2103 | 0 | } |
2104 | | |
2105 | 1.56k | else { |
2106 | 1.56k | break; |
2107 | 1.56k | } |
2108 | 140k | } |
2109 | | |
2110 | 40.9k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2111 | 40.9k | } |
2112 | | |
2113 | 40.9k | auto hlt_internal_HTTP_Request::HTTP::Message::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2114 | 40.9k | auto _t_self = Message::_t_self(); |
2115 | 40.9k | ::hilti::rt::detail::checkStack(); |
2116 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:69:16-109:1"); |
2117 | 40.9k | ::hilti::rt::debug::indent("spicy"sv); |
2118 | 40.9k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2119 | 40.9k | (*_t_self)._t_error = _t_error; |
2120 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:69:16-109:1"); |
2121 | 40.9k | (*_t_self)._t_on_0x25_init(); |
2122 | 40.9k | _t_error = (*_t_self)._t_error; |
2123 | 40.9k | return (*_t_self)._t_parse_HTTP__Message_5_stage2(_t_data, _t_begin_, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2124 | 40.9k | } |
2125 | | |
2126 | 0 | auto hlt_internal_HTTP_Request::HTTP::Replies::_t_parse_HTTP__Replies_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2127 | 0 | auto _t_self = Replies::_t_self(); |
2128 | 0 | ::hilti::rt::detail::checkStack(); |
2129 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2130 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:38:5-38:15"); |
2131 | | |
2132 | | // Begin parsing production: While: _anon_4 -> while(<look-ahead-found>): Resolved_24; |
2133 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self)._t_parse__anon_4_stage1(_t_data, _t_begin, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2134 | | // End parsing production: While: _anon_4 -> while(<look-ahead-found>): Resolved_24; |
2135 | |
|
2136 | 0 | ::hilti::rt::debug::dedent("spicy"sv); |
2137 | 0 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2138 | 0 | } |
2139 | | |
2140 | 0 | auto hlt_internal_HTTP_Request::HTTP::Replies::_t_parse__anon_4_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2141 | 0 | auto _t_self = Replies::_t_self(); |
2142 | 0 | ::hilti::rt::detail::checkStack(); |
2143 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:38:5-38:15"); |
2144 | 0 | while ( ::hilti::rt::Bool(true) ) { |
2145 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_32; |
2146 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_32=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2147 | 0 | if ( ! (::hilti::rt::Bool(static_cast<bool>(_t_lah))) ) { |
2148 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_33; |
2149 | 0 | if ( ::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_33=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
2150 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
2151 | 0 | } |
2152 | 0 | else { |
2153 | 0 | ::hilti::rt::stream::View ncur = _t_cur; |
2154 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_2.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2155 | 0 | ::hilti::rt::integer::safe<int32_t> rc; |
2156 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:38:5-38:15"); |
2157 | 0 | ::hilti::rt::tuple::assign(std::tie(rc, ncur), ms.advance(ncur)); |
2158 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2159 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_34; |
2160 | 0 | if ( ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, (_t_lhs_34=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
2161 | 0 | continue; |
2162 | 0 | } |
2163 | | |
2164 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
2165 | 0 | _t_lahe = _t_cur.begin(); |
2166 | 0 | break; |
2167 | 0 | } |
2168 | | |
2169 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2170 | 0 | ::spicy::rt::detail::printParserState("HTTP::Replies"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
2171 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2172 | 0 | _t_lahe = _t_cur.begin(); |
2173 | 0 | break; |
2174 | 0 | } |
2175 | | |
2176 | 0 | else { |
2177 | 0 | _t_lah = ::hilti::rt::integer::safe<int64_t>(rc); |
2178 | 0 | _t_lahe = ncur.begin(); |
2179 | 0 | break; |
2180 | 0 | } |
2181 | 0 | } |
2182 | |
|
2183 | 0 | ::spicy::rt::detail::printParserState("HTTP::Replies"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
2184 | 0 | } |
2185 | 0 | } |
2186 | |
|
2187 | 0 | if ( ::hilti::rt::integer::safe<int64_t> _t_x = _t_lah; _t_x == ::hilti::rt::integer::safe<std::int64_t>{-1} ) { |
2188 | 0 | break; |
2189 | 0 | } |
2190 | | |
2191 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int64_t>{4} ) { |
2192 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_35; |
2193 | 0 | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
2194 | 0 | hlt_internal_HTTP_Request::HTTP::Reply _t_elem; |
2195 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:41:14-44:1"); |
2196 | | |
2197 | | // Begin parsing production: Unit: HTTP__Reply -> Resolved_25 Resolved_27 (container '_anon_4'); |
2198 | 0 | _t_elem = (hlt_internal_HTTP_Request::HTTP::Reply()); |
2199 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), _t_elem._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2200 | | // End parsing production: Unit: HTTP__Reply -> Resolved_25 Resolved_27 (container '_anon_4'); |
2201 | |
|
2202 | 0 | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_35=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
2203 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:38:5-38:15"); |
2204 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:38:5-38:15"); |
2205 | 0 | } |
2206 | 0 | } |
2207 | | |
2208 | 0 | else { |
2209 | 0 | break; |
2210 | 0 | } |
2211 | 0 | } |
2212 | | |
2213 | 0 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2214 | 0 | } |
2215 | | |
2216 | 0 | auto hlt_internal_HTTP_Request::HTTP::Replies::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2217 | 0 | auto _t_self = Replies::_t_self(); |
2218 | 0 | ::hilti::rt::detail::checkStack(); |
2219 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2220 | 0 | ::hilti::rt::debug::indent("spicy"sv); |
2221 | 0 | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2222 | 0 | return (*_t_self)._t_parse_HTTP__Replies_stage2(_t_data, _t_begin_, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2223 | 0 | } |
2224 | | |
2225 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::Replies::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2226 | 0 | ::hilti::rt::detail::checkStack(); |
2227 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2228 | 0 | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Replies> _t_unit = ::hilti::rt::reference::make_value<hlt_internal_HTTP_Request::HTTP::Replies>((hlt_internal_HTTP_Request::HTTP::Replies())); |
2229 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2230 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2231 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2232 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
2233 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2234 | | |
2235 | | // Begin parsing production: Unit: HTTP__Replies -> _anon_4; |
2236 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
2237 | | // End parsing production: Unit: HTTP__Replies -> _anon_4; |
2238 | |
|
2239 | 0 | if ( _t_error.hasValue() ) { |
2240 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
2241 | 0 | } |
2242 | | |
2243 | 0 | return _t_ncur; |
2244 | 0 | } |
2245 | | |
2246 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::Replies::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Replies>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2247 | 0 | ::hilti::rt::detail::checkStack(); |
2248 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2249 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2250 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2251 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2252 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
2253 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2254 | | |
2255 | | // Begin parsing production: Unit: HTTP__Replies -> _anon_4; |
2256 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
2257 | | // End parsing production: Unit: HTTP__Replies -> _anon_4; |
2258 | |
|
2259 | 0 | if ( _t_error.hasValue() ) { |
2260 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
2261 | 0 | } |
2262 | | |
2263 | 0 | return _t_ncur; |
2264 | 0 | } |
2265 | | |
2266 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::Replies::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2267 | 0 | ::hilti::rt::detail::checkStack(); |
2268 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2269 | 0 | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Replies> _t_unit = ::hilti::rt::reference::make_value<hlt_internal_HTTP_Request::HTTP::Replies>((hlt_internal_HTTP_Request::HTTP::Replies())); |
2270 | 0 | ::spicy::rt::ParsedUnit::initialize((*_t_gunit), _t_unit, &type_info::_t_ti_value_ref_HTTP__Replies__value_refx2anamex2aHTTP__Repliesx2bx2b); |
2271 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2272 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2273 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2274 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
2275 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:35:23-39:1"); |
2276 | | |
2277 | | // Begin parsing production: Unit: HTTP__Replies -> _anon_4; |
2278 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
2279 | | // End parsing production: Unit: HTTP__Replies -> _anon_4; |
2280 | |
|
2281 | 0 | if ( _t_error.hasValue() ) { |
2282 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
2283 | 0 | } |
2284 | | |
2285 | 0 | return _t_ncur; |
2286 | 0 | } |
2287 | | |
2288 | 0 | auto hlt_internal_HTTP_Request::HTTP::Reply::_t_parse_HTTP__Reply_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2289 | 0 | auto _t_self = Reply::_t_self(); |
2290 | 0 | ::hilti::rt::detail::checkStack(); |
2291 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:41:14-44:1"); |
2292 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:60:18-67:1"); |
2293 | | |
2294 | | // Begin parsing production: Unit: HTTP__ReplyLine_2 -> Resolved_37 _anon_9_2 status_2 _anon_10_2 reason_2 _anon_11_2; |
2295 | 0 | (*_t_self).reply.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::ReplyLine()); |
2296 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self).reply.value()._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2297 | | // End parsing production: Unit: HTTP__ReplyLine_2 -> Resolved_37 _anon_9_2 status_2 _anon_10_2 reason_2 _anon_11_2; |
2298 | |
|
2299 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:69:16-109:1"); |
2300 | | |
2301 | | // Begin parsing production: Unit: HTTP__Message_4 -> headers_4 end_of_hdr_4 Resolved_41 (field 'message', id n/a, parser, args: (reply_code_needs_body(self.reply.status), False)); |
2302 | 0 | (*_t_self).message.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::Message(::hilti::rt::struct_::tag::Parameters(), reply_code_needs_body((*_t_self).reply.value().status.value()), ::hilti::rt::Bool(false))); |
2303 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*(*_t_self).message.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2304 | | // End parsing production: Unit: HTTP__Message_4 -> headers_4 end_of_hdr_4 Resolved_41 (field 'message', id n/a, parser, args: (reply_code_needs_body(self.reply.status), False)); |
2305 | |
|
2306 | 0 | ::hilti::rt::debug::dedent("spicy"sv); |
2307 | 0 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2308 | 0 | } |
2309 | | |
2310 | 0 | auto hlt_internal_HTTP_Request::HTTP::Reply::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2311 | 0 | auto _t_self = Reply::_t_self(); |
2312 | 0 | ::hilti::rt::detail::checkStack(); |
2313 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:41:14-44:1"); |
2314 | 0 | ::hilti::rt::debug::indent("spicy"sv); |
2315 | 0 | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2316 | 0 | return (*_t_self)._t_parse_HTTP__Reply_2_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2317 | 0 | } |
2318 | | |
2319 | 0 | auto hlt_internal_HTTP_Request::HTTP::ReplyLine::_t_parse_HTTP__ReplyLine_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2320 | 0 | auto _t_self = ReplyLine::_t_self(); |
2321 | 0 | ::hilti::rt::detail::checkStack(); |
2322 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:60:18-67:1"); |
2323 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:46:16-49:1"); |
2324 | | |
2325 | | // Begin parsing production: Unit: HTTP__Version_7 -> _anon_5_7 number_7; |
2326 | 0 | (*_t_self).version.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::Version()); |
2327 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self).version.value()._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2328 | | // End parsing production: Unit: HTTP__Version_7 -> _anon_5_7 number_7; |
2329 | |
|
2330 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2331 | | |
2332 | | // Begin parsing production: Ctor: _anon_9_3 -> /[ \t]+/ (regexp); |
2333 | 0 | ::hilti::rt::stream::View _t_ncur = _t_cur; |
2334 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_6.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2335 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2336 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2337 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
2338 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2339 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_36; |
2340 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2341 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_36=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2342 | 0 | continue; |
2343 | 0 | } |
2344 | | |
2345 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2346 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2347 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2348 | 0 | } |
2349 | | |
2350 | 0 | else { |
2351 | 0 | ms.captures(_t_cur); |
2352 | 0 | _t_cur.sub(_t_ncur.begin()).data(); |
2353 | 0 | _t_cur = _t_ncur; |
2354 | 0 | if ( _t_trim ) { |
2355 | 0 | (*_t_data).trim(_t_cur.begin()); |
2356 | 0 | } |
2357 | |
|
2358 | 0 | break; |
2359 | 0 | } |
2360 | 0 | } |
2361 | | |
2362 | | // End parsing production: Ctor: _anon_9_3 -> /[ \t]+/ (regexp); |
2363 | | |
2364 | 0 | ::hilti::rt::integer::safe<uint64_t> _t_v_status; |
2365 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:15:20-15:27"); |
2366 | 0 | ::hilti::rt::Bytes _t_parsed_status; |
2367 | | |
2368 | | // Begin parsing production: Ctor: status_3 -> /[0-9]+/ (regexp); |
2369 | 0 | ::hilti::rt::stream::View _t_ncur_ = _t_cur; |
2370 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_8.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2371 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2372 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:15:20-15:27"); |
2373 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur_), ms.advance(_t_ncur_)); |
2374 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2375 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_37; |
2376 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2377 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur_, (_t_lhs_37=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2378 | 0 | continue; |
2379 | 0 | } |
2380 | | |
2381 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2382 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:15:20-15:27"); |
2383 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:15:20-15:27"); |
2384 | 0 | } |
2385 | | |
2386 | 0 | else { |
2387 | 0 | ms.captures(_t_cur); |
2388 | 0 | _t_parsed_status = _t_cur.sub(_t_ncur_.begin()).data(); |
2389 | 0 | _t_cur = _t_ncur_; |
2390 | 0 | if ( _t_trim ) { |
2391 | 0 | (*_t_data).trim(_t_cur.begin()); |
2392 | 0 | } |
2393 | |
|
2394 | 0 | break; |
2395 | 0 | } |
2396 | 0 | } |
2397 | | |
2398 | | // End parsing production: Ctor: status_3 -> /[0-9]+/ (regexp); |
2399 | | |
2400 | 0 | ::hilti::rt::Bytes _t_dd = _t_parsed_status; |
2401 | 0 | _t_v_status = _t_dd.toUInt(); |
2402 | 0 | (*_t_self).status.valueOrInit() = _t_v_status; |
2403 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
2404 | | |
2405 | | // Begin parsing production: Ctor: _anon_10_3 -> /[ \t]*/ (regexp); |
2406 | 0 | ::hilti::rt::stream::View _t_ncur_2 = _t_cur; |
2407 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_9.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2408 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2409 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
2410 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur_2), ms.advance(_t_ncur_2)); |
2411 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2412 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_38; |
2413 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2414 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur_2, (_t_lhs_38=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2415 | 0 | continue; |
2416 | 0 | } |
2417 | | |
2418 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2419 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
2420 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:18:28-18:35"); |
2421 | 0 | } |
2422 | | |
2423 | 0 | else { |
2424 | 0 | ms.captures(_t_cur); |
2425 | 0 | _t_cur.sub(_t_ncur_2.begin()).data(); |
2426 | 0 | _t_cur = _t_ncur_2; |
2427 | 0 | if ( _t_trim ) { |
2428 | 0 | (*_t_data).trim(_t_cur.begin()); |
2429 | 0 | } |
2430 | |
|
2431 | 0 | break; |
2432 | 0 | } |
2433 | 0 | } |
2434 | | |
2435 | | // End parsing production: Ctor: _anon_10_3 -> /[ \t]*/ (regexp); |
2436 | | |
2437 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
2438 | | |
2439 | | // Begin parsing production: Ctor: reason_3 -> /[^\r\n]*/ (regexp); |
2440 | 0 | ::hilti::rt::stream::View _t_ncur__ = _t_cur; |
2441 | 0 | for ( ::hilti::rt::regexp::MatchState ms_ = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_10.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2442 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc_; |
2443 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
2444 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc_, _t_ncur__), ms_.advance(_t_ncur__)); |
2445 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x_ = _t_rc_; _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2446 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_39; |
2447 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2448 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur__, (_t_lhs_39=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2449 | 0 | continue; |
2450 | 0 | } |
2451 | | |
2452 | 0 | else if ( _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2453 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
2454 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:13:20-13:29"); |
2455 | 0 | } |
2456 | | |
2457 | 0 | else { |
2458 | 0 | ms_.captures(_t_cur); |
2459 | 0 | _t_cur.sub(_t_ncur__.begin()).data(); |
2460 | 0 | _t_cur = _t_ncur__; |
2461 | 0 | if ( _t_trim ) { |
2462 | 0 | (*_t_data).trim(_t_cur.begin()); |
2463 | 0 | } |
2464 | |
|
2465 | 0 | break; |
2466 | 0 | } |
2467 | 0 | } |
2468 | | |
2469 | | // End parsing production: Ctor: reason_3 -> /[^\r\n]*/ (regexp); |
2470 | | |
2471 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2472 | | |
2473 | | // Begin parsing production: Ctor: _anon_11_3 -> /\r?\n/ (regexp); |
2474 | 0 | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
2475 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
2476 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2477 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2478 | 0 | } |
2479 | | |
2480 | 0 | _t_cur.sub(_t_lahe).data(); |
2481 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2482 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
2483 | 0 | if ( _t_trim ) { |
2484 | 0 | (*_t_data).trim(_t_cur.begin()); |
2485 | 0 | } |
2486 | 0 | } |
2487 | 0 | else { |
2488 | 0 | ::hilti::rt::stream::View _t_ncur = _t_cur; |
2489 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2490 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2491 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2492 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
2493 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2494 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_40; |
2495 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2496 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_40=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2497 | 0 | continue; |
2498 | 0 | } |
2499 | | |
2500 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2501 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2502 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2503 | 0 | } |
2504 | | |
2505 | 0 | else { |
2506 | 0 | ms.captures(_t_cur); |
2507 | 0 | _t_cur.sub(_t_ncur.begin()).data(); |
2508 | 0 | _t_cur = _t_ncur; |
2509 | 0 | if ( _t_trim ) { |
2510 | 0 | (*_t_data).trim(_t_cur.begin()); |
2511 | 0 | } |
2512 | |
|
2513 | 0 | break; |
2514 | 0 | } |
2515 | 0 | } |
2516 | 0 | } |
2517 | | |
2518 | | // End parsing production: Ctor: _anon_11_3 -> /\r?\n/ (regexp); |
2519 | | |
2520 | 0 | ::hilti::rt::debug::dedent("spicy"sv); |
2521 | 0 | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2522 | 0 | } |
2523 | | |
2524 | 0 | auto hlt_internal_HTTP_Request::HTTP::ReplyLine::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2525 | 0 | auto _t_self = ReplyLine::_t_self(); |
2526 | 0 | ::hilti::rt::detail::checkStack(); |
2527 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:60:18-67:1"); |
2528 | 0 | ::hilti::rt::debug::indent("spicy"sv); |
2529 | 0 | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2530 | 0 | return (*_t_self)._t_parse_HTTP__ReplyLine_3_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2531 | 0 | } |
2532 | | |
2533 | 41.4k | auto hlt_internal_HTTP_Request::HTTP::Request::_t_parse_HTTP__Request_2_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2534 | 41.4k | auto _t_self = Request::_t_self(); |
2535 | 41.4k | ::hilti::rt::detail::checkStack(); |
2536 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:30:16-33:1"); |
2537 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:51:20-58:1"); |
2538 | | |
2539 | | // Begin parsing production: Unit: HTTP__RequestLine_2 -> method_2 _anon_6_2 uri_2 _anon_7_2 Resolved_15 _anon_8_2; |
2540 | 41.4k | (*_t_self).request.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::RequestLine()); |
2541 | 41.4k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self).request.value()._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2542 | | // End parsing production: Unit: HTTP__RequestLine_2 -> method_2 _anon_6_2 uri_2 _anon_7_2 Resolved_15 _anon_8_2; |
2543 | | |
2544 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:69:16-109:1"); |
2545 | | |
2546 | | // Begin parsing production: Unit: HTTP__Message_2 -> headers_2 end_of_hdr_2 Resolved_19 (field 'message', id n/a, parser, args: (False, True)); |
2547 | 41.4k | (*_t_self).message.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::Message(::hilti::rt::struct_::tag::Parameters(), ::hilti::rt::Bool(false), ::hilti::rt::Bool(true))); |
2548 | 41.4k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*(*_t_self).message.value())._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2549 | | // End parsing production: Unit: HTTP__Message_2 -> headers_2 end_of_hdr_2 Resolved_19 (field 'message', id n/a, parser, args: (False, True)); |
2550 | | |
2551 | 41.4k | ::hilti::rt::debug::dedent("spicy"sv); |
2552 | 41.4k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2553 | 41.4k | } |
2554 | | |
2555 | 41.4k | auto hlt_internal_HTTP_Request::HTTP::Request::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2556 | 41.4k | auto _t_self = Request::_t_self(); |
2557 | 41.4k | ::hilti::rt::detail::checkStack(); |
2558 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:30:16-33:1"); |
2559 | 41.4k | ::hilti::rt::debug::indent("spicy"sv); |
2560 | 41.4k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2561 | 41.4k | return (*_t_self)._t_parse_HTTP__Request_2_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2562 | 41.4k | } |
2563 | | |
2564 | 41.4k | auto hlt_internal_HTTP_Request::HTTP::RequestLine::_t_parse_HTTP__RequestLine_3_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2565 | 41.4k | auto _t_self = RequestLine::_t_self(); |
2566 | 41.4k | ::hilti::rt::detail::checkStack(); |
2567 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:51:20-58:1"); |
2568 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:10:20-10:32"); |
2569 | | |
2570 | | // Begin parsing production: Ctor: method_3 -> /[^ \t\r\n]+/ (regexp); |
2571 | 41.4k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
2572 | 41.4k | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{3} ) { |
2573 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:10:20-10:32"); |
2574 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:10:20-10:32"); |
2575 | 0 | } |
2576 | | |
2577 | 41.4k | _t_cur.sub(_t_lahe).data(); |
2578 | 41.4k | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2579 | 41.4k | _t_cur = _t_cur.advance(_t_lahe); |
2580 | 41.4k | if ( _t_trim ) { |
2581 | 41.4k | (*_t_data).trim(_t_cur.begin()); |
2582 | 41.4k | } |
2583 | 41.4k | } |
2584 | 0 | else { |
2585 | 0 | ::hilti::rt::stream::View _t_ncur_ = _t_cur; |
2586 | 0 | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_5.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2587 | 0 | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2588 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:10:20-10:32"); |
2589 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur_), ms.advance(_t_ncur_)); |
2590 | 0 | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2591 | 0 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_41; |
2592 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2593 | 0 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur_, (_t_lhs_41=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2594 | 0 | continue; |
2595 | 0 | } |
2596 | | |
2597 | 0 | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2598 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:10:20-10:32"); |
2599 | 0 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:10:20-10:32"); |
2600 | 0 | } |
2601 | | |
2602 | 0 | else { |
2603 | 0 | ms.captures(_t_cur); |
2604 | 0 | _t_cur.sub(_t_ncur_.begin()).data(); |
2605 | 0 | _t_cur = _t_ncur_; |
2606 | 0 | if ( _t_trim ) { |
2607 | 0 | (*_t_data).trim(_t_cur.begin()); |
2608 | 0 | } |
2609 | |
|
2610 | 0 | break; |
2611 | 0 | } |
2612 | 0 | } |
2613 | 0 | } |
2614 | | |
2615 | | // End parsing production: Ctor: method_3 -> /[^ \t\r\n]+/ (regexp); |
2616 | | |
2617 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2618 | | |
2619 | | // Begin parsing production: Ctor: _anon_6_3 -> /[ \t]+/ (regexp); |
2620 | 41.4k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
2621 | 41.4k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_6.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2622 | 41.4k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2623 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2624 | 41.4k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
2625 | 41.4k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2626 | 74 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_42; |
2627 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2628 | 74 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_42=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2629 | 74 | continue; |
2630 | 74 | } |
2631 | | |
2632 | 41.3k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2633 | 88 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2634 | 88 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2635 | 88 | } |
2636 | | |
2637 | 41.2k | else { |
2638 | 41.2k | ms.captures(_t_cur); |
2639 | 41.2k | _t_cur.sub(_t_ncur.begin()).data(); |
2640 | 41.2k | _t_cur = _t_ncur; |
2641 | 41.2k | if ( _t_trim ) { |
2642 | 41.2k | (*_t_data).trim(_t_cur.begin()); |
2643 | 41.2k | } |
2644 | | |
2645 | 41.2k | break; |
2646 | 41.2k | } |
2647 | 41.4k | } |
2648 | | |
2649 | | // End parsing production: Ctor: _anon_6_3 -> /[ \t]+/ (regexp); |
2650 | | |
2651 | 41.3k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:11:20-11:32"); |
2652 | | |
2653 | | // Begin parsing production: Ctor: uri_3 -> /[^ \t\r\n]+/ (regexp); |
2654 | 41.3k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
2655 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{3} ) { |
2656 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:11:20-11:32"); |
2657 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:11:20-11:32"); |
2658 | 0 | } |
2659 | | |
2660 | 0 | _t_cur.sub(_t_lahe).data(); |
2661 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2662 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
2663 | 0 | if ( _t_trim ) { |
2664 | 0 | (*_t_data).trim(_t_cur.begin()); |
2665 | 0 | } |
2666 | 0 | } |
2667 | 41.3k | else { |
2668 | 41.3k | ::hilti::rt::stream::View _t_ncur__ = _t_cur; |
2669 | 41.3k | for ( ::hilti::rt::regexp::MatchState ms_ = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_5.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2670 | 41.2k | ::hilti::rt::integer::safe<int32_t> _t_rc_; |
2671 | 41.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:11:20-11:32"); |
2672 | 41.2k | ::hilti::rt::tuple::assign(std::tie(_t_rc_, _t_ncur__), ms_.advance(_t_ncur__)); |
2673 | 41.2k | if ( ::hilti::rt::integer::safe<int32_t> _t_x_ = _t_rc_; _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2674 | 68 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_43; |
2675 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2676 | 68 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur__, (_t_lhs_43=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2677 | 68 | continue; |
2678 | 68 | } |
2679 | | |
2680 | 41.1k | else if ( _t_x_ == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2681 | 10 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:11:20-11:32"); |
2682 | 10 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:11:20-11:32"); |
2683 | 10 | } |
2684 | | |
2685 | 41.1k | else { |
2686 | 41.1k | ms_.captures(_t_cur); |
2687 | 41.1k | _t_cur.sub(_t_ncur__.begin()).data(); |
2688 | 41.1k | _t_cur = _t_ncur__; |
2689 | 41.1k | if ( _t_trim ) { |
2690 | 41.1k | (*_t_data).trim(_t_cur.begin()); |
2691 | 41.1k | } |
2692 | | |
2693 | 41.1k | break; |
2694 | 41.1k | } |
2695 | 41.2k | } |
2696 | 41.3k | } |
2697 | | |
2698 | | // End parsing production: Ctor: uri_3 -> /[^ \t\r\n]+/ (regexp); |
2699 | | |
2700 | 41.3k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2701 | | |
2702 | | // Begin parsing production: Ctor: _anon_7_3 -> /[ \t]+/ (regexp); |
2703 | 41.3k | ::hilti::rt::stream::View _t_ncur_2 = _t_cur; |
2704 | 41.3k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_6.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2705 | 41.1k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2706 | 41.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2707 | 41.1k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur_2), ms.advance(_t_ncur_2)); |
2708 | 41.1k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2709 | 13 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_44; |
2710 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2711 | 13 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur_2, (_t_lhs_44=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2712 | 13 | continue; |
2713 | 13 | } |
2714 | | |
2715 | 41.1k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2716 | 28 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2717 | 28 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:17:20-17:27"); |
2718 | 28 | } |
2719 | | |
2720 | 41.1k | else { |
2721 | 41.1k | ms.captures(_t_cur); |
2722 | 41.1k | _t_cur.sub(_t_ncur_2.begin()).data(); |
2723 | 41.1k | _t_cur = _t_ncur_2; |
2724 | 41.1k | if ( _t_trim ) { |
2725 | 41.1k | (*_t_data).trim(_t_cur.begin()); |
2726 | 41.1k | } |
2727 | | |
2728 | 41.1k | break; |
2729 | 41.1k | } |
2730 | 41.1k | } |
2731 | | |
2732 | | // End parsing production: Ctor: _anon_7_3 -> /[ \t]+/ (regexp); |
2733 | | |
2734 | 41.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:46:16-49:1"); |
2735 | | |
2736 | | // Begin parsing production: Unit: HTTP__Version_6 -> _anon_5_6 number_6; |
2737 | 41.2k | (*_t_self).version.valueOrInit() = (hlt_internal_HTTP_Request::HTTP::Version()); |
2738 | 41.2k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self).version.value()._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2739 | | // End parsing production: Unit: HTTP__Version_6 -> _anon_5_6 number_6; |
2740 | | |
2741 | 41.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2742 | | |
2743 | | // Begin parsing production: Ctor: _anon_8_3 -> /\r?\n/ (regexp); |
2744 | 41.2k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
2745 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{1} ) { |
2746 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2747 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2748 | 0 | } |
2749 | | |
2750 | 0 | _t_cur.sub(_t_lahe).data(); |
2751 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2752 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
2753 | 0 | if ( _t_trim ) { |
2754 | 0 | (*_t_data).trim(_t_cur.begin()); |
2755 | 0 | } |
2756 | 0 | } |
2757 | 41.2k | else { |
2758 | 41.2k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
2759 | 41.2k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_7.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2760 | 40.9k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2761 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2762 | 40.9k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
2763 | 40.9k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2764 | 3 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_45; |
2765 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2766 | 3 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_45=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2767 | 3 | continue; |
2768 | 3 | } |
2769 | | |
2770 | 40.9k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2771 | 16 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2772 | 16 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:12:20-12:26"); |
2773 | 16 | } |
2774 | | |
2775 | 40.9k | else { |
2776 | 40.9k | ms.captures(_t_cur); |
2777 | 40.9k | _t_cur.sub(_t_ncur.begin()).data(); |
2778 | 40.9k | _t_cur = _t_ncur; |
2779 | 40.9k | if ( _t_trim ) { |
2780 | 40.9k | (*_t_data).trim(_t_cur.begin()); |
2781 | 40.9k | } |
2782 | | |
2783 | 40.9k | break; |
2784 | 40.9k | } |
2785 | 40.9k | } |
2786 | 41.2k | } |
2787 | | |
2788 | | // End parsing production: Ctor: _anon_8_3 -> /\r?\n/ (regexp); |
2789 | | |
2790 | 41.2k | ::hilti::rt::debug::dedent("spicy"sv); |
2791 | 41.2k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2792 | 41.2k | } |
2793 | | |
2794 | 41.4k | auto hlt_internal_HTTP_Request::HTTP::RequestLine::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2795 | 41.4k | auto _t_self = RequestLine::_t_self(); |
2796 | 41.4k | ::hilti::rt::detail::checkStack(); |
2797 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:51:20-58:1"); |
2798 | 41.4k | ::hilti::rt::debug::indent("spicy"sv); |
2799 | 41.4k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2800 | 41.4k | return (*_t_self)._t_parse_HTTP__RequestLine_3_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2801 | 41.4k | } |
2802 | | |
2803 | 5.30k | auto hlt_internal_HTTP_Request::HTTP::Requests::_t_parse_HTTP__Requests_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2804 | 5.30k | auto _t_self = Requests::_t_self(); |
2805 | 5.30k | ::hilti::rt::detail::checkStack(); |
2806 | 5.30k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2807 | 5.30k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:27:5-27:17"); |
2808 | | |
2809 | | // Begin parsing production: While: _anon_2 -> while(<look-ahead-found>): Resolved_2; |
2810 | 5.30k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), (*_t_self)._t_parse__anon_2_stage1(_t_data, _t_begin, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2811 | | // End parsing production: While: _anon_2 -> while(<look-ahead-found>): Resolved_2; |
2812 | | |
2813 | 5.30k | ::hilti::rt::debug::dedent("spicy"sv); |
2814 | 5.30k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2815 | 5.30k | } |
2816 | | |
2817 | 5.30k | auto hlt_internal_HTTP_Request::HTTP::Requests::_t_parse__anon_2_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::stream::SafeConstIterator& _t_begin, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2818 | 5.30k | auto _t_self = Requests::_t_self(); |
2819 | 5.30k | ::hilti::rt::detail::checkStack(); |
2820 | 5.30k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:27:5-27:17"); |
2821 | 46.7k | while ( ::hilti::rt::Bool(true) ) { |
2822 | 42.3k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_46; |
2823 | 42.3k | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, ::hilti::rt::integer::safe<std::uint64_t>{1U}, (_t_lhs_46=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2824 | 42.3k | if ( ! (::hilti::rt::Bool(static_cast<bool>(_t_lah))) ) { |
2825 | 41.6k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_47; |
2826 | 41.6k | if ( ::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_47=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
2827 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
2828 | 0 | } |
2829 | 41.6k | else { |
2830 | 41.6k | ::hilti::rt::stream::View ncur = _t_cur; |
2831 | 41.6k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2832 | 41.6k | ::hilti::rt::integer::safe<int32_t> rc; |
2833 | 41.6k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:27:5-27:17"); |
2834 | 41.6k | ::hilti::rt::tuple::assign(std::tie(rc, ncur), ms.advance(ncur)); |
2835 | 41.6k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2836 | 130 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_48; |
2837 | 130 | if ( ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_cur, (_t_lhs_48=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))) ) { |
2838 | 0 | continue; |
2839 | 0 | } |
2840 | | |
2841 | 130 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{-1}; |
2842 | 130 | _t_lahe = _t_cur.begin(); |
2843 | 130 | break; |
2844 | 130 | } |
2845 | | |
2846 | 41.4k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2847 | 90 | ::spicy::rt::detail::printParserState("HTTP::Requests"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
2848 | 90 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2849 | 90 | _t_lahe = _t_cur.begin(); |
2850 | 90 | break; |
2851 | 90 | } |
2852 | | |
2853 | 41.4k | else { |
2854 | 41.4k | _t_lah = ::hilti::rt::integer::safe<int64_t>(rc); |
2855 | 41.4k | _t_lahe = ncur.begin(); |
2856 | 41.4k | break; |
2857 | 41.4k | } |
2858 | 41.6k | } |
2859 | | |
2860 | 41.6k | ::spicy::rt::detail::printParserState("HTTP::Requests"sv, _t_data, ::hilti::rt::Optional<::hilti::rt::stream::SafeConstIterator>(_t_begin), _t_cur, _t_lah, _t_lahe, "default"sv, _t_trim, _t_error); |
2861 | 41.6k | } |
2862 | 41.6k | } |
2863 | | |
2864 | 42.3k | if ( ::hilti::rt::integer::safe<int64_t> _t_x = _t_lah; _t_x == ::hilti::rt::integer::safe<std::int64_t>{-1} ) { |
2865 | 0 | break; |
2866 | 0 | } |
2867 | | |
2868 | 42.3k | else if ( _t_x == ::hilti::rt::integer::safe<std::int64_t>{3} ) { |
2869 | 41.4k | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_49; |
2870 | 41.4k | ::hilti::rt::stream::SafeConstIterator _t_old_begin = _t_cur.begin(); |
2871 | 41.4k | hlt_internal_HTTP_Request::HTTP::Request _t_elem; |
2872 | 41.4k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:30:16-33:1"); |
2873 | | |
2874 | | // Begin parsing production: Unit: HTTP__Request -> Resolved_3 Resolved_5 (container '_anon_2'); |
2875 | 41.4k | _t_elem = (hlt_internal_HTTP_Request::HTTP::Request()); |
2876 | 41.4k | ::hilti::rt::tuple::assign(std::tie(_t_cur, _t_lah, _t_lahe, _t_error), _t_elem._t_parse_stage1(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error)); |
2877 | | // End parsing production: Unit: HTTP__Request -> Resolved_3 Resolved_5 (container '_anon_2'); |
2878 | | |
2879 | 41.4k | if ( (_t_cur.begin() == _t_old_begin) && (! (::spicy::rt::detail::atEod(_t_data, _t_cur, (_t_lhs_49=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))))) ) { |
2880 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:27:5-27:17"); |
2881 | 0 | throw ::spicy::rt::ParseError("loop body did not change input position, possible infinite loop"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:27:5-27:17"); |
2882 | 0 | } |
2883 | 41.4k | } |
2884 | | |
2885 | 935 | else { |
2886 | 935 | break; |
2887 | 935 | } |
2888 | 42.3k | } |
2889 | | |
2890 | 5.30k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
2891 | 5.30k | } |
2892 | | |
2893 | 5.30k | auto hlt_internal_HTTP_Request::HTTP::Requests::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2894 | 5.30k | auto _t_self = Requests::_t_self(); |
2895 | 5.30k | ::hilti::rt::detail::checkStack(); |
2896 | 5.30k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2897 | 5.30k | ::hilti::rt::debug::indent("spicy"sv); |
2898 | 5.30k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
2899 | 5.30k | return (*_t_self)._t_parse_HTTP__Requests_stage2(_t_data, _t_begin_, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
2900 | 5.30k | } |
2901 | | |
2902 | 5.30k | extern auto hlt_internal_HTTP_Request::HTTP::Requests::parse1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2903 | 5.30k | ::hilti::rt::detail::checkStack(); |
2904 | 5.30k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2905 | 5.30k | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Requests> _t_unit = ::hilti::rt::reference::make_value<hlt_internal_HTTP_Request::HTTP::Requests>((hlt_internal_HTTP_Request::HTTP::Requests())); |
2906 | 5.30k | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2907 | 5.30k | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2908 | 5.30k | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2909 | 5.30k | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
2910 | 5.30k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2911 | | |
2912 | | // Begin parsing production: Unit: HTTP__Requests -> _anon_2; |
2913 | 5.30k | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
2914 | | // End parsing production: Unit: HTTP__Requests -> _anon_2; |
2915 | | |
2916 | 5.30k | if ( _t_error.hasValue() ) { |
2917 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
2918 | 0 | } |
2919 | | |
2920 | 5.30k | return _t_ncur; |
2921 | 5.30k | } |
2922 | | |
2923 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::Requests::parse2(::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Requests>& _t_unit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2924 | 0 | ::hilti::rt::detail::checkStack(); |
2925 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2926 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2927 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2928 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2929 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
2930 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2931 | | |
2932 | | // Begin parsing production: Unit: HTTP__Requests -> _anon_2; |
2933 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
2934 | | // End parsing production: Unit: HTTP__Requests -> _anon_2; |
2935 | |
|
2936 | 0 | if ( _t_error.hasValue() ) { |
2937 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
2938 | 0 | } |
2939 | | |
2940 | 0 | return _t_ncur; |
2941 | 0 | } |
2942 | | |
2943 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::Requests::parse3(::hilti::rt::ValueReference<::spicy::rt::ParsedUnit>& _t_gunit, ::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, const ::hilti::rt::Optional<::hilti::rt::stream::View>& _t_cur, const ::hilti::rt::Optional<::spicy::rt::UnitContext>& _t_context) -> ::hilti::rt::stream::View { |
2944 | 0 | ::hilti::rt::detail::checkStack(); |
2945 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2946 | 0 | ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Requests> _t_unit = ::hilti::rt::reference::make_value<hlt_internal_HTTP_Request::HTTP::Requests>((hlt_internal_HTTP_Request::HTTP::Requests())); |
2947 | 0 | ::spicy::rt::ParsedUnit::initialize((*_t_gunit), _t_unit, &type_info::_t_ti_value_ref_HTTP__Requests__value_refx2anamex2aHTTP__Requestsx2bx2b); |
2948 | 0 | ::hilti::rt::stream::View _t_ncur = (_t_cur ? _t_cur.value() : (*_t_data).view()); |
2949 | 0 | ::hilti::rt::integer::safe<int64_t> _t_lahead = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2950 | 0 | ::hilti::rt::stream::SafeConstIterator _t_lahead_end; |
2951 | 0 | ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error = ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>(); |
2952 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:24:24-28:1"); |
2953 | | |
2954 | | // Begin parsing production: Unit: HTTP__Requests -> _anon_2; |
2955 | 0 | ::hilti::rt::tuple::assign(std::tie(_t_ncur, _t_lahead, _t_lahead_end, _t_error), (*_t_unit)._t_parse_stage1(_t_data, _t_ncur, ::hilti::rt::Bool(true), _t_lahead, _t_lahead_end, _t_error)); |
2956 | | // End parsing production: Unit: HTTP__Requests -> _anon_2; |
2957 | |
|
2958 | 0 | if ( _t_error.hasValue() ) { |
2959 | 0 | throw ::spicy::rt::ParseError(::hilti::rt::fmt("successful synchronization never confirmed: %s"sv, ::hilti::rt::exception::what(_t_error.value())), ::hilti::rt::exception::where(_t_error.value())); |
2960 | 0 | } |
2961 | | |
2962 | 0 | return _t_ncur; |
2963 | 0 | } |
2964 | | |
2965 | 41.1k | auto hlt_internal_HTTP_Request::HTTP::Version::_t_parse_HTTP__Version_5_stage2(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
2966 | 41.1k | auto _t_self = Version::_t_self(); |
2967 | 41.1k | ::hilti::rt::detail::checkStack(); |
2968 | 41.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:46:16-49:1"); |
2969 | 41.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:47:14-47:21"); |
2970 | | |
2971 | | // Begin parsing production: Ctor: _anon_5_5 -> /HTTP// (regexp); |
2972 | 41.1k | if ( ::hilti::rt::Bool(static_cast<bool>(_t_lah)) ) { |
2973 | 0 | if ( _t_lah != ::hilti::rt::integer::safe<std::int64_t>{4} ) { |
2974 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:47:14-47:21"); |
2975 | 0 | throw ::spicy::rt::ParseError("unexpected token to consume"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:47:14-47:21"); |
2976 | 0 | } |
2977 | | |
2978 | 0 | _t_cur.sub(_t_lahe).data(); |
2979 | 0 | _t_lah = ::hilti::rt::integer::safe<std::int64_t>{0}; |
2980 | 0 | _t_cur = _t_cur.advance(_t_lahe); |
2981 | 0 | if ( _t_trim ) { |
2982 | 0 | (*_t_data).trim(_t_cur.begin()); |
2983 | 0 | } |
2984 | 0 | } |
2985 | 41.1k | else { |
2986 | 41.1k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
2987 | 41.1k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_3.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
2988 | 41.1k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
2989 | 41.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:47:14-47:21"); |
2990 | 41.1k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
2991 | 41.1k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
2992 | 34 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_50; |
2993 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
2994 | 34 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_50=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
2995 | 34 | continue; |
2996 | 34 | } |
2997 | | |
2998 | 41.0k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
2999 | 86 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:47:14-47:21"); |
3000 | 86 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:47:14-47:21"); |
3001 | 86 | } |
3002 | | |
3003 | 41.0k | else { |
3004 | 41.0k | ms.captures(_t_cur); |
3005 | 41.0k | _t_cur.sub(_t_ncur.begin()).data(); |
3006 | 41.0k | _t_cur = _t_ncur; |
3007 | 41.0k | if ( _t_trim ) { |
3008 | 41.0k | (*_t_data).trim(_t_cur.begin()); |
3009 | 41.0k | } |
3010 | | |
3011 | 41.0k | break; |
3012 | 41.0k | } |
3013 | 41.1k | } |
3014 | 41.1k | } |
3015 | | |
3016 | | // End parsing production: Ctor: _anon_5_5 -> /HTTP// (regexp); |
3017 | | |
3018 | 41.0k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:48:13-48:28"); |
3019 | | |
3020 | | // Begin parsing production: Ctor: number_5 -> /[0-9]+\.[0-9]*/ (regexp); |
3021 | 41.0k | ::hilti::rt::stream::View _t_ncur = _t_cur; |
3022 | 41.0k | for ( ::hilti::rt::regexp::MatchState ms = hlt_internal_HTTP_Request::HTTP::_t_ctor__regexp_4.tokenMatcher(); ::hilti::rt::Bool(true); ) { |
3023 | 41.0k | ::hilti::rt::integer::safe<int32_t> _t_rc; |
3024 | 41.0k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:48:13-48:28"); |
3025 | 41.0k | ::hilti::rt::tuple::assign(std::tie(_t_rc, _t_ncur), ms.advance(_t_ncur)); |
3026 | 41.0k | if ( ::hilti::rt::integer::safe<int32_t> _t_x = _t_rc; _t_x == ::hilti::rt::integer::safe<std::int32_t>{-1} ) { |
3027 | 17 | ::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters> _t_lhs_51; |
3028 | | // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores); |
3029 | 17 | ::spicy::rt::detail::waitForInputOrEod(_t_data, _t_ncur, (_t_lhs_51=(::hilti::rt::StrongReference<::spicy::rt::filter::detail::Filters>()))); |
3030 | 17 | continue; |
3031 | 17 | } |
3032 | | |
3033 | 40.9k | else if ( _t_x == ::hilti::rt::integer::safe<std::int32_t>{0} ) { |
3034 | 10 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:48:13-48:28"); |
3035 | 10 | throw ::spicy::rt::ParseError("failed to match regular expression"sv, "/src/spicy/spicy-http/analyzer/analyzer.spicy:48:13-48:28"); |
3036 | 10 | } |
3037 | | |
3038 | 40.9k | else { |
3039 | 40.9k | ms.captures(_t_cur); |
3040 | 40.9k | _t_cur.sub(_t_ncur.begin()).data(); |
3041 | 40.9k | _t_cur = _t_ncur; |
3042 | 40.9k | if ( _t_trim ) { |
3043 | 40.9k | (*_t_data).trim(_t_cur.begin()); |
3044 | 40.9k | } |
3045 | | |
3046 | 40.9k | break; |
3047 | 40.9k | } |
3048 | 41.0k | } |
3049 | | |
3050 | | // End parsing production: Ctor: number_5 -> /[0-9]+\.[0-9]*/ (regexp); |
3051 | | |
3052 | 41.0k | ::hilti::rt::debug::dedent("spicy"sv); |
3053 | 41.0k | return ::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(_t_cur), ::hilti::rt::optional::make(_t_lah), ::hilti::rt::optional::make(_t_lahe), ::hilti::rt::optional::make(_t_error)); |
3054 | 41.0k | } |
3055 | | |
3056 | 41.1k | auto hlt_internal_HTTP_Request::HTTP::Version::_t_parse_stage1(::hilti::rt::ValueReference<::hilti::rt::Stream>& _t_data, ::hilti::rt::stream::View _t_cur, ::hilti::rt::Bool _t_trim, ::hilti::rt::integer::safe<int64_t> _t_lah, ::hilti::rt::stream::SafeConstIterator _t_lahe, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure> _t_error) -> ::hilti::rt::Tuple<::hilti::rt::stream::View, ::hilti::rt::integer::safe<int64_t>, ::hilti::rt::stream::SafeConstIterator, ::hilti::rt::Optional<::hilti::rt::RecoverableFailure>> { |
3057 | 41.1k | auto _t_self = Version::_t_self(); |
3058 | 41.1k | ::hilti::rt::detail::checkStack(); |
3059 | 41.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:46:16-49:1"); |
3060 | 41.1k | ::hilti::rt::debug::indent("spicy"sv); |
3061 | 41.1k | ::hilti::rt::stream::SafeConstIterator _t_begin_ = _t_cur.begin(); |
3062 | 41.1k | return (*_t_self)._t_parse_HTTP__Version_5_stage2(_t_data, _t_cur, _t_trim, _t_lah, _t_lahe, _t_error); |
3063 | 41.1k | } |
3064 | | |
3065 | 23.8k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on_0x25_done_b977(::hilti::rt::ValueReference<Body>& _t_self) { |
3066 | 23.8k | ::hilti::rt::detail::checkStack(); |
3067 | 23.8k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:180:3-180:28"); |
3068 | 23.8k | (*(*_t_self).data).size(); |
3069 | 23.8k | } |
3070 | | |
3071 | 184 | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on_0x25_error_3735(const std::string& _t_except, ::hilti::rt::ValueReference<Body>& _t_self) { |
3072 | 184 | ::hilti::rt::detail::checkStack(); |
3073 | 184 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:184:3-184:28"); |
3074 | 184 | (*(*_t_self).data).size(); |
3075 | 184 | } |
3076 | | |
3077 | 25.7k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on_0x25_init_948(::hilti::rt::ValueReference<Body>& _t_self) { |
3078 | 25.7k | ::hilti::rt::detail::checkStack(); |
3079 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:161:9-162:90"); |
3080 | 25.7k | if ( (::hilti::rt::tuple::get<0>((*_t_self->_t_p_msg.derefAsValue()).content_type) != ""_b) && (::hilti::rt::tuple::get<1>((*_t_self->_t_p_msg.derefAsValue()).content_type) != ""_b) ) { |
3081 | 22.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:162:13-162:89"); |
3082 | 22.2k | (*(*_t_self).data).connect_mime_type(::hilti::rt::tuple::get<0>((*_t_self->_t_p_msg.derefAsValue()).content_type) + "/"_b + ::hilti::rt::tuple::get<1>((*_t_self->_t_p_msg.derefAsValue()).content_type), hlt_internal_HTTP_Request_hlto_scope); |
3083 | 22.2k | } |
3084 | | |
3085 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:164:9-174:9"); |
3086 | 25.7k | if ( (*_t_self->_t_p_msg.derefAsValue()).content_encoding.hasValue() ) { |
3087 | 10.6k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:165:7-168:5"); |
3088 | 10.6k | if ( (*_t_self->_t_p_msg.derefAsValue()).content_encoding.value() == "gzip"_b ) { |
3089 | 4.19k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:166:17-166:58"); |
3090 | 4.19k | (*(*_t_self).data).connect_filter(::hilti::rt::reference::make_strong<hlt_internal_HTTP_Request::filter::Zlib>(::hilti::rt::struct_::tag::Parameters(), ::hilti::rt::Optional<::hilti::rt::integer::safe<int64_t>>())); |
3091 | 4.19k | } |
3092 | | |
3093 | 10.6k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:170:7-173:5"); |
3094 | 10.6k | if ( (*_t_self->_t_p_msg.derefAsValue()).content_encoding.value() == "deflate"_b ) { |
3095 | 5.56k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:171:17-171:58"); |
3096 | 5.56k | (*(*_t_self).data).connect_filter(::hilti::rt::reference::make_strong<hlt_internal_HTTP_Request::filter::Zlib>(::hilti::rt::struct_::tag::Parameters(), ::hilti::rt::Optional<::hilti::rt::integer::safe<int64_t>>())); |
3097 | 5.56k | } |
3098 | 10.6k | } |
3099 | | |
3100 | 25.7k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:176:9-176:43"); |
3101 | 25.7k | (*(*_t_self).data).connect(::hilti::rt::reference::make_strong<hlt_internal_HTTP_Request::HTTP::Content>(::hilti::rt::struct_::tag::Parameters(), _t_self->_t_p_msg.derefAsValue())); |
3102 | 25.7k | } |
3103 | | |
3104 | 302k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Body__t_on__anon_18_foreach_5059(const ::hilti::rt::Bytes& _t_dd, ::hilti::rt::ValueReference<Body>& _t_self) { |
3105 | 302k | ::hilti::rt::detail::checkStack(); |
3106 | 302k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:153:46-153:64"); |
3107 | 302k | (*(*_t_self).data).write(_t_dd, ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>(), ::hilti::rt::Optional<::hilti::rt::integer::safe<uint64_t>>()); |
3108 | 302k | } |
3109 | | |
3110 | 78.1k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Chunks__t_on_trailer_foreach_9de9(const ::hilti::rt::ValueReference<hlt_internal_HTTP_Request::HTTP::Header>& _t_dd, ::hilti::rt::ValueReference<Chunks>& _t_self) { |
3111 | 78.1k | ::hilti::rt::detail::checkStack(); |
3112 | 78.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:202:27-202:51"); |
3113 | 78.1k | (*_t_self->_t_p_msg.derefAsValue()).headers.value().emplace_back(_t_dd); |
3114 | 78.1k | } |
3115 | | |
3116 | 315k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Content__t_on_data_94d7(::hilti::rt::ValueReference<Content>& _t_self) { |
3117 | 315k | ::hilti::rt::detail::checkStack(); |
3118 | 315k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:190:9-193:13"); |
3119 | 315k | if ( (*_t_self).data.value().size() > ::hilti::rt::integer::safe<std::uint64_t>{0U} ) { |
3120 | 315k | } |
3121 | 315k | } |
3122 | | |
3123 | 177k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Header__t_on_content_b0e0(::hilti::rt::ValueReference<Header>& _t_self) { |
3124 | 177k | ::hilti::rt::detail::checkStack(); |
3125 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:121:9-121:39"); |
3126 | 177k | ::hilti::rt::Bytes name = (*_t_self).name.value().upper(::hilti::rt::unicode::Charset{::hilti::rt::unicode::Charset::UTF8}, ::hilti::rt::unicode::DecodeErrorStrategy{::hilti::rt::unicode::DecodeErrorStrategy::REPLACE}); |
3127 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:123:9-126:13"); |
3128 | 177k | if ( name == "CONTENT-LENGTH"_b ) { |
3129 | 19.5k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:124:13-124:55"); |
3130 | 19.5k | (*_t_self->_t_p_msg.derefAsValue()).content_length.valueOrInit() = (*_t_self).content.value().toUInt(); |
3131 | 19.5k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:125:13-125:31"); |
3132 | 19.5k | (*_t_self->_t_p_msg.derefAsValue()).has_body = ::hilti::rt::Bool(true); |
3133 | 19.5k | } |
3134 | | |
3135 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:128:9-131:13"); |
3136 | 177k | if ( name == "TRANSFER-ENCODING"_b ) { |
3137 | 9.96k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:129:13-129:48"); |
3138 | 9.96k | (*_t_self->_t_p_msg.derefAsValue()).transfer_encoding.valueOrInit() = (*_t_self).content.value(); |
3139 | 9.96k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:130:13-130:31"); |
3140 | 9.96k | (*_t_self->_t_p_msg.derefAsValue()).has_body = ::hilti::rt::Bool(true); |
3141 | 9.96k | } |
3142 | | |
3143 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:133:9-134:48"); |
3144 | 177k | if ( name == "CONTENT-ENCODING"_b ) { |
3145 | 13.2k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:134:13-134:47"); |
3146 | 13.2k | (*_t_self->_t_p_msg.derefAsValue()).content_encoding.valueOrInit() = (*_t_self).content.value(); |
3147 | 13.2k | } |
3148 | | |
3149 | 177k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:136:9-141:13"); |
3150 | 177k | if ( name == "CONTENT-TYPE"_b ) { |
3151 | 15.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:137:13-137:69"); |
3152 | 15.1k | ::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes> ct = (*_t_self).content.value().split1(";"_b); |
3153 | 15.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:138:13-138:62"); |
3154 | 15.1k | ::hilti::rt::Tuple<::hilti::rt::Bytes, ::hilti::rt::Bytes> ty = ::hilti::rt::tuple::get<0>(ct).split1("/"_b); |
3155 | 15.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:139:13-139:77"); |
3156 | 15.1k | (*_t_self->_t_p_msg.derefAsValue()).content_type = ::hilti::rt::tuple::make_from_optionals(::hilti::rt::tuple::wrap_expression([&]() { return ::hilti::rt::tuple::get<0>(ty).strip().upper(::hilti::rt::unicode::Charset{::hilti::rt::unicode::Charset::UTF8}, ::hilti::rt::unicode::DecodeErrorStrategy{::hilti::rt::unicode::DecodeErrorStrategy::REPLACE}); }), ::hilti::rt::tuple::wrap_expression([&]() { return ::hilti::rt::tuple::get<1>(ty).strip().upper(::hilti::rt::unicode::Charset{::hilti::rt::unicode::Charset::UTF8}, ::hilti::rt::unicode::DecodeErrorStrategy{::hilti::rt::unicode::DecodeErrorStrategy::REPLACE}); })); |
3157 | 15.1k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:140:13-140:54"); |
3158 | 15.1k | (*_t_self->_t_p_msg.derefAsValue()).content_type_parameter.valueOrInit() = ::hilti::rt::tuple::get<1>(ct).strip(); |
3159 | 15.1k | } |
3160 | 177k | } |
3161 | | |
3162 | 40.9k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Message__t_on_0x25_init_ad09(::hilti::rt::ValueReference<Message>& _t_self) { |
3163 | 40.9k | ::hilti::rt::detail::checkStack(); |
3164 | 40.9k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:88:9-88:36"); |
3165 | 40.9k | (*_t_self).has_body = _t_self->_t_p_body_default; |
3166 | 40.9k | } |
3167 | | |
3168 | 39.0k | extern void hlt_internal_HTTP_Request::HTTP::_t_hook_Message__t_on_end_of_hdr_960d(::hilti::rt::ValueReference<Message>& _t_self) { |
3169 | 39.0k | ::hilti::rt::detail::checkStack(); |
3170 | 39.0k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:93:9-94:54"); |
3171 | 39.0k | if ( (*_t_self).content_length.hasValue() ) { |
3172 | 18.3k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:94:13-94:53"); |
3173 | 18.3k | (*_t_self).delivery_mode = HTTP::DeliveryMode{HTTP::DeliveryMode::Length}; |
3174 | 18.3k | } |
3175 | | |
3176 | 39.0k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:96:9-104:9"); |
3177 | 39.0k | if ( ::hilti::rt::tuple::get<0>((*_t_self).content_type) == "MULTIPART"_b ) { |
3178 | 7.20k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:97:13-97:88"); |
3179 | 7.20k | ::hilti::rt::Result<::hilti::rt::Bytes> boundary = (*_t_self).content_type_parameter.value().match(::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"boundary=\"([^\"]*)\"", false, 0}}, {}), ::hilti::rt::integer::safe<std::uint64_t>{1U}); |
3180 | 7.20k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:99:13-100:85"); |
3181 | 7.20k | if ( ! (::hilti::rt::Bool(static_cast<bool>(boundary))) ) { |
3182 | 6.88k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:100:17-100:84"); |
3183 | 6.88k | boundary = (*_t_self).content_type_parameter.value().match(::hilti::rt::RegExp({::hilti::rt::regexp::Pattern{"boundary=([^ ;]*)", false, 0}}, {}), ::hilti::rt::integer::safe<std::uint64_t>{1U}); |
3184 | 6.88k | } |
3185 | | |
3186 | 7.20k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:102:13-102:56"); |
3187 | 7.20k | (*_t_self).delivery_mode = HTTP::DeliveryMode{HTTP::DeliveryMode::Multipart}; |
3188 | 7.20k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:103:13-103:67"); |
3189 | 7.20k | (*_t_self).multipart_boundary.valueOrInit() = "--"_b + boundary.valueOrThrow() + "--\015\012"_b; |
3190 | 7.20k | } |
3191 | | |
3192 | 39.0k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:106:9-107:55"); |
3193 | 39.0k | if ( ((*_t_self).transfer_encoding.hasValue()) && ((*_t_self).transfer_encoding.value() == "chunked"_b) ) { |
3194 | 4.57k | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:107:13-107:54"); |
3195 | 4.57k | (*_t_self).delivery_mode = HTTP::DeliveryMode{HTTP::DeliveryMode::Chunked}; |
3196 | 4.57k | } |
3197 | 39.0k | } |
3198 | | |
3199 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_init_module() { |
3200 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Body(); |
3201 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Chunk(); |
3202 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Chunks(); |
3203 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Content(); |
3204 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Header(); |
3205 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Message(); |
3206 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Replies(); |
3207 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Reply(); |
3208 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_ReplyLine(); |
3209 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Request(); |
3210 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_RequestLine(); |
3211 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Requests(); |
3212 | 1 | hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Version(); |
3213 | 1 | } |
3214 | | |
3215 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Body() { |
3216 | 1 | ::hilti::rt::detail::checkStack(); |
3217 | 1 | HTTP::Body::_t_parser = ::spicy::rt::Parser(::hilti::rt::struct_::tag::Inits(), "HTTP::Body"sv, ::hilti::rt::Bool(false), ::hilti::rt::Null(), hlt_HTTP_Request::HTTP::Body::parse2, ::hilti::rt::Null(), ::hilti::rt::Null(), &type_info::_t_ti_HTTP__Body_namex2aHTTP__Bodyx2b, ""s, ::hilti::rt::Vector<::spicy::rt::MIMEType>({}), ::hilti::rt::Vector<::spicy::rt::ParserPort>({})); |
3218 | 1 | ::spicy::rt::detail::registerParser(HTTP::Body::_t_parser, hlt_internal_HTTP_Request_hlto_scope, ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Body>(), &type_info::_t_ti_strong_ref_const_HTTP__Body__strong_refx2anamex2aHTTP__Bodyx2bx2b); |
3219 | 1 | } |
3220 | | |
3221 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Chunk() { ::hilti::rt::detail::checkStack(); } |
3222 | | |
3223 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Chunks() { ::hilti::rt::detail::checkStack(); } |
3224 | | |
3225 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Content() { |
3226 | 1 | ::hilti::rt::detail::checkStack(); |
3227 | 1 | HTTP::Content::_t_parser = ::spicy::rt::Parser(::hilti::rt::struct_::tag::Inits(), "HTTP::Content"sv, ::hilti::rt::Bool(false), ::hilti::rt::Null(), hlt_HTTP_Request::HTTP::Content::parse2, ::hilti::rt::Null(), ::hilti::rt::Null(), &type_info::_t_ti_HTTP__Content_namex2aHTTP__Contentx2b, ""s, ::hilti::rt::Vector<::spicy::rt::MIMEType>({}), ::hilti::rt::Vector<::spicy::rt::ParserPort>({})); |
3228 | 1 | ::spicy::rt::detail::registerParser(HTTP::Content::_t_parser, hlt_internal_HTTP_Request_hlto_scope, ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Content>(), &type_info::_t_ti_strong_ref_const_HTTP__Content__strong_refx2anamex2aHTTP__Contentx2bx2b); |
3229 | 1 | } |
3230 | | |
3231 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Header() { ::hilti::rt::detail::checkStack(); } |
3232 | | |
3233 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Message() { ::hilti::rt::detail::checkStack(); } |
3234 | | |
3235 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Replies() { |
3236 | 1 | ::hilti::rt::detail::checkStack(); |
3237 | 1 | HTTP::Replies::_t_parser = ::spicy::rt::Parser(::hilti::rt::struct_::tag::Inits(), "HTTP::Replies"sv, ::hilti::rt::Bool(true), hlt_HTTP_Request::HTTP::Replies::parse1, hlt_HTTP_Request::HTTP::Replies::parse2, hlt_HTTP_Request::HTTP::Replies::parse3, ::hilti::rt::Null(), &type_info::_t_ti_HTTP__Replies_namex2aHTTP__Repliesx2b, ""s, ::hilti::rt::Vector<::spicy::rt::MIMEType>({}), ::hilti::rt::Vector<::spicy::rt::ParserPort>({::spicy::rt::ParserPort(::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(::hilti::rt::Port("80/tcp")), ::hilti::rt::optional::make(::spicy::rt::Direction{::spicy::rt::Direction::Responder})))})); |
3238 | 1 | ::spicy::rt::detail::registerParser(HTTP::Replies::_t_parser, hlt_internal_HTTP_Request_hlto_scope, ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Replies>(), &type_info::_t_ti_strong_ref_const_HTTP__Replies__strong_refx2anamex2aHTTP__Repliesx2bx2b); |
3239 | 1 | } |
3240 | | |
3241 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Reply() { ::hilti::rt::detail::checkStack(); } |
3242 | | |
3243 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_ReplyLine() { ::hilti::rt::detail::checkStack(); } |
3244 | | |
3245 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Request() { ::hilti::rt::detail::checkStack(); } |
3246 | | |
3247 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_RequestLine() { ::hilti::rt::detail::checkStack(); } |
3248 | | |
3249 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Requests() { |
3250 | 1 | ::hilti::rt::detail::checkStack(); |
3251 | 1 | HTTP::Requests::_t_parser = ::spicy::rt::Parser(::hilti::rt::struct_::tag::Inits(), "HTTP::Requests"sv, ::hilti::rt::Bool(true), hlt_HTTP_Request::HTTP::Requests::parse1, hlt_HTTP_Request::HTTP::Requests::parse2, hlt_HTTP_Request::HTTP::Requests::parse3, ::hilti::rt::Null(), &type_info::_t_ti_HTTP__Requests_namex2aHTTP__Requestsx2b, ""s, ::hilti::rt::Vector<::spicy::rt::MIMEType>({}), ::hilti::rt::Vector<::spicy::rt::ParserPort>({::spicy::rt::ParserPort(::hilti::rt::tuple::make_from_optionals(::hilti::rt::optional::make(::hilti::rt::Port("80/tcp")), ::hilti::rt::optional::make(::spicy::rt::Direction{::spicy::rt::Direction::Originator})))})); |
3252 | 1 | ::spicy::rt::detail::registerParser(HTTP::Requests::_t_parser, hlt_internal_HTTP_Request_hlto_scope, ::hilti::rt::StrongReference<hlt_internal_HTTP_Request::HTTP::Requests>(), &type_info::_t_ti_strong_ref_const_HTTP__Requests__strong_refx2anamex2aHTTP__Requestsx2bx2b); |
3253 | 1 | } |
3254 | | |
3255 | 1 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_HTTP_Version() { ::hilti::rt::detail::checkStack(); } |
3256 | | |
3257 | 2 | extern void hlt_internal_HTTP_Request::HTTP::_t_register_module() { |
3258 | 2 | ::hilti::rt::Library::setScope(&hlt_internal_HTTP_Request_hlto_scope); |
3259 | 2 | ::hilti::rt::detail::registerModule({ "HTTP", hlt_internal_HTTP_Request_hlto_scope, &_t_init_module, nullptr, nullptr, nullptr}); |
3260 | 2 | } |
3261 | | |
3262 | 0 | inline auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, DeliveryMode x) -> std::ostream& { o << ::hilti::rt::to_string(x); return o; } |
3263 | | |
3264 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Message& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3265 | | |
3266 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Header& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3267 | | |
3268 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Body& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3269 | | |
3270 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Chunks& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3271 | | |
3272 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Chunk& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3273 | | |
3274 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Content& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3275 | | |
3276 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Version& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3277 | | |
3278 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::ReplyLine& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3279 | | |
3280 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Reply& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3281 | | |
3282 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Replies& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3283 | | |
3284 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::RequestLine& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3285 | | |
3286 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Request& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3287 | | |
3288 | 0 | extern auto hlt_internal_HTTP_Request::HTTP::operator<<(std::ostream& o, const hlt_internal_HTTP_Request::HTTP::Requests& x) -> std::ostream& { return o << ::hilti::rt::to_string(x);; } |
3289 | | |
3290 | 0 | static auto hlt_internal_HTTP_Request::HTTP::reply_code_needs_body(const ::hilti::rt::integer::safe<uint64_t>& status) -> ::hilti::rt::Bool { |
3291 | 0 | ::hilti::rt::detail::checkStack(); |
3292 | 0 | ::hilti::rt::location("/src/spicy/spicy-http/analyzer/analyzer.spicy:21:4-21:76"); |
3293 | 0 | return (status <= ::hilti::rt::integer::safe<std::uint64_t>{99U}) || ((((status >= ::hilti::rt::integer::safe<std::uint64_t>{200U}) && (status != ::hilti::rt::integer::safe<std::uint64_t>{204U})) && (status != ::hilti::rt::integer::safe<std::uint64_t>{304U}))); |
3294 | 0 | } |
3295 | | |
3296 | | inline void hlt_internal_HTTP_Request::filter::Zlib::_t_on_0x25_done() { |
3297 | | auto _t_self = filter::Zlib::_t_self(); |
3298 | | return hlt_internal_HTTP_Request::filter::_t_hook_Zlib__t_on_0x25_done(_t_self); |
3299 | | } |
3300 | | |
3301 | | inline void hlt_internal_HTTP_Request::filter::Zlib::_t_on_0x25_init() { |
3302 | | auto _t_self = filter::Zlib::_t_self(); |
3303 | | return hlt_internal_HTTP_Request::filter::_t_hook_Zlib__t_on_0x25_init(_t_self); |
3304 | | } |
3305 | | |
3306 | | inline void hlt_internal_HTTP_Request::filter::Zlib::_t_on__anon_28(const ::hilti::rt::Bytes& _t_dd) { |
3307 | | auto _t_self = filter::Zlib::_t_self(); |
3308 | | return hlt_internal_HTTP_Request::filter::_t_hook_Zlib__t_on__anon_28(_t_dd, _t_self); |
3309 | | } |
3310 | | |