• <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  評論-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,
            "預處理:   %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(太子) 閱讀(3130) 評論(0)  編輯 收藏 引用 所屬分類: C++
            蜜桃麻豆www久久| 亚洲成色WWW久久网站| 性做久久久久久免费观看| 伊人久久大香线蕉亚洲| 国产亚洲欧美成人久久片| 欧美精品丝袜久久久中文字幕| 久久综合给合久久狠狠狠97色69| 国产福利电影一区二区三区久久久久成人精品综合 | 丁香色欲久久久久久综合网| 69久久夜色精品国产69| 久久这里只有精品首页| 国产免费福利体检区久久| 国产亚洲精品美女久久久| 久久人人爽人人爽人人片av麻烦 | 婷婷久久香蕉五月综合加勒比| 99久久婷婷国产综合精品草原| 亚洲精品白浆高清久久久久久| 91秦先生久久久久久久| 新狼窝色AV性久久久久久| 欧美色综合久久久久久| 久久99精品国产麻豆宅宅| 久久久女人与动物群交毛片| 伊人久久大香线蕉综合热线| 久久九色综合九色99伊人| 久久综合欧美成人| 久久99精品久久久久久久久久| 久久国产免费直播| 久久成人国产精品免费软件| 欧美国产成人久久精品| 国产精品免费久久久久久久久| 国产精品久久毛片完整版| 久久久无码精品亚洲日韩蜜臀浪潮 | 9999国产精品欧美久久久久久| 久久99久久99精品免视看动漫| 色欲久久久天天天综合网精品| 精品综合久久久久久98| 久久久久久久波多野结衣高潮| 欧美国产成人久久精品| 亚洲va中文字幕无码久久不卡| 色综合久久中文字幕无码| 久久久久无码精品国产|