diff --git a/include/tao/pegtl/buffer/inputs.hpp b/include/tao/pegtl/buffer/inputs.hpp index 14a543b1f..449f16b3c 100644 --- a/include/tao/pegtl/buffer/inputs.hpp +++ b/include/tao/pegtl/buffer/inputs.hpp @@ -6,6 +6,7 @@ #define TAO_PEGTL_BUFFER_INPUTS_HPP #include "../config.hpp" +#include "../system.hpp" #include "buffers.hpp" @@ -20,46 +21,48 @@ namespace TAO_PEGTL_NAMESPACE { - template< typename Buffer, typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + using tao_buffer_eol = TAO_PEGTL_DEFAULT_EOL; // Details might change. + + template< typename Buffer, typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using buffer_input = internal::input_with_funcs< internal::input_with_lines< Eol, internal::buffer_input_with_source< Buffer, InputSource, ErrorSource > > >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_cstream_input = buffer_input< dynamic_cstream_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_cstring_input = buffer_input< dynamic_cstring_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_endless_input = buffer_input< dynamic_endless_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_istream_input = buffer_input< dynamic_istream_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_cstream_input = buffer_input< static_cstream_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_cstring_input = buffer_input< static_cstring_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_endless_input = buffer_input< static_endless_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_istream_input = buffer_input< static_istream_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Buffer, typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Buffer, typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using text_buffer_input = internal::input_with_funcs< internal::text_buffer_input_with_source< Buffer, Eol, InputSource, ErrorSource > >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_text_cstream_input = text_buffer_input< dynamic_cstream_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_text_cstring_input = text_buffer_input< dynamic_cstring_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_text_endless_input = text_buffer_input< dynamic_endless_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource > using dynamic_text_istream_input = text_buffer_input< dynamic_istream_buffer, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_text_cstream_input = text_buffer_input< static_cstream_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_text_cstring_input = text_buffer_input< static_cstring_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_text_endless_input = text_buffer_input< static_endless_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; - template< typename Eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > + template< typename Eol = tao_buffer_eol, typename InputSource = void, typename ErrorSource = InputSource, std::size_t BufferSize = TAO_PEGTL_DEFAULT_BUFFER_SIZE, std::size_t ChunkSize = TAO_PEGTL_DEFAULT_CHUNK_SIZE > using static_text_istream_input = text_buffer_input< static_istream_buffer< BufferSize, ChunkSize >, Eol, InputSource, ErrorSource >; } // namespace TAO_PEGTL_NAMESPACE