1 // Copyright (c) 2014-2018 Dr. Colin Hirsch and Daniel Frey 2 // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/ 3 4 #ifndef TAO_PEGTL_INTERNAL_CONTROL_HPP 5 #define TAO_PEGTL_INTERNAL_CONTROL_HPP 6 7 #include "../config.hpp" 8 9 #include "duseltronik.hpp" 10 #include "seq.hpp" 11 #include "skip_control.hpp" 12 13 #include "../apply_mode.hpp" 14 #include "../rewind_mode.hpp" 15 16 #include "../analysis/generic.hpp" 17 18 namespace tao 19 { 20 namespace TAO_PEGTL_NAMESPACE 21 { 22 namespace internal 23 { 24 template< template< typename... > class Control, typename... Rules > 25 struct control 26 { 27 using analyze_t = analysis::generic< analysis::rule_type::SEQ, Rules... >; 28 29 template< apply_mode A, 30 rewind_mode M, 31 template< typename... > class Action, 32 template< typename... > class, 33 typename Input, 34 typename... States > matchtao::TAO_PEGTL_NAMESPACE::internal::control35 static bool match( Input& in, States&&... st ) 36 { 37 return duseltronik< seq< Rules... >, A, M, Action, Control >::match( in, st... ); 38 } 39 }; 40 41 template< template< typename... > class Control, typename... Rules > 42 struct skip_control< control< Control, Rules... > > : std::true_type 43 { 44 }; 45 46 } // namespace internal 47 48 } // namespace TAO_PEGTL_NAMESPACE 49 50 } // namespace tao 51 52 #endif 53