Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 10:02:15

0001 //  Copyright (c) 2001-2011 Hartmut Kaiser
0002 // 
0003 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
0004 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #if !defined(BOOST_SPIRIT_LEX_SEQUENCE_FUNCTION_FEB_28_2007_0249PM)
0007 #define BOOST_SPIRIT_LEX_SEQUENCE_FUNCTION_FEB_28_2007_0249PM
0008 
0009 #if defined(_MSC_VER)
0010 #pragma once
0011 #endif
0012 
0013 #include <boost/spirit/home/lex/domain.hpp>
0014 #include <boost/spirit/home/support/unused.hpp>
0015 
0016 namespace boost { namespace spirit { namespace lex { namespace detail
0017 {
0018 #ifdef _MSC_VER
0019 #  pragma warning(push)
0020 #  pragma warning(disable: 4512) // assignment operator could not be generated.
0021 #endif
0022     template <typename LexerDef, typename String>
0023     struct sequence_collect_function
0024     {
0025         sequence_collect_function(LexerDef& def_, String const& state_
0026               , String const& targetstate_)
0027           : def(def_), state(state_), targetstate(targetstate_) {}
0028 
0029         template <typename Component>
0030         bool operator()(Component const& component) const
0031         {
0032             component.collect(def, state, targetstate);
0033             return false;     // execute for all sequence elements
0034         }
0035 
0036         LexerDef& def;
0037         String const& state;
0038         String const& targetstate;
0039     };
0040 
0041     template <typename LexerDef>
0042     struct sequence_add_actions_function
0043     {
0044         sequence_add_actions_function(LexerDef& def_)
0045           : def(def_) {}
0046 
0047         template <typename Component>
0048         bool operator()(Component const& component) const
0049         {
0050             component.add_actions(def);
0051             return false;     // execute for all sequence elements
0052         }
0053 
0054         LexerDef& def;
0055     };
0056 #ifdef _MSC_VER
0057 #  pragma warning(pop)
0058 #endif
0059 
0060 }}}}
0061 
0062 #endif