/*============================================================================= Copyright (c) 2001-2007 Joel de Guzman Copyright (c) 2001-2008 Hartmut Kaiser Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(BOOST_SPIRIT_META_GRAMMAR_MARCH_23_2007_0537PM) #define BOOST_SPIRIT_META_GRAMMAR_MARCH_23_2007_0537PM #include #include #include #include namespace boost { namespace spirit { template struct functor_holder; }} namespace boost { namespace spirit { namespace qi { /////////////////////////////////////////////////////////////////////////// // forwards /////////////////////////////////////////////////////////////////////////// struct none; struct eps_parser; struct semantic_predicate; struct lazy_parser; struct functor_director; struct eol_director; struct eoi_director; template struct negated_end_director; /////////////////////////////////////////////////////////////////////////// template struct is_valid_expr; template struct expr_transform; /////////////////////////////////////////////////////////////////////////// // auxiliary parsers meta-grammar /////////////////////////////////////////////////////////////////////////// // none, eps and eps(f) struct auxiliary_meta_grammar1 : proto::or_< meta_grammar::empty_terminal_rule< qi::domain, tag::none, none> , meta_grammar::empty_terminal_rule< qi::domain, tag::eps, eps_parser> , meta_grammar::function1_rule< qi::domain, tag::eps, semantic_predicate> , meta_grammar::function1_rule< qi::domain, tag::lazy, lazy_parser> , meta_grammar::terminal_rule< qi::domain , functor_holder , functor_director > > { }; // eol, eoi struct auxiliary_end_meta_grammar : proto::or_< meta_grammar::terminal_rule , meta_grammar::terminal_rule > { }; struct negated_auxiliary_end_meta_grammar : proto::or_< auxiliary_end_meta_grammar , meta_grammar::compose_single< proto::unary_expr< proto::tag::complement , negated_auxiliary_end_meta_grammar > , qi::domain , negated_end_director > > { }; struct auxiliary_meta_grammar : proto::or_< auxiliary_meta_grammar1 , negated_auxiliary_end_meta_grammar > { }; /////////////////////////////////////////////////////////////////////////// // These specializations non-intrusively hooks into the RD meta-grammar. // (see qi/meta_grammar.hpp) /////////////////////////////////////////////////////////////////////////// template struct is_valid_expr >::type> : mpl::true_ { }; template struct expr_transform >::type> : mpl::identity { }; }}} #endif