• <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精品成人片欧美| 久久综合给合久久狠狠狠97色69| 99久久无色码中文字幕人妻| 久久99亚洲网美利坚合众国| 亚洲成色999久久网站| 久久亚洲国产精品五月天婷| 综合网日日天干夜夜久久| AV无码久久久久不卡网站下载| 日本福利片国产午夜久久| 国产一区二区久久久| 久久线看观看精品香蕉国产| 欧美与黑人午夜性猛交久久久| 热re99久久6国产精品免费| 国内精品伊人久久久久影院对白| 国内精品人妻无码久久久影院导航| 精品久久久久久国产91| 欧美久久久久久| 亚洲天堂久久精品| 久久精品国产亚洲精品2020| 性高朝久久久久久久久久| 久久久久久亚洲精品成人| 色综合久久久久综合99| 久久夜色tv网站| 久久久久久午夜成人影院| 精品国产日韩久久亚洲| 精品久久久久中文字幕一区| 久久久一本精品99久久精品88| 精品人妻伦九区久久AAA片69| 久久天天躁夜夜躁狠狠躁2022| 午夜精品久久久久9999高清| 91精品国产91久久久久久| 精品一二三区久久aaa片| 久久久久97国产精华液好用吗| 国产精品久久久久久福利69堂| 久久精品中文字幕无码绿巨人| AV无码久久久久不卡蜜桃| 无码人妻少妇久久中文字幕蜜桃| 久久婷婷五月综合97色直播| 国产激情久久久久久熟女老人|