diff options
Diffstat (limited to 'MoonParser/pegtl/parse.hpp')
-rw-r--r-- | MoonParser/pegtl/parse.hpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/MoonParser/pegtl/parse.hpp b/MoonParser/pegtl/parse.hpp deleted file mode 100644 index c478cfa..0000000 --- a/MoonParser/pegtl/parse.hpp +++ /dev/null | |||
@@ -1,53 +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_PARSE_HPP | ||
5 | #define TAOCPP_PEGTL_INCLUDE_PARSE_HPP | ||
6 | |||
7 | #include "apply_mode.hpp" | ||
8 | #include "config.hpp" | ||
9 | #include "normal.hpp" | ||
10 | #include "nothing.hpp" | ||
11 | #include "parse_error.hpp" | ||
12 | #include "rewind_mode.hpp" | ||
13 | |||
14 | namespace tao | ||
15 | { | ||
16 | namespace TAOCPP_PEGTL_NAMESPACE | ||
17 | { | ||
18 | template< typename Rule, | ||
19 | template< typename... > class Action = nothing, | ||
20 | template< typename... > class Control = normal, | ||
21 | apply_mode A = apply_mode::ACTION, | ||
22 | rewind_mode M = rewind_mode::REQUIRED, | ||
23 | typename Input, | ||
24 | typename... States > | ||
25 | bool parse( Input&& in, States&&... st ) | ||
26 | { | ||
27 | return Control< Rule >::template match< A, M, Action, Control >( in, st... ); | ||
28 | } | ||
29 | |||
30 | template< typename Rule, | ||
31 | template< typename... > class Action = nothing, | ||
32 | template< typename... > class Control = normal, | ||
33 | apply_mode A = apply_mode::ACTION, | ||
34 | rewind_mode M = rewind_mode::REQUIRED, | ||
35 | typename Outer, | ||
36 | typename Input, | ||
37 | typename... States > | ||
38 | bool parse_nested( const Outer& oi, Input&& in, States&&... st ) | ||
39 | { | ||
40 | try { | ||
41 | return parse< Rule, Action, Control, A, M >( in, st... ); | ||
42 | } | ||
43 | catch( parse_error& e ) { | ||
44 | e.positions.push_back( oi.position() ); | ||
45 | throw; | ||
46 | } | ||
47 | } | ||
48 | |||
49 | } // namespace TAOCPP_PEGTL_NAMESPACE | ||
50 | |||
51 | } // namespace tao | ||
52 | |||
53 | #endif | ||