1 // Copyright (c) 2014-2020 Dr. Colin Hirsch and Daniel Frey
2 // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
3 
4 #ifndef TAO_PEGTL_RULES_HPP
5 #define TAO_PEGTL_RULES_HPP
6 
7 #include "config.hpp"
8 #include "parse_error.hpp"
9 
10 #include "internal/rules.hpp"
11 
12 namespace TAO_PEGTL_NAMESPACE
13 {
14    // clang-format off
15    template< template< typename... > class Action, typename... Rules > struct action : internal::action< Action, Rules... > {};
16    template< typename... Actions > struct apply : internal::apply< Actions... > {};
17    template< typename... Actions > struct apply0 : internal::apply0< Actions... > {};
18    template< typename... Rules > struct at : internal::at< Rules... > {};
19    struct bof : internal::bof {};
20    struct bol : internal::bol {};
21    template< unsigned Num > struct bytes : internal::bytes< Num > {};
22    template< template< typename... > class Control, typename... Rules > struct control : internal::control< Control, Rules... > {};
23    template< typename... Rules > struct disable : internal::disable< Rules... > {};
24    struct discard : internal::discard {};
25    template< typename... Rules > struct enable : internal::enable< Rules... > {};
26    struct eof : internal::eof {};
27    struct eolf : internal::eolf {};
28    struct failure : internal::failure {};
29    template< typename Rule, typename... Actions > struct if_apply : internal::if_apply< Rule, Actions... > {};
30    template< typename Cond, typename... Thens > struct if_must : internal::if_must< false, Cond, Thens... > {};
31    template< typename Cond, typename Then, typename Else > struct if_must_else : internal::if_must_else< Cond, Then, Else > {};
32    template< typename Cond, typename Then, typename Else > struct if_then_else : internal::if_then_else< Cond, Then, Else > {};
33    template< typename Rule, typename Sep, typename Pad = void > struct list : internal::list< Rule, internal::pad< Sep, Pad > > {};
34    template< typename Rule, typename Sep > struct list< Rule, Sep, void > : internal::list< Rule, Sep > {};
35    template< typename Rule, typename Sep, typename Pad = void > struct list_must : internal::list_must< Rule, internal::pad< Sep, Pad > > {};
36    template< typename Rule, typename Sep > struct list_must< Rule, Sep, void > : internal::list_must< Rule, Sep > {};
37    template< typename Rule, typename Sep, typename Pad = void > struct list_tail : internal::list_tail_pad< Rule, Sep, Pad > {};
38    template< typename Rule, typename Sep > struct list_tail< Rule, Sep, void > : internal::list_tail< Rule, Sep > {};
39    template< typename M, typename S > struct minus : internal::minus< M, S > {};
40    template< typename... Rules > struct must : internal::must< Rules... > {};
41    template< typename... Rules > struct not_at : internal::not_at< Rules... > {};
42    template< typename... Rules > struct opt : internal::opt< Rules... > {};
43    template< typename Cond, typename... Rules > struct opt_must : internal::if_must< true, Cond, Rules... > {};
44    template< typename Rule, typename Pad1, typename Pad2 = Pad1 > struct pad : internal::pad< Rule, Pad1, Pad2 > {};
45    template< typename Rule, typename Pad > struct pad_opt : internal::pad_opt< Rule, Pad > {};
46    template< typename Rule, typename... Rules > struct plus : internal::plus< Rule, Rules... > {};
47    template< typename Exception > struct raise : internal::raise< Exception > {};
48    template< typename Head, typename... Rules > struct rematch : internal::rematch< Head, Rules... > {};
49    template< unsigned Num, typename... Rules > struct rep : internal::rep< Num, Rules... > {};
50    template< unsigned Max, typename... Rules > struct rep_max : internal::rep_min_max< 0, Max, Rules... > {};
51    template< unsigned Min, typename Rule, typename... Rules > struct rep_min : internal::rep_min< Min, Rule, Rules... > {};
52    template< unsigned Min, unsigned Max, typename... Rules > struct rep_min_max : internal::rep_min_max< Min, Max, Rules... > {};
53    template< unsigned Max, typename... Rules > struct rep_opt : internal::rep_opt< Max, Rules... > {};
54    template< unsigned Amount > struct require : internal::require< Amount > {};
55    template< typename... Rules > struct seq : internal::seq< Rules... > {};
56    template< typename... Rules > struct sor : internal::sor< Rules... > {};
57    template< typename Rule, typename... Rules > struct star : internal::star< Rule, Rules... > {};
58    template< typename Cond, typename... Rules > struct star_must : internal::star_must< Cond, Rules... > {};
59    template< typename State, typename... Rules > struct state : internal::state< State, Rules... > {};
60    struct success : internal::success {};
61    template< typename... Rules > struct try_catch : internal::try_catch_type< parse_error, Rules... > {};
62    template< typename Exception, typename... Rules > struct try_catch_type : internal::seq< internal::try_catch_type< Exception, Rules... > > {};
63    template< typename Cond, typename... Rules > struct until : internal::until< Cond, Rules... > {};
64    // clang-format on
65 
66 }  // namespace TAO_PEGTL_NAMESPACE
67 
68 #endif
69