• <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++
            久久综合九色综合网站| 欧美亚洲国产精品久久久久| 奇米影视7777久久精品人人爽| 国産精品久久久久久久| 精品久久久久久亚洲| 久久精品99久久香蕉国产色戒 | 国产毛片久久久久久国产毛片| 无码久久精品国产亚洲Av影片| 伊人久久大香线蕉av不卡 | 亚洲精品国产自在久久| 日韩电影久久久被窝网| 久久99精品国产99久久6| 精品国产婷婷久久久| 久久综合视频网站| 久久婷婷五月综合97色直播| 日日噜噜夜夜狠狠久久丁香五月| 综合久久国产九一剧情麻豆 | av午夜福利一片免费看久久| AV无码久久久久不卡网站下载| 日本久久久久久中文字幕| 国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 久久伊人五月天论坛| 久久久午夜精品| 久久久噜噜噜www成人网| 伊人久久大香线焦综合四虎| 香港aa三级久久三级老师2021国产三级精品三级在 | 色综合久久久久久久久五月| 97久久精品国产精品青草| 国产精品美女久久久久AV福利| 久久国产成人| 久久久久久午夜成人影院| 久久久艹| 97精品国产91久久久久久| 亚洲欧美久久久久9999| 国产精品久久影院| 久久婷婷人人澡人人爽人人爱 | 久久精品国产精品亚洲人人| 一本色综合网久久| 久久久久亚洲AV无码专区网站| 久久香蕉超碰97国产精品| 亚洲?V乱码久久精品蜜桃|