• <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久久综合国产精品二区| 精品欧美一区二区三区久久久| 91久久精品电影| 性做久久久久久免费观看| 精品多毛少妇人妻AV免费久久| 久久精品免费大片国产大片| 精品久久人人爽天天玩人人妻| 狼狼综合久久久久综合网| 国产精品欧美亚洲韩国日本久久 | 亚洲国产成人精品女人久久久 | 97精品伊人久久大香线蕉| 亚洲精品国产字幕久久不卡| 精品久久久久久无码中文野结衣| 无码伊人66久久大杳蕉网站谷歌| 久久久精品人妻无码专区不卡| 亚洲va久久久噜噜噜久久男同| 久久影院久久香蕉国产线看观看| 久久精品水蜜桃av综合天堂| 久久性生大片免费观看性| 国产午夜精品久久久久免费视 | 色欲综合久久躁天天躁| 国产精品视频久久久| 成人午夜精品无码区久久| 亚洲国产成人久久综合区| 国产—久久香蕉国产线看观看 | 无码久久精品国产亚洲Av影片| 久久久久国产精品三级网| 狠狠色丁香婷婷久久综合不卡| 伊人久久大香线蕉综合Av| 日本久久中文字幕| 久久久久久久综合综合狠狠| 国产呻吟久久久久久久92| 久久国产精品-久久精品| 777米奇久久最新地址| 国产精品久久久久久吹潮| 久久香蕉国产线看观看精品yw| 国产色综合久久无码有码| 亚洲精品无码久久久久去q| 色诱久久久久综合网ywww| 久久久久女人精品毛片|