亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? actions.hpp

?? 著名的Parser庫Spirit在VC6上的Port
?? HPP
字號:
/*=============================================================================
    Semantic actions

    Spirit V1.3.1
    Copyright (c) 2001, Joel de Guzman

    This software is provided 'as-is', without any express or implied
    warranty. In no event will the copyright holder be held liable for
    any damages arising from the use of this software.

    Permission is granted to anyone to use this software for any purpose,
    including commercial applications, and to alter it and redistribute
    it freely, subject to the following restrictions:

    1.  The origin of this software must not be misrepresented; you must
        not claim that you wrote the original software. If you use this
        software in a product, an acknowledgment in the product documentation
        would be appreciated but is not required.

    2.  Altered source versions must be plainly marked as such, and must
        not be misrepresented as being the original software.

    3.  This notice may not be removed or altered from any source
        distribution.

    Acknowledgements:

        Special thanks to Dan Nuffer, John (EBo) David, Chris Uzdavinis,
        and Doug Gregor. These people are most instrumental in steering
        Spirit in the right direction.

        Special thanks also to people who have contributed to the code base
        and sample code, ported Spirit to various platforms and compilers,
        gave suggestions, reported and provided bug fixes. Alexander
        Hirner, Andy Elvey, Bogdan Kushnir, Brett Calcott, Bruce Florman,
        Changzhe Han, Colin McPhail, Hakki Dogusan, Jan Bares, Joseph
        Smith, Martijn W. van der Lee, Raghavendra Satish, Remi Delcos, Tom
        Spilman, Vladimir Prus, W. Scott Dillman, David A. Greene, Bob
        Bailey, Hartmut Kaiser.

        Finally special thanks also to people who gave feedback and
        valuable comments, particularly members of Spirit's Source Forge
        mailing list and boost.org.

    URL: http://spirit.sourceforge.net/

=============================================================================*/
#ifndef SPIRIT_ACTION_HPP
#define SPIRIT_ACTION_HPP

///////////////////////////////////////////////////////////////////////////////

#include "boost/spirit/spirit_fwd.hpp"
#include "boost/spirit/MSVC/composite.hpp"
#include "boost/spirit/MSVC/parser.hpp"
#include "boost/type_traits.hpp"
#include "boost/spirit/MSVC/ps_helper.hpp"

///////////////////////////////////////////////////////////////////////////////
namespace spirit {

///////////////////////////////////////////////////////////////////////////////
//
//  action class
//
//      Links a parser with a user defined semantic action. The semantic
//      action may be a function or a functor. A function should be compatible
//      with the interface:
//
//          void f(IteratorT first, IteratorT last);
//
//      Where first points to the current input and last points to one after
//      the end of the input (same as STL algorithms).
//
//      A functor should have a member operator() with a compatible signature
//      as above. Iterators pointing to the matching portion of the input are
//      passed into the function/functor.
//
//      This is the default class that parsers (see parser::operator[]
//      <in parser.hpp>) use when dealing with the construct:
//
//          p[f]
//
//      where p is a parser and f is a function or functor. Sometimes,
//      when appropriate, some parsers overload the parser's operator[]
//      (see char_parser in <primitives.hpp> and xx_parser_gen(s) in
//      <numerics.hpp>).
//
///////////////////////////////////////////////////////////////////////////////
template <typename ParserT, typename ActionT, typename DerivedT>
class base_action
:	public unary<ParserT>,
        public parser<DerivedT> 
{
public:

    typedef action_parser_category parser_category;

    template <typename IteratorT>
    match
    parse(IteratorT& first, IteratorT const& last) const
    { 
       typedef impl::strip_scanner<IteratorT> strip_scanner;
       typename strip_scanner::iterator_type
            begin = strip_scanner::get(first);
       match hit = this->subject().parse(first, last);
      if (hit)
         actor(begin, strip_scanner::get(first));
      return hit;
    }

    ActionT const &predicate() const { return actor; }

protected:
// do not construct directly, only derived classes possible
    base_action(ParserT const& parser, ActionT const& actor_)
    : unary<ParserT>(parser), actor(actor_)  
    {
#     if defined(SPIRIT_DEBUG)
        debug.name (parser.debug.name());
#     endif 
    }

   typename embed_trait<ActionT>::type actor;
          
};

//////////////////////////////////////////////////////////////////////
template <typename ParserT, typename ActionT>
class action :
    public base_action<ParserT, ActionT, action<ParserT, ActionT> >
{
public:
    action(ParserT const& parser, ActionT const& actor_)
    : base_action<ParserT, ActionT, action<ParserT, ActionT> >(parser, actor_)
    {
    } 

};

///////////////////////////////////////////////////////////////////////////////
//
//  reference_wrapper class
//
//      Wraps a reference to a variable of type T. This class also does
//      the dual purpose of acting like a functor that is compatible
//      with the action class above, that expects an interface:
//
//          void operator()(IteratorT begin, IteratorT end);
//
//      When this operator is invoked, the reference_wrapper expects that
//      the referenced object is a container of some sort (e.g. std::string,
//      std::vector) that may be constructed given two iterators, and has
//      a member function swap, that swaps the contents of two containers.
//
//      The reference_wrapper handles the construct:
//
//          p[ref(var)]
//
//      where p is a parser and var is a variable that will hold the parsed
//      result.
//
//          ref(var)
//
//      is a generator that creates a reference_wrapper.
//
//      There is also an alternative:
//
//          void operator()(T val);
//
//      provided. This may be used by other action classes (apart from
//      the one above) that expect this interface (see char_action in
//      <primitives.hpp> and numeric_action in <numerics.hpp>).
//
///////////////////////////////////////////////////////////////////////////////

namespace impl
{
///////////////////////////////////////////////////////////////////////////// 
// reference wrapper should be convertible to its contained type.
// reference_wrappers which wrap the closure elements should be 
// convertible to the closure member type
// So introduce a base class which performs this conversion
///////////////////////////////////////////////////////////////////////////
template <typename DerivedT, typename ElementT, typename ActualT>
struct reference_access_helper_same
{
    operator ElementT&() const
    { 	     
      return static_cast<DerivedT const*>(this)->get();
    }
};

////////////////////////////////////////////////////////////////////////////
template <typename DerivedT, typename ElementT, typename ActualT>
struct reference_access_helper_different
{
    operator ElementT&() const
    { 	     
      return static_cast<DerivedT const*>(this)->get();
    }

    operator ActualT&() const
    { 	     
      return static_cast<DerivedT const*>(this)->get();
    }  
};

} //end namespace impl   


//////////////////////////////////////////////////////////////////////////
template <typename DerivedT, typename ElementT, typename ActualT>
struct reference_access : public 
           impl::IF < boost::is_same<ElementT,ActualT>::value,
	   impl::reference_access_helper_same<DerivedT, ElementT, ActualT>,
	   impl::reference_access_helper_different<DerivedT, ElementT, ActualT> >::RET 
{
};

////////////////////////////////////////////////////////////////////////////
template <typename T>
class reference_wrapper
:   public reference_access<
        reference_wrapper<T>, T,
        typename boost::remove_reference<typename remove_wrap<T>::type>::type
    >
{

public:

    //contained type 	 
    typedef T value_type;

    typedef typename remove_wrap<T>::type actual_ref;
    typedef typename boost::remove_reference<actual_ref>::type actual_type;
    //unwrapped type 
    typedef actual_type argument_type;

    explicit
    reference_wrapper(T& ref_)
    :   ref(ref_) {}

    T&
    get() const { return ref; }
 
    template <typename TX>
    void
    operator()(TX const& val) const
    {
      //ref = (val);
      //require this for VC++ 	     
      ref = TX((val));
    }

    template <typename IteratorT>
    void
    operator()(IteratorT const& begin, IteratorT const& end) const
    {
      //  Create an actual_type object given
      //  begin/end iterators.
      actual_type temp(begin, end);

      //  Swap the contents of our newly created
      //  object and the one we are referencing.
      actual_type& aref = ref;
      aref.swap(temp);
    }

       
private:

    T&  ref;
};

//////////////////////////////////////////////////////////////////////
// Get the underlying wrapper type given a reference_wrapper
// Various non PTS workarounds
//////////////////////////////////////////////////////////////////////
namespace impl
{
///////////////////////////////////////////////////////////////
   template<int i> 	 
   struct unwrap_reference_wrapper_helper  
   {
      template<typename T>
      struct local {
	  typedef T type;
      };
   };

   template<> 	 
   struct unwrap_reference_wrapper_helper<1>  
   {
      template<typename T>
      struct local {
	  typedef typename T::value_type type;
      };
   };

   template<class T> 
   impl::selector1 reference_wrapper_selector(reference_wrapper<T> const&);
   impl::selector2 reference_wrapper_selector(...); 
//////////////////////////////////////////////////////////////////
} //end namespace impl 

template<class T>
struct unwrap_reference_wrapper
{
    static T t(); 
    typedef typename impl::unwrap_reference_wrapper_helper
	    <(sizeof(impl::reference_wrapper_selector(t())))>
           ::template local<T>::type type;
};


/////////////////////////////////////////////////////////////////////////////
namespace impl
{

  template <int i>
  struct is_reference_wrapper_helper
  {
    enum { value = 0};  	   
  };

  template <>
  struct is_reference_wrapper_helper<1>
  {
    enum { value = 1};  	   
  };


  template<class T>
  selector1 is_reference_wrapper_selector(reference_wrapper<T> const &);     	   
  selector2 is_reference_wrapper_selector(...);
//////////////////////////////////////////////////////////////////////////////
}  // end namespace impl

template<class T>
struct is_reference_wrapper
{
    static T t(); 
    enum { value = impl::is_reference_wrapper_helper
	          < 
	           (sizeof(impl::is_reference_wrapper_selector(t())))
                  >::value };
};


///////////////////////////////////////////////////////////////////////////////
//
//  ref generator (Generate a reference_wrapper object)
//
///////////////////////////////////////////////////////////////////////////////
template <class T>
reference_wrapper<T> const 
ref(T& t) 
{
    return reference_wrapper<T>(t); //  Generate a reference_wrapper object.
}
  



}   //  namespace Spirit

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
555www色欧美视频| 在线不卡的av| 精品一区二区三区免费播放 | 亚洲精品国产精华液| 337p粉嫩大胆噜噜噜噜噜91av | 欧美日韩精品高清| 日本伦理一区二区| 色综合天天天天做夜夜夜夜做| 国产福利一区二区| 国产成人免费在线| 高清不卡一区二区| 99久久er热在这里只有精品15| 大胆亚洲人体视频| 97超碰欧美中文字幕| 99精品久久久久久| 欧美怡红院视频| 欧美日韩国产首页| 精品国产污网站| 国产日韩欧美不卡在线| 欧美高清一级片在线观看| 国产精品久久毛片| 亚洲国产成人av好男人在线观看| 亚洲自拍都市欧美小说| 日本欧美在线观看| 国产老肥熟一区二区三区| 成人一级片在线观看| 色综合天天在线| 91精品国产综合久久久久久| 精品入口麻豆88视频| 国产欧美日韩在线| 亚洲在线视频免费观看| 天使萌一区二区三区免费观看| 亚洲3atv精品一区二区三区| 毛片av中文字幕一区二区| 国产成人综合在线观看| 色欧美片视频在线观看| 欧美成人三级电影在线| 国产欧美一区二区精品久导航| 亚洲免费在线视频一区 二区| 日产欧产美韩系列久久99| 国产一区二区美女诱惑| 在线观看网站黄不卡| 精品精品国产高清a毛片牛牛| 国产精品毛片久久久久久久| 天堂久久久久va久久久久| 国产黄色91视频| 欧美疯狂性受xxxxx喷水图片| 久久久久久久久久久久久夜| 亚洲欧美日本韩国| 国产成人免费视频网站高清观看视频| 色狠狠一区二区| 欧美国产精品中文字幕| 青青青爽久久午夜综合久久午夜| 成人免费毛片高清视频| 欧美一区二区大片| 亚洲精品久久7777| 丰满少妇在线播放bd日韩电影| 7777精品伊人久久久大香线蕉| 国产精品久久久久久久午夜片| 蜜乳av一区二区三区| 在线观看视频欧美| 亚洲人成亚洲人成在线观看图片| 久久66热偷产精品| 日韩一区二区三区免费看 | 色综合中文字幕| 久久嫩草精品久久久精品一| 亚洲午夜久久久| 一本大道综合伊人精品热热| 国产亚洲婷婷免费| 九九**精品视频免费播放| 7777精品久久久大香线蕉| 亚洲精品高清在线观看| 91在线视频观看| 国产精品乱码妇女bbbb| 国产成人午夜99999| 欧美电影免费提供在线观看| 图片区小说区区亚洲影院| 欧美在线观看禁18| 亚洲综合色在线| 在线视频欧美精品| 亚洲午夜一区二区三区| 在线亚洲一区二区| 亚洲一区二区视频在线观看| 色综合天天综合在线视频| 亚洲美腿欧美偷拍| 欧美性videosxxxxx| 亚洲成a人v欧美综合天堂 | 日韩激情在线观看| 欧美中文字幕亚洲一区二区va在线 | 成人的网站免费观看| 中文一区在线播放| 91免费版pro下载短视频| 成人欧美一区二区三区小说| 99精品一区二区| 亚洲亚洲精品在线观看| 欧美三日本三级三级在线播放| 亚洲国产一区视频| 欧美一级久久久| 韩日精品视频一区| 国产精品第四页| 在线免费观看日本欧美| 视频一区在线视频| 久久婷婷成人综合色| 粉嫩aⅴ一区二区三区四区| 亚洲欧美激情一区二区| 欧美日韩成人综合天天影院| 蜜臀av一区二区三区| 久久精品在这里| 色综合中文字幕国产 | 欧美aaaaaa午夜精品| 精品久久国产字幕高潮| 成人午夜激情在线| 亚洲国产精品嫩草影院| 精品国产sm最大网站| 91丝袜美腿高跟国产极品老师 | 欧美一区二区三区喷汁尤物| 国产永久精品大片wwwapp| 亚洲欧洲99久久| 日韩一区二区三区视频| 91免费视频网| 精品系列免费在线观看| 一区二区在线观看免费视频播放| 91麻豆精品国产综合久久久久久| 国产精品一区二区无线| 亚洲自拍偷拍综合| 欧美国产禁国产网站cc| 在线综合视频播放| 一本色道亚洲精品aⅴ| 国产伦理精品不卡| 日韩国产高清在线| 一区二区三区中文在线观看| 欧美岛国在线观看| 欧美日韩一区国产| 99re6这里只有精品视频在线观看| 蜜臀久久久久久久| 亚洲一区二区3| 亚洲欧美综合网| 国产三级欧美三级日产三级99| 在线观看免费成人| 99国产精品久久久久久久久久久| 久久不见久久见免费视频7| 亚洲国产精品尤物yw在线观看| 欧美国产一区二区| 久久综合五月天婷婷伊人| 欧美精品亚洲二区| 欧美日韩一区二区在线视频| 99re亚洲国产精品| k8久久久一区二区三区| 国产高清精品久久久久| 极品少妇一区二区三区精品视频 | 亚洲国产成人av好男人在线观看| 中文字幕亚洲欧美在线不卡| 久久久久久9999| 精品国产不卡一区二区三区| 日韩亚洲欧美中文三级| 欧美亚洲综合网| 欧美性一级生活| 欧美色老头old∨ideo| 欧美影视一区二区三区| 在线观看日韩电影| 欧洲国产伦久久久久久久| 91国偷自产一区二区开放时间 | 欧美日韩国产另类一区| 欧美三区免费完整视频在线观看| 91免费版pro下载短视频| 色狠狠av一区二区三区| 色偷偷成人一区二区三区91| zzijzzij亚洲日本少妇熟睡| 成人黄色片在线观看| 91年精品国产| 欧美日韩成人综合| ww亚洲ww在线观看国产| 国产精品视频麻豆| 亚洲精选免费视频| 日韩av一区二区三区四区| 久久精品国产99国产| 国产成人在线观看免费网站| 丁香五精品蜜臀久久久久99网站| 成人av免费观看| 91黄色小视频| 精品国产一区二区三区久久久蜜月| 精品成人a区在线观看| 亚洲国产电影在线观看| 一区二区三区91| 免费av网站大全久久| 成人美女在线视频| 欧美在线视频你懂得| 日韩女优电影在线观看| 中文字幕电影一区| 亚洲成a人片在线不卡一二三区| 久久99国产精品麻豆| 91美女蜜桃在线| 欧美大片在线观看| 亚洲人成伊人成综合网小说| 视频一区中文字幕| 成人91在线观看| 91精品啪在线观看国产60岁| 国产精品免费丝袜| 免费av成人在线| 91国在线观看|