aboutsummaryrefslogtreecommitdiff
path: root/MoonParser/pegtl/internal/plus.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'MoonParser/pegtl/internal/plus.hpp')
-rw-r--r--MoonParser/pegtl/internal/plus.hpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/MoonParser/pegtl/internal/plus.hpp b/MoonParser/pegtl/internal/plus.hpp
deleted file mode 100644
index 5adc1f8..0000000
--- a/MoonParser/pegtl/internal/plus.hpp
+++ /dev/null
@@ -1,61 +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_INTERNAL_PLUS_HPP
5#define TAOCPP_PEGTL_INCLUDE_INTERNAL_PLUS_HPP
6
7#include <type_traits>
8
9#include "../config.hpp"
10
11#include "duseltronik.hpp"
12#include "opt.hpp"
13#include "seq.hpp"
14#include "skip_control.hpp"
15#include "star.hpp"
16
17#include "../apply_mode.hpp"
18#include "../rewind_mode.hpp"
19
20#include "../analysis/generic.hpp"
21
22namespace tao
23{
24 namespace TAOCPP_PEGTL_NAMESPACE
25 {
26 namespace internal
27 {
28 // While plus<> could easily be implemented with
29 // seq< Rule, Rules ..., star< Rule, Rules ... > > we
30 // provide an explicit implementation to optimise away
31 // the otherwise created input mark.
32
33 template< typename Rule, typename... Rules >
34 struct plus
35 {
36 using analyze_t = analysis::generic< analysis::rule_type::SEQ, Rule, Rules..., opt< plus > >;
37
38 template< apply_mode A,
39 rewind_mode M,
40 template< typename... > class Action,
41 template< typename... > class Control,
42 typename Input,
43 typename... States >
44 static bool match( Input& in, States&&... st )
45 {
46 return duseltronik< seq< Rule, Rules... >, A, M, Action, Control >::match( in, st... ) && duseltronik< star< Rule, Rules... >, A, M, Action, Control >::match( in, st... );
47 }
48 };
49
50 template< typename Rule, typename... Rules >
51 struct skip_control< plus< Rule, Rules... > > : std::true_type
52 {
53 };
54
55 } // namespace internal
56
57 } // namespace TAOCPP_PEGTL_NAMESPACE
58
59} // namespace tao
60
61#endif