/src/Fast-DDS/thirdparty/taocpp-pegtl/pegtl/internal/must.hpp
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) 2014-2020 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_MUST_HPP |
5 | | #define TAO_PEGTL_INTERNAL_MUST_HPP |
6 | | |
7 | | #include "../config.hpp" |
8 | | |
9 | | #include "raise.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 | | // The general case applies must<> to each of the |
25 | | // rules in the 'Rules' parameter pack individually. |
26 | | |
27 | | template< typename... Rules > |
28 | | struct must |
29 | | : seq< must< Rules >... > |
30 | | { |
31 | | }; |
32 | | |
33 | | // While in theory the implementation for a single rule could |
34 | | // be simplified to must< Rule > = sor< Rule, raise< Rule > >, this |
35 | | // would result in some unnecessary run-time overhead. |
36 | | |
37 | | template< typename Rule > |
38 | | struct must< Rule > |
39 | | { |
40 | | using analyze_t = typename Rule::analyze_t; |
41 | | |
42 | | template< apply_mode A, |
43 | | rewind_mode, |
44 | | template< typename... > |
45 | | class Action, |
46 | | template< typename... > |
47 | | class Control, |
48 | | typename Input, |
49 | | typename... States > |
50 | | static bool match( Input& in, States&&... st ) |
51 | 0 | { |
52 | 0 | if( !Control< Rule >::template match< A, rewind_mode::dontcare, Action, Control >( in, st... ) ) { |
53 | 0 | raise< Rule >::template match< A, rewind_mode::dontcare, Action, Control >( in, st... ); |
54 | 0 | } |
55 | 0 | return true; |
56 | 0 | } Unexecuted instantiation: _ZN3tao5pegtl8internal4mustIJN8eprosima7fastdds3dds12DDSSQLFilter16FilterExpressionEEE5matchILNS0_10apply_modeE1ELNS0_11rewind_modeE0ETtTpTyENS0_7nothingETtTpTyENS0_10parse_tree8internal12make_controlINS6_6parser9ParseNodeENSG_8selectorENS0_6normalEE4typeENS0_12memory_inputILNS0_13tracking_modeE0ENS0_5ascii3eol7lf_crlfENSt3__112basic_stringIcNSR_11char_traitsIcEENSR_9allocatorIcEEEEEEJRNSG_22CurrentIdentifierStateERNSE_5stateISH_EEEEEbRT3_DpOT4_ Unexecuted instantiation: _ZN3tao5pegtl8internal4mustIJN8eprosima7fastdds3dds12DDSSQLFilter9ConditionEEE5matchILNS0_10apply_modeE1ELNS0_11rewind_modeE0ETtTpTyENS0_7nothingETtTpTyENS0_10parse_tree8internal12make_controlINS6_6parser9ParseNodeENSG_8selectorENS0_6normalEE4typeENS0_12memory_inputILNS0_13tracking_modeE0ENS0_5ascii3eol7lf_crlfENSt3__112basic_stringIcNSR_11char_traitsIcEENSR_9allocatorIcEEEEEEJRNSG_22CurrentIdentifierStateERNSE_5stateISH_EEEEEbRT3_DpOT4_ Unexecuted instantiation: _ZN3tao5pegtl8internal4mustIJNS0_3eofEEE5matchILNS0_10apply_modeE1ELNS0_11rewind_modeE0ETtTpTyENS0_7nothingETtTpTyENS0_10parse_tree8internal12make_controlIN8eprosima7fastdds3dds12DDSSQLFilter6parser9ParseNodeENSG_8selectorENS0_6normalEE4typeENS0_12memory_inputILNS0_13tracking_modeE0ENS0_5ascii3eol7lf_crlfENSt3__112basic_stringIcNSR_11char_traitsIcEENSR_9allocatorIcEEEEEEJRNSG_22CurrentIdentifierStateERNSA_5stateISH_EEEEEbRT3_DpOT4_ Unexecuted instantiation: _ZN3tao5pegtl8internal4mustIJN8eprosima7fastdds3dds12DDSSQLFilter7LiteralEEE5matchILNS0_10apply_modeE1ELNS0_11rewind_modeE0ETtTpTyENS0_7nothingETtTpTyENS0_10parse_tree8internal12make_controlINS6_6parser9ParseNodeENSG_8selectorENS0_6normalEE4typeENS0_12memory_inputILNS0_13tracking_modeE0ENS0_5ascii3eol7lf_crlfENSt3__112basic_stringIcNSR_11char_traitsIcEENSR_9allocatorIcEEEEEEJRNSG_22CurrentIdentifierStateERNSE_5stateISH_EEEEEbRT3_DpOT4_ |
57 | | }; |
58 | | |
59 | | template< typename... Rules > |
60 | | struct skip_control< must< Rules... > > : std::true_type |
61 | | { |
62 | | }; |
63 | | |
64 | | } // namespace internal |
65 | | |
66 | | } // namespace TAO_PEGTL_NAMESPACE |
67 | | |
68 | | } // namespace tao |
69 | | |
70 | | #endif |