diff options
Diffstat (limited to 'MoonParser/pegtl/ascii.hpp')
-rw-r--r-- | MoonParser/pegtl/ascii.hpp | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/MoonParser/pegtl/ascii.hpp b/MoonParser/pegtl/ascii.hpp deleted file mode 100644 index 9158061..0000000 --- a/MoonParser/pegtl/ascii.hpp +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | // Copyright (c) 2014-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_ASCII_HPP | ||
5 | #define TAOCPP_PEGTL_INCLUDE_ASCII_HPP | ||
6 | |||
7 | #include "config.hpp" | ||
8 | #include "eol.hpp" | ||
9 | |||
10 | #include "internal/result_on_found.hpp" | ||
11 | #include "internal/rules.hpp" | ||
12 | |||
13 | namespace tao | ||
14 | { | ||
15 | namespace TAOCPP_PEGTL_NAMESPACE | ||
16 | { | ||
17 | inline namespace ascii | ||
18 | { | ||
19 | // clang-format off | ||
20 | struct alnum : internal::alnum {}; | ||
21 | struct alpha : internal::alpha {}; | ||
22 | struct any : internal::any< internal::peek_char > {}; | ||
23 | struct blank : internal::one< internal::result_on_found::SUCCESS, internal::peek_char, ' ', '\t' > {}; | ||
24 | struct digit : internal::range< internal::result_on_found::SUCCESS, internal::peek_char, '0', '9' > {}; | ||
25 | struct eolf : internal::eolf {}; | ||
26 | struct identifier_first : internal::identifier_first {}; | ||
27 | struct identifier_other : internal::identifier_other {}; | ||
28 | struct identifier : internal::identifier {}; | ||
29 | template< char... Cs > struct istring : internal::istring< Cs... > {}; | ||
30 | template< char... Cs > struct keyword : internal::seq< internal::string< Cs... >, internal::not_at< internal::identifier_other > > {}; | ||
31 | struct lower : internal::range< internal::result_on_found::SUCCESS, internal::peek_char, 'a', 'z' > {}; | ||
32 | template< char... Cs > struct not_one : internal::one< internal::result_on_found::FAILURE, internal::peek_char, Cs... > {}; | ||
33 | template< char Lo, char Hi > struct not_range : internal::range< internal::result_on_found::FAILURE, internal::peek_char, Lo, Hi > {}; | ||
34 | struct nul : internal::one< internal::result_on_found::SUCCESS, internal::peek_char, char( 0 ) > {}; | ||
35 | template< char... Cs > struct one : internal::one< internal::result_on_found::SUCCESS, internal::peek_char, Cs... > {}; | ||
36 | struct print : internal::range< internal::result_on_found::SUCCESS, internal::peek_char, char( 32 ), char( 126 ) > {}; | ||
37 | template< char Lo, char Hi > struct range : internal::range< internal::result_on_found::SUCCESS, internal::peek_char, Lo, Hi > {}; | ||
38 | template< char... Cs > struct ranges : internal::ranges< internal::peek_char, Cs... > {}; | ||
39 | struct seven : internal::range< internal::result_on_found::SUCCESS, internal::peek_char, char( 0 ), char( 127 ) > {}; | ||
40 | struct shebang : internal::if_must< internal::string< '#', '!' >, internal::until< internal::eolf > > {}; | ||
41 | struct space : internal::one< internal::result_on_found::SUCCESS, internal::peek_char, ' ', '\n', '\r', '\t', '\v', '\f' > {}; | ||
42 | template< char... Cs > struct string : internal::string< Cs... > {}; | ||
43 | template< char C > struct two : internal::string< C, C > {}; | ||
44 | struct upper : internal::range< internal::result_on_found::SUCCESS, internal::peek_char, 'A', 'Z' > {}; | ||
45 | struct xdigit : internal::ranges< internal::peek_char, '0', '9', 'a', 'f', 'A', 'F' > {}; | ||
46 | // clang-format on | ||
47 | |||
48 | template<> | ||
49 | struct keyword<> | ||
50 | { | ||
51 | template< typename Input > | ||
52 | static bool match( Input& ) noexcept | ||
53 | { | ||
54 | static_assert( sizeof( Input ) == 0, "empty keywords not allowed" ); | ||
55 | return false; | ||
56 | } | ||
57 | }; | ||
58 | |||
59 | } // namespace ascii | ||
60 | |||
61 | } // namespace TAOCPP_PEGTL_NAMESPACE | ||
62 | |||
63 | } // namespace tao | ||
64 | |||
65 | #include "internal/pegtl_string.hpp" | ||
66 | |||
67 | #endif | ||