// Copyright (c) 2001-2011 Hartmut Kaiser // Copyright (c) 2001-2011 Joel de Guzman // // 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_LEX_REFERENCE_APR_20_2009_0827AM) #define BOOST_SPIRIT_LEX_REFERENCE_APR_20_2009_0827AM #if defined(_MSC_VER) #pragma once #endif #include #include #include #include #include #include namespace boost { namespace spirit { namespace lex { /////////////////////////////////////////////////////////////////////////// // reference is a lexer that references another lexer (its Subject) // all lexer components are at the same time /////////////////////////////////////////////////////////////////////////// template struct reference; template struct reference : qi::reference , lexer_type > { reference(Subject& subject) : qi::reference(subject) {} template void collect(LexerDef& lexdef, String const& state , String const& targetstate) const { this->ref.get().collect(lexdef, state, targetstate); } template void add_actions(LexerDef& lexdef) const { this->ref.get().add_actions(lexdef); } }; template struct reference : reference { reference(Subject& subject) : reference(subject) {} IdType id() const { return this->ref.get().id(); } std::size_t unique_id() const { return this->ref.get().unique_id(); } std::size_t state() const { return this->ref.get().state(); } }; }}} namespace boost { namespace spirit { namespace traits { /////////////////////////////////////////////////////////////////////////// template struct handles_container , Attribute, Context, Iterator> : handles_container< typename remove_const::type, Attribute, Context, Iterator> {}; }}} #endif