eedb/share/include/tao/json/external/pegtl/internal/control.hh
2017-02-26 09:32:45 +01:00

37 lines
1.1 KiB
C++

// Copyright (c) 2014-2015 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/ColinH/PEGTL/
#ifndef TAO_CPP_PEGTL_INTERNAL_CONTROL_HH
#define TAO_CPP_PEGTL_INTERNAL_CONTROL_HH
#include "skip_control.hh"
#include "seq.hh"
#include "rule_match_three.hh"
#include "../analysis/generic.hh"
namespace tao_json_pegtl
{
namespace internal
{
template< template< typename ... > class Control, typename ... Rules >
struct control
{
using analyze_t = analysis::generic< analysis::rule_type::SEQ, Rules ... >;
template< apply_mode A, template< typename ... > class Action, template< typename ... > class, typename Input, typename ... States >
static bool match( Input & in, States && ... st )
{
return rule_match_three< seq< Rules ... >, A, Action, Control >::match( in, st ... );
}
};
template< template< typename ... > class Control, typename ... Rules >
struct skip_control< control< Control, Rules ... > > : std::true_type {};
} // namespace internal
} // namespace tao_json_pegtl
#endif