// Copyright (c) 2001-2011 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) #ifndef BOOST_SPIRIT_LEX_LEXER_SEQUENCE_HPP #define BOOST_SPIRIT_LEX_LEXER_SEQUENCE_HPP #if defined(_MSC_VER) #pragma once #endif #include #include #include #include #include #include #include namespace boost { namespace spirit { /////////////////////////////////////////////////////////////////////////// // Enablers /////////////////////////////////////////////////////////////////////////// template <> struct use_operator // enables | : mpl::true_ {}; template <> struct flatten_tree // flattens | : mpl::true_ {}; }} namespace boost { namespace spirit { namespace lex { template struct sequence : nary_lexer > { sequence(Elements const& elements) : elements(elements) {} template void collect(LexerDef& lexdef, String const& state , String const& targetstate) const { typedef detail::sequence_collect_function collect_function_type; collect_function_type f (lexdef, state, targetstate); fusion::any(elements, f); } template void add_actions(LexerDef& lexdef) const { detail::sequence_add_actions_function f (lexdef); fusion::any(elements, f); } Elements elements; }; /////////////////////////////////////////////////////////////////////////// // Lexer generator: make_xxx function (objects) /////////////////////////////////////////////////////////////////////////// template struct make_composite : make_nary_composite {}; }}} // namespace boost::spirit::lex #endif