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

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

?? rule.hpp

?? 著名的Parser庫Spirit在VC6上的Port
?? HPP
字號:
/*=============================================================================
    The Production rule

    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_RULE_HPP
#define SPIRIT_RULE_HPP

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

#include "boost/spirit/MSVC/parser.hpp"

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

namespace impl {

    ///////////////////////////////////////////////////////////////////////////////
    //
    //  abstract_parser class
    //
    ///////////////////////////////////////////////////////////////////////////////
    template <typename IteratorT, typename MatchTraitsT>
    class abstract_parser {

    public:

        abstract_parser();
        virtual ~abstract_parser();

        virtual match
        parse(IteratorT& first, IteratorT const& last) const = 0;
    };

    ///////////////////////////////////////////////////////////////////////////////
    //
    //  concrete_parser class
    //
    ///////////////////////////////////////////////////////////////////////////////
    template <typename ParserT, typename IteratorT, typename MatchTraitsT>
    class concrete_parser
    :  public abstract_parser<IteratorT, MatchTraitsT> ,
       public ParserT {

    public:

        concrete_parser(ParserT const& parser_);
		 
        virtual ~concrete_parser();

        virtual match
        parse(IteratorT& first, IteratorT const& last) const;

	private:
		bool dummy;		// needed for correct memory allocation
    };

    ///////////////////////////////////////////////////////////////////////////////
    //
    //  alt_parser class
    //
    ///////////////////////////////////////////////////////////////////////////////
    template <typename ParserT, typename IteratorT, typename MatchTraitsT>
    class alt_parser : public abstract_parser<IteratorT, MatchTraitsT> {

    public:

        alt_parser(abstract_parser<IteratorT, MatchTraitsT>* left, 
                ParserT const& right);
        virtual ~alt_parser();

        virtual match
        parse(IteratorT& first, IteratorT const& last) const;

    private:

        abstract_parser<IteratorT, MatchTraitsT>* left;
        ParserT right;
    };

}

///////////////////////////////////////////////////////////////////////////////
//
//  rule class
//
//      The rule is a polymorphic variable that acts as a named place-
//      holder capturing the behavior of an EBNF expression assigned to
//      it. Naming an EBNF expression allows it to be referenced later
//      on by another EBNF expression. Rules may be forward declared.
//      This enables rules to be recursive. A rule may even reference
//      itself. The limitation is that direct or indirect left recursion
//      is not allowed.
//
//      The rule class models EBNF's production rule. Example:
//
//          Rule<>   a_rule = *(a | b) & +(c | d | e);
//
//      The type and functionality of the right-hand expression, which
//      may be arbitrarily complex, is encoded in the rule named a_rule.
//      a_rule may now be referenced.
//
//      Rules may be declared before it is defined to allow cyclic
//      structures typically found in EBNF declarations. An undefined
//      rule matches nothing. Multiple definitions of a rule are taken
//      as alternatives. Example, the definition:
//
//          r = a;
//          r = b;
//
//      behaves as:
//
//          r = a | b;
//
//      When a rule is invoked by an EBNF expression, the rule is held
//      by the expression by reference. It is the responsibility of the
//      client to ensure that the referenced rule stays in scope and
//      does not get destructed while it is being referenced.
//
///////////////////////////////////////////////////////////////////////////////
template <typename IteratorT, typename MatchTraitsT, typename DerivedT>
class base_rule : public parser<DerivedT> 
{
public:
    typedef IteratorT   iterator_type;
    typedef MatchTraitsT  matchtraits_type;
    typedef DerivedT derived_type;

    match
    parse(IteratorT& first, IteratorT const& last) const;

    template <typename ParserT>
    base_rule&
    operator=(ParserT const& parser_)
    {
       if (meta == 0)
          meta = new impl::concrete_parser<ParserT, IteratorT, MatchTraitsT>(
               parser_);
       else
          meta = new impl::alt_parser<ParserT, IteratorT, MatchTraitsT>(meta, 
                parser_);
       return *this;
    }

    base_rule&
    operator = (base_rule const& other);

// the destructor need to be public for VC++
    ~base_rule() 
      { 
        delete meta; 
      } 

protected:  

// do not construct directly, only derived classes possible
    base_rule();

    //~base_rule();

    template <typename ParserT>
    base_rule(ParserT const& parser_)
    : meta(new impl::concrete_parser<ParserT, IteratorT, MatchTraitsT>(parser_))
   {
   }

    base_rule(base_rule const& other);

private:
    impl::abstract_parser<IteratorT, MatchTraitsT>* meta;
};


//////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////
template <typename IteratorT =  scanner<>, typename MatchTraitsT = match_traits>
class rule : 
    public base_rule<IteratorT, MatchTraitsT, rule<IteratorT, MatchTraitsT> > 
{
    typedef 
        base_rule<IteratorT, MatchTraitsT, rule<IteratorT, MatchTraitsT> >
        base_rule_t;

public:
    typedef rule<IteratorT, MatchTraitsT> self_; 
    rule();

    template <typename ParserT>
    rule(ParserT const& parser_)
    : base_rule<IteratorT, MatchTraitsT, rule<IteratorT, MatchTraitsT> >(parser_)
    {
    }

    rule(rule const& other);

    template <typename ParserT>
    rule&
    operator= (ParserT const& parser_)
    {
       *static_cast<base_rule_t *>(this) = parser_;
       return *this;
    }

    rule&
    operator= (rule const& other);

};

///////////////////////////////////////////////////////////////////////////////
//
//  skipper class
//
//      Utility class that facilitates the skipping of characters.
//      The single member function 'skip' enters a loop incrementing
//      the 'current' iterator until the supplied skip rule fails
//      to match.
//
///////////////////////////////////////////////////////////////////////////////
template <typename IteratorT = char const*, 
    typename MatchTraitsT = match_traits>
class skipper {

public:

    template <typename ParserT>
    skipper(ParserT const& skip_rule_, IteratorT const& last_)
    : last(last_),
      skip_rule(skip_rule_)
    {
    }

    skipper(IteratorT const& last);

    void
    skip(IteratorT& current) const;

private:

    IteratorT           last;
    rule<IteratorT, MatchTraitsT>     skip_rule;
};

///////////////////////////////////////////////////////////////////////////////
}   //  namespace Spirit

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区黑丝| 欧美日韩成人在线| 欧美性猛交xxxx黑人交| 久久久天堂av| 日韩国产精品久久| 欧美日韩黄色一区二区| 亚洲欧洲三级电影| 国产精品综合一区二区| 欧美一级高清片在线观看| 一区二区三区欧美久久| 从欧美一区二区三区| 精品黑人一区二区三区久久| 一区二区三区精品久久久| 粉嫩欧美一区二区三区高清影视| 日韩亚洲国产中文字幕欧美| 亚洲一区二区三区三| 色诱视频网站一区| 国产精品久久久久三级| 国产高清精品久久久久| 欧美一区二区日韩一区二区| 亚洲一区二区三区爽爽爽爽爽| 99久久国产综合色|国产精品| 国产日韩欧美一区二区三区乱码| 美女网站色91| 日韩美女一区二区三区| 美女久久久精品| 日韩亚洲欧美高清| 精品一区二区三区蜜桃| 日韩三级.com| 国产在线精品一区二区| 久久人人爽人人爽| 国产高清精品久久久久| 欧美国产激情一区二区三区蜜月| 国产成人精品亚洲午夜麻豆| 国产亚洲婷婷免费| 成人性生交大合| 国产精品免费丝袜| 91网上在线视频| 一区二区三区在线视频免费观看| 色狠狠av一区二区三区| 午夜a成v人精品| 日韩一区二区免费视频| 国产酒店精品激情| 国产精品乱码一区二区三区软件| 成人av网站免费观看| 亚洲精品第一国产综合野| 欧美性猛交xxxxxxxx| 蜜桃传媒麻豆第一区在线观看| 欧美不卡一区二区三区四区| 国产精品一区二区三区乱码| 国产精品理论在线观看| 欧美性猛交xxxx黑人交| 蜜臀av性久久久久蜜臀aⅴ四虎| 26uuu国产在线精品一区二区| 国产成人aaa| 一级精品视频在线观看宜春院| 在线不卡a资源高清| 日本精品一区二区三区高清| 日韩制服丝袜av| 国产欧美日韩视频在线观看| 91黄色小视频| 久久国产精品99久久人人澡| 国产精品白丝在线| 91精品婷婷国产综合久久竹菊| 国产精品99久久久| 亚洲一区二区美女| 国产性色一区二区| 欧美无乱码久久久免费午夜一区| 老司机一区二区| 亚洲免费观看高清完整版在线观看熊| 欧美日韩国产影片| 成人白浆超碰人人人人| 水野朝阳av一区二区三区| 亚洲国产精品传媒在线观看| 欧美日韩在线播放三区| 成人午夜激情影院| 日韩精品一级二级 | 在线一区二区三区四区五区| 免费看欧美女人艹b| 亚洲免费电影在线| 久久综合色鬼综合色| 欧美吻胸吃奶大尺度电影| 国产91在线|亚洲| 久草这里只有精品视频| 亚洲狠狠爱一区二区三区| 国产精品视频看| ww久久中文字幕| 欧美肥妇free| 在线这里只有精品| thepron国产精品| 国产98色在线|日韩| 久久se这里有精品| 视频一区视频二区中文字幕| 亚洲视频一区二区在线观看| 久久久久国产精品麻豆ai换脸| 欧美一区二区三区在线| 欧美日韩精品一区二区| 欧洲一区二区av| 99精品国产热久久91蜜凸| 国产精品99久久久久久有的能看| 免费高清在线一区| 日本欧美在线看| 成人免费观看男女羞羞视频| 久久99久国产精品黄毛片色诱| 午夜视频一区二区| 亚洲第一av色| 亚洲综合一区二区三区| 亚洲色大成网站www久久九九| 中国色在线观看另类| 国产精品你懂的在线| 国产精品免费视频网站| 国产精品久久久久久久久免费丝袜| 久久久久久久久久久电影| 久久精品一区蜜桃臀影院| 精品国产成人在线影院| 久久综合九色综合久久久精品综合| 91精品久久久久久蜜臀| 日韩欧美一二三| 26uuu色噜噜精品一区二区| 国产视频在线观看一区二区三区| 国产欧美精品一区aⅴ影院| 国产精品午夜久久| 综合久久久久综合| 亚洲综合激情另类小说区| 亚洲妇女屁股眼交7| 轻轻草成人在线| 国产一区二区三区高清播放| 粉嫩av一区二区三区| 91论坛在线播放| 欧美日韩国产成人在线免费| 日韩免费视频一区二区| 国产亚洲欧洲997久久综合| 一区视频在线播放| 亚洲高清在线精品| 精品在线免费观看| 成人性生交大片免费看中文 | 欧美在线视频全部完| 91精品一区二区三区久久久久久 | 欧美日韩不卡在线| 欧美videofree性高清杂交| 久久婷婷久久一区二区三区| 国产精品国产三级国产普通话蜜臀| 一区二区三区在线观看欧美| 日韩av中文字幕一区二区| 国产99久久久精品| 欧美三级在线看| 国产欧美一区二区三区在线老狼| 亚洲欧美激情小说另类| 日本不卡的三区四区五区| 成人黄色一级视频| 欧美一区2区视频在线观看| 亚洲国产成人午夜在线一区| 亚洲电影一级片| 岛国一区二区在线观看| 欧美日韩一区成人| 国产精品美女久久久久久久网站| 五月天激情综合网| 成人性视频免费网站| 1024亚洲合集| 久草这里只有精品视频| 色婷婷av一区二区三区大白胸| 欧美大肚乱孕交hd孕妇| 亚洲一区二区在线免费看| 国产美女精品一区二区三区| 欧美无砖专区一中文字| 中文字幕国产精品一区二区| 男人的j进女人的j一区| 色噜噜狠狠色综合中国| 日本一区二区三区国色天香| 日本欧美一区二区| 欧美综合一区二区| 中文一区在线播放| 韩国一区二区三区| 91麻豆精品国产91久久久更新时间 | 久久影院午夜论| 日本欧美久久久久免费播放网| 91丝袜美女网| 国产精品午夜在线| 国产精品一区二区免费不卡| 欧美精品日日鲁夜夜添| 亚洲欧美另类图片小说| 粉嫩高潮美女一区二区三区| 日韩视频国产视频| 日本中文字幕不卡| 欧美精品一级二级三级| 亚洲一区二区中文在线| 91九色最新地址| 一区二区在线观看不卡| 91亚洲精品久久久蜜桃| 国产精品久久久久永久免费观看 | 亚洲1区2区3区4区| 欧美日韩久久久一区| 一区二区三区免费| 色综合久久综合| 亚洲人快播电影网| 色综合天天综合网国产成人综合天| 中文av一区二区| 97久久超碰国产精品| 中文字幕日本乱码精品影院| 91首页免费视频|