diff options
Diffstat (limited to 'MoonParser/pegtl/cstream_input.hpp')
-rw-r--r-- | MoonParser/pegtl/cstream_input.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/MoonParser/pegtl/cstream_input.hpp b/MoonParser/pegtl/cstream_input.hpp new file mode 100644 index 0000000..ad520e3 --- /dev/null +++ b/MoonParser/pegtl/cstream_input.hpp | |||
@@ -0,0 +1,34 @@ | |||
1 | // Copyright (c) 2017 Dr. Colin Hirsch and Daniel Frey | ||
2 | // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ | ||
3 | |||
4 | #ifndef TAOCPP_PEGTL_INCLUDE_CSTREAM_INPUT_HPP | ||
5 | #define TAOCPP_PEGTL_INCLUDE_CSTREAM_INPUT_HPP | ||
6 | |||
7 | #include <cstdio> | ||
8 | |||
9 | #include "buffer_input.hpp" | ||
10 | #include "config.hpp" | ||
11 | #include "eol.hpp" | ||
12 | |||
13 | #include "internal/cstream_reader.hpp" | ||
14 | |||
15 | namespace tao | ||
16 | { | ||
17 | namespace TAOCPP_PEGTL_NAMESPACE | ||
18 | { | ||
19 | template< typename Eol = eol::lf_crlf > | ||
20 | struct cstream_input | ||
21 | : buffer_input< internal::cstream_reader, Eol > | ||
22 | { | ||
23 | template< typename T > | ||
24 | cstream_input( std::FILE* in_stream, const std::size_t in_maximum, T&& in_source ) | ||
25 | : buffer_input< internal::cstream_reader, Eol >( std::forward< T >( in_source ), in_maximum, in_stream ) | ||
26 | { | ||
27 | } | ||
28 | }; | ||
29 | |||
30 | } // namespace TAOCPP_PEGTL_NAMESPACE | ||
31 | |||
32 | } // namespace tao | ||
33 | |||
34 | #endif | ||