• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆-60  評(píng)論-111  文章-0  trackbacks-0
            #define szNumber "[+-]?[0-9]+"
            #define szWord "[a-z_][a-z0-9\\_]*"
            #define szOp "==?|\\+[=+]?|-[->=]?|\\*=?|/=?|\\|[|=]?|\\\\|\\~|!=?|\\&{1,2}|\\{|\\}|\\[|\\]|\\(|\\)|\\,|\\;|\\:{1,2}|\\?|<[<=]?|>[=>]?|."
            #define szString "\".*?\""
            #define szString2 "'.*?'"

            #define szLineComment "//[^\\n\\r\\f]*"
            #define szComment "/\\*[\\s\\S]*?\\*/"
            #define szPre "#[^\\n\\r\\f]*"

            #define rePack(v) "^\\s*("v")([\\s\\S]*)$"

            void ss_dostring(std::string text)
            {
                FILE 
            * fp=fopen("out.ini","w+");
                
            long pos=0;

                
            const boost::regex reNumber(rePack(szNumber),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex reWord(rePack(szWord),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex reOp(rePack(szOp),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex reString(rePack(szString),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex reString2(rePack(szString2),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex reLineComment(rePack(szLineComment),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex reComment(rePack(szComment),boost::regbase::normal|boost::regbase::icase);
                
            const boost::regex rePre(rePack(szPre),boost::regbase::normal|boost::regbase::icase);
                boost::smatch match;
                
            while (true)
                
            {
                    
            if ( boost::regex_match( text, match, reLineComment) )
                    
            {
                        fprintf(fp,
            "注釋:     %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, reComment) )
                    
            {
                        fprintf(fp,
            "注釋:     %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, rePre) )
                    
            {
                        fprintf(fp,
            "預(yù)處理:   %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, reNumber) )
                    
            {
                        fprintf(fp,
            "number:   %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, reWord) )
                    
            {
                        fprintf(fp,
            "reWord:   %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, reString) )
                    
            {
                        fprintf(fp,
            "String:   %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, reString2) )
                    
            {
                        fprintf(fp,
            "String:   %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            if ( boost::regex_match( text, match, reOp) )
                    
            {
                        fprintf(fp,
            "Op:       %s\n",match.str(1).c_str());
                        text
            =match.str(2);
                        
            continue;
                    }

                    
            break;
                }

                fprintf(fp,
            "剩余:   %s\n",text.substr(0,20).c_str());

                fclose(fp);
            }
            posted on 2007-04-11 15:20 shaker(太子) 閱讀(3144) 評(píng)論(0)  編輯 收藏 引用 所屬分類: C++
            久久国产视频99电影| 久久综合色之久久综合| 人妻精品久久久久中文字幕69| 亚洲日韩中文无码久久| 久久av无码专区亚洲av桃花岛| 69国产成人综合久久精品| 办公室久久精品| 一本色道久久综合狠狠躁| 久久这里只有精品首页| 久久婷婷国产剧情内射白浆| 97超级碰碰碰久久久久| 久久伊人色| 91精品国产高清久久久久久91| 久久久久久国产a免费观看黄色大片 | 国内精品久久久久久久97牛牛| 国产精品美女久久久久av爽 | 亚洲国产成人精品女人久久久 | 久久久久久久久无码精品亚洲日韩| 免费观看久久精彩视频| 狠狠色狠狠色综合久久| 久久99精品久久久久久秒播| 996久久国产精品线观看| 国产精品久久久久久久人人看 | www亚洲欲色成人久久精品| 亚洲AV无码久久寂寞少妇| 久久毛片一区二区| 久久精品18| 久久国产香蕉视频| 99久久99久久精品国产片果冻| 久久精品国产清高在天天线| 欧美日韩精品久久久免费观看 | 久久久久亚洲AV无码永不| 久久综合色老色| 亚洲国产婷婷香蕉久久久久久 | 亚洲人成伊人成综合网久久久| 久久99热这里只频精品6| 亚洲国产婷婷香蕉久久久久久| 国产精品久久久久a影院| 99精品国产免费久久久久久下载| 怡红院日本一道日本久久| 99久久精品国产一区二区|