1 // Copyright (c) 2001-2011 Hartmut Kaiser
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 #if !defined(BOOST_SPIRIT_LEX_SEQUENCE_FUNCTION_FEB_28_2007_0249PM)
7 #define BOOST_SPIRIT_LEX_SEQUENCE_FUNCTION_FEB_28_2007_0249PM
13 #include <boost/spirit/home/lex/domain.hpp>
14 #include <boost/spirit/home/support/unused.hpp>
16 namespace boost { namespace spirit { namespace lex { namespace detail
18 template <typename LexerDef, typename String>
19 struct sequence_collect_function
21 sequence_collect_function(LexerDef& def_, String const& state_
22 , String const& targetstate_)
23 : def(def_), state(state_), targetstate(targetstate_) {}
25 template <typename Component>
26 bool operator()(Component const& component) const
28 component.collect(def, state, targetstate);
29 return false; // execute for all sequence elements
34 String const& targetstate;
37 // silence MSVC warning C4512: assignment operator could not be generated
38 sequence_collect_function& operator= (sequence_collect_function const&);
41 template <typename LexerDef>
42 struct sequence_add_actions_function
44 sequence_add_actions_function(LexerDef& def_)
47 template <typename Component>
48 bool operator()(Component const& component) const
50 component.add_actions(def);
51 return false; // execute for all sequence elements
57 // silence MSVC warning C4512: assignment operator could not be generated
58 sequence_add_actions_function& operator= (sequence_add_actions_function const&);