aboutsummaryrefslogtreecommitdiff
path: root/MoonParser/pegtl/internal/action.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'MoonParser/pegtl/internal/action.hpp')
-rw-r--r--MoonParser/pegtl/internal/action.hpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/MoonParser/pegtl/internal/action.hpp b/MoonParser/pegtl/internal/action.hpp
new file mode 100644
index 0000000..933bffe
--- /dev/null
+++ b/MoonParser/pegtl/internal/action.hpp
@@ -0,0 +1,52 @@
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_INTERNAL_ACTION_HPP
5#define TAOCPP_PEGTL_INCLUDE_INTERNAL_ACTION_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
18namespace tao
19{
20 namespace TAOCPP_PEGTL_NAMESPACE
21 {
22 namespace internal
23 {
24 template< template< typename... > class Action, typename... Rules >
25 struct action
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,
32 template< typename... > class Control,
33 typename Input,
34 typename... States >
35 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 Action, typename... Rules >
42 struct skip_control< action< Action, Rules... > > : std::true_type
43 {
44 };
45
46 } // namespace internal
47
48 } // namespace TAOCPP_PEGTL_NAMESPACE
49
50} // namespace tao
51
52#endif