锘??xml version="1.0" encoding="utf-8" standalone="yes"?>伊人久久综合无码成人网,久久婷婷激情综合色综合俺也去 ,久久99精品久久久久婷婷http://www.shnenglu.com/lwch/category/14125.html銆怮Q:510134884銆戙愮紪璇戝師鐞嗕氦嫻佺兢:83905136銆戙怤Script欏圭洰緹?38843264銆戙怑mail:lwch4@163.com銆?/description>zh-cnTue, 08 Feb 2011 00:24:26 GMTTue, 08 Feb 2011 00:24:26 GMT60浣跨敤鍐呰仈姹囩紪鍔ㄦ佽皟鐢―LLhttp://www.shnenglu.com/lwch/archive/2011/02/06/139767.htmllwchlwchSun, 06 Feb 2011 14:21:00 GMThttp://www.shnenglu.com/lwch/archive/2011/02/06/139767.htmlhttp://www.shnenglu.com/lwch/comments/139767.htmlhttp://www.shnenglu.com/lwch/archive/2011/02/06/139767.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/139767.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/139767.html__cdecl(鍗沖弬鏁頒粠鍙沖悜宸︿緷嬈¤繘鏍?鐢辮皟鐢ㄨ呰繕鍘熷爢鏍?.
2.涓鏉ush鎸囦護鏈澶氬帇鍏?涓瓧鑺?褰撲笉瓚?涓瓧鑺傛椂搴旇ˉ榻?涓瓧鑺?瓚呰繃4涓瓧鑺傛椂搴旇鐢變綆浣嶅埌楂樹綅渚濇鍘嬫爤.
3.pop鎸囦護涔熷拰push涓鏍蜂竴嬈″彧鑳藉脊鍑?涓瓧鑺?
4.鎴戜滑闇瑕佷竴涓狢allStruct綾誨瀷鏉ュ偍瀛樹竴涓弬鏁?
 1 class CallStruct
 2     {
 3     public:
 4         INT            Integer;
 5         BOOL        Bool;
 6         DOUBLE        Real;
 7         WCHAR        String[MAX_STRING];
 8         
 9         enum TYPE
10         {
11             ctInteger,
12             ctString,
13             ctBool,
14             ctReal,
15             ctVoid,
16         }Type;
17         
18         CallStruct() : Integer(0),Bool(FALSE),Real(0)
19         {
20             String[0]    = 0;
21         }
22 
23         CallStruct(const NAutoPtr<VirtualMachine::VarClass>& Var) : Integer(Var->Integer),Bool(Var->Bool),Real(Var->Real),Type((TYPE)Var->Type)
24         {
25             if(Type == ctString) wcscpy(String,Var->String);
26         }
27     };
5.鎴戜滑闇瑕佷竴涓垪琛ㄦ潵瀛樻斁鍙傛暟鍜屼竴涓繑鍥炲煎璞℃潵瀛樻斁榪斿洖鍊?
1     List<NAutoPtr<CallStruct>> VarList;
2     NAutoPtr<CallStruct> Return;
6.鏈鍚庢垜浠渶瑕佷竴涓狧MODULE鍜屼竴涓狥ARPROC鍒嗗埆瀛樻斁dll鐨勫彞鏌勫拰鍑芥暟鍦板潃.
1     HMODULE hModule;
2     FARPROC FunctionPtr;
7.鐒跺悗鎴戜滑娣誨姞鍑犱釜鍔熻兘鍑芥暟.
1     BOOL AddVar(NAutoPtr<VirtualMachine::VarClass>& Var);
2     BOOL SetReturnType(CallStruct::TYPE Type);
3     BOOL SetLibName(LPTSTR Name);
4     BOOL SetFunctionName(LPTSTR Name);
娉ㄦ剰:GetProcAddress絎簩涓弬鏁板彧鎺ュ彈LPCSTR綾誨瀷鐨勫瓧絎︿覆,搴旀濡傛灉浼犲叆鐨勬槸Unicode緙栫爜鐨勫瓧絎﹀繀欏誨皢鍏惰漿鎹㈡垚ANSI鐨?
8.鎴戜滑娣誨姞涓涓嚱鏁癛un鐢ㄤ簬璋冪敤鍑芥暟.
 1 BOOL CallMacro::Run()
 2 {
 3     if(FunctionPtr == 0 || Return.Buffer() == 0return FALSE;
 4     union RealStruct
 5     {
 6         double Real;
 7         struct
 8         {
 9             int Head,Tail;
10         };
11     };
12     NAutoPtr<CallStruct> cs;
13     int Integer;
14     BOOL Bool;
15     RealStruct Real; // Push鎸囦護涓嬈″彧鑳藉帇鍏?瀛楄妭
16     LPTSTR String;
17 
18     int iEsp;
19     __asm mov int ptr[iEsp],esp; // 淇濆瓨esp
20     for(int i=0;i<VarList.Size();i++)
21     {
22         cs = VarList[i];
23         Integer = cs->Integer;
24         Bool = cs->Bool;
25         Real.Real = cs->Real;
26         String = cs->String;
27         switch(cs->Type)
28         {
29         case CallStruct::ctInteger:
30             __asm push Integer;
31             break;
32         case CallStruct::ctString:
33             __asm push String;
34             break;
35         case CallStruct::ctBool:
36             __asm push Bool;
37             break;
38         case CallStruct::ctReal:
39             __asm push Real.Tail;
40             __asm push Real.Head;
41             break;
42         }
43     }
44     FARPROC proc = FunctionPtr;
45     int Head,Tail;
46     __asm
47     {
48         call proc
49         mov int ptr[Head],edx
50         mov int ptr[Tail],eax
51     }
52     switch(Return->Type)
53     {
54     case CallStruct::ctInteger:
55         Return->Integer = Tail;
56         break;
57     case CallStruct::ctString:
58         wcscpy(Return->String,(LPCTSTR)Tail);
59         break;
60     case CallStruct::ctBool:
61         Return->Bool = Tail;
62         break;
63     case CallStruct::ctReal:
64         __asm fstp [Real.Real];
65         Return->Real = Real.Real;
66         break;
67     }
68     // __declspec璋冪敤綰﹀畾,闇瑕佹墜宸ヨ繕鍘熷爢鏍?/span>
69     __asm mov esp,int ptr[iEsp];
70     return TRUE;
71 }
Run鍑芥暟棣栧厛媯鏌ユ槸鍚﹀凡緇忚杞戒簡DLL騫惰幏寰椾簡鍑芥暟鍦板潃,浠ュ強榪斿洖鍊肩被鍨嬫槸鍚﹀凡緇忓畾涔?
鐒跺悗鏍規(guī)嵁綾誨瀷渚濇灝嗗嚱鏁板帇鏍?
鐒跺悗璋冪敤call鎸囦護騫朵繚瀛樿繑鍥炲?(榪欓噷闇瑕佹敞鎰忕殑鏄?span style="COLOR: red">褰撹繑鍥炲肩被鍨嬩負double鎴杅loat綾誨瀷鏃跺繀欏諱嬌鐢╢stp鎸囦護浠嶧PU瀵勫瓨鍣ㄦ爤鐨勬爤欏剁殑鍊煎彇鍑烘潵)
鏈鍚庤繕鍘熷爢鏍?

鐒跺悗鎴戜滑鏉ユ祴璇曚竴涓?
鍒涘緩涓涓悕涓篢estDLL鐨凞LL宸ョ▼騫舵坊鍔犲嚱鏁癟est.
1 TESTDLL_API double Test(double d,double* d1,WCHAR* lpBuffer)
2 {
3     if(d == 123.456789) MessageBox(0,lpBuffer,L"",0);
4     *d1 = 789.654;
5     return 77777;
6 }

鐒跺悗鍒涘緩涓涓祴璇曞伐紼?娣誨姞鐩稿叧鏂囦歡.
鍦╛tmain涓坊鍔犱互涓嬩唬鐮?
 1 int _tmain(int argc, _TCHAR* argv[])
 2 {
 3     double d;
 4     CallMacro cm;
 5     NAutoPtr<VirtualMachine::VarClass> Var;
 6 
 7     Var = new VirtualMachine::VarClass;
 8     Var->Type = VirtualMachine::VarClass::vtString;
 9     wcscpy(Var->String,L"aaaaa");
10     cm.AddVar(Var);
11 
12     Var = new VirtualMachine::VarClass;
13     Var->Type = VirtualMachine::VarClass::vtInteger;
14     Var->Integer = (INT)&d;
15     cm.AddVar(Var);
16 
17     Var = new VirtualMachine::VarClass;
18     Var->Type = VirtualMachine::VarClass::vtReal;
19     Var->Real = 123.456789;
20     cm.AddVar(Var);
21 
22     cm.SetLibName(L"TestDll.dll");
23     cm.SetFunctionName(L"Test");
24     cm.SetReturnType(CallMacro::CallStruct::ctReal);
25     cm.Run();
26 
27     wprintf(L"%f %f\n",d,cm.Return->Real);
28     system("pause");
29     return 0;
30 }

緙栬瘧騫惰繍琛?鍙互鐪嬪埌Test鍑芥暟璋冪敤鎴愬姛,騫舵垚鍔熻緭鍑篸鐨勫煎拰榪斿洖鍊?

鏈鍚庣粰鍑?a href="http://www.shnenglu.com/Files/lwch/DLLTest.rar">瀹屾暣浠g爜.

lwch 2011-02-06 22:21 鍙戣〃璇勮
]]>
浣跨敤闈㈠悜緇勫悎瀛愮畻娉曞啓璇嶆硶鍒嗘瀽鍣?/title><link>http://www.shnenglu.com/lwch/archive/2011/01/26/139377.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Wed, 26 Jan 2011 14:11:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2011/01/26/139377.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/139377.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2011/01/26/139377.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/139377.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/139377.html</trackback:ping><description><![CDATA[緇?a href="http://www.shnenglu.com/lwch/archive/2011/01/22/139121.html" target=_blank>銆婇潰鍚戠粍鍚堝瓙鐨勪竴浜涙祴璇曘?/a> 榪涗竴姝ュ畬鍠勪唬鐮?鍒朵綔鍑鴻瘝娉曞垎鏋愬櫒.<br><br>鎴戜滑棣栧厛闇瑕佷竴涓狥ail鍩虹被,浠栨湁涓涓函铏氬嚱鏁癙arser.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">1</span> <span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Fail<br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">virtual</span><span style="COLOR: #000000"> NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input)</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br></span><span style="COLOR: #008080">5</span> <span style="COLOR: #000000">};</span></div> Parser鐨勮緭鍏ヤ負瑕佸垎鏋愮殑瀛楃涓?杈撳嚭涓哄垎鏋愬畬鎴愬悗鍓╀綑鐨勫瓧絎︿覆.<br><br>鐒跺悗鎴戜滑闇瑕佷竴涓狢h鍜屼竴涓猄tr鍒嗗埆鐢ㄦ潵鍒嗘瀽鍗曚釜瀛楃鍜屼竴涓瓧絎︿覆.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Ch : </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> Fail<br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">    Ch(WCHAR _value) : value(_value){}<br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">    NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input);<br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">    WCHAR Value();<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000">    WCHAR value; </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> 寰呭尮閰嶄覆</span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">};<br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Str : </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> Fail<br></span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000">    Str(NWString _value) : value(_value){}<br></span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000">    NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input);<br></span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000">    NWString value; </span><span style="COLOR: #008000">//</span><span style="COLOR: #008000"> 寰呭尮閰嶄覆</span><span style="COLOR: #008000"><br></span><span style="COLOR: #008080">21</span> <span style="COLOR: #008000"></span><span style="COLOR: #000000">};</span></div> <br>鐒跺悗鏄疭eq,Alt鍜孉ny,鍒嗗埆琛ㄧず緇勫悎,閫夋嫨鍜屽驚鐜?<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Seq : </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> Fail<br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">    Seq(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> _left,</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> _right) : left(_left),right(_right){}<br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">    NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input);<br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> left;<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> right;<br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000">};<br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Alt : </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> Fail<br></span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000">    Alt(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> _left,</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> _right) : left(_left),right(_right){}<br></span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000">    NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input);<br></span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> left;<br></span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> right;<br></span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">};<br></span><span style="COLOR: #008080">22</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">23</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Any : </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> Fail<br></span><span style="COLOR: #008080">24</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080">25</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">26</span> <span style="COLOR: #000000">    Any(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> _left,</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> _count) : left(_left),count(_count){}<br></span><span style="COLOR: #008080">27</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">28</span> <span style="COLOR: #000000">    NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input);<br></span><span style="COLOR: #008080">29</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">30</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> left;<br></span><span style="COLOR: #008080">31</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> count;<br></span><span style="COLOR: #008080">32</span> <span style="COLOR: #000000">};</span></div> <br>鏈鍚庢垜浠渶瑕佷竴涓狽ode綾誨瀷鏉ュ瓨鏀句互涓婅繖鍑犵被瀵硅薄.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> Node<br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">{<br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">    Node(){}<br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000">    Node(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> _left) : left(_left){}<br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000">    friend NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> left,</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> right);<br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">    friend NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> left,</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> right);<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">    friend NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">operator</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> left,</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> right);<br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> OnceMore(NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> node);<br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> More(NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> node);<br></span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> NewCh(WCHAR input);<br></span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000">    </span><span style="COLOR: #0000ff">static</span><span style="COLOR: #000000"> NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> NewStr(NWString input);<br></span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000">    NWString Parser(NWString</span><span style="COLOR: #000000">&</span><span style="COLOR: #000000"> input);<br></span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">>&</span><span style="COLOR: #000000"> Value();<br></span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">:<br></span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Fail</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> left;<br></span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">};</span></div> 涓嬮潰鏉ュ垎鏋愪竴涓婲ode閲岀殑鍑芥暟:<br>+:瀵瑰簲浜嶴eq,鐢ㄤ簬灝嗕袱涓狽ode榪炴帴璧鋒潵.<br>|:瀵瑰簲涓嶢lt,鐢ㄤ簬閫夋嫨涓や釜Node.<br>-:鍙湁left鍜宺ight鐨刅alue()閮芥槸NAutoPtr<Ch>鏃舵墠鍙嬌鐢?鍐呴儴鏈夌被鍨嬭漿鎹?琛ㄧず浠庡摢涓瓧絎﹀埌鍝釜瀛楃.<br>OnceMore:閲嶅1嬈″強浠ヤ笂.<br>More:閲嶅0嬈′互涓?<br>NewCh:鐢熸垚涓涓狽AutoPtr<Ch>鐨凬ode瀵硅薄.<br>NewStr:鐢熸垚涓涓狽AutoPtr<Str>鐨凬ode瀵硅薄.<br><br>涓嬮潰鎴戜滑闇瑕?涓畯.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">1</span> <span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000"> ONCEMORE(N)                    Node::OnceMore(N)</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000"> MORE(N)                        Node::More(N)</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000"> NEWCH(N)                    Node::NewCh(N)</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000"></span><span style="COLOR: #0000ff">#define</span><span style="COLOR: #000000"> NEWSTR(N)                    Node::NewStr(N)</span></div> 榪?涓畯浠呬負浜嗚緭鍏ユ柟渚?br><br>鐒跺悗鎴戜滑鏉ユ祴璇曚竴涓?<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">1</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> Symbol </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ONCEMORE(NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">_</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">z</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">)) </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000"> (NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">A</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">Z</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">))<br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000">        </span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"> MORE(NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">_</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000"> (NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">9</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">)) </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000"> (NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">a</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">z</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">)) </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000"> (NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">A</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">Z</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">)));<br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> Number </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> ONCEMORE(NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">-</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">9</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">));<br></span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">    NAutoPtr</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">Node</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> Real </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> Number </span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"> NEWCH(</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">.</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">) </span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"> Number;</span></div> 鐩鎬俊瀵規(guī)鍒欒〃杈懼紡鏈変竴瀹氳璇嗙殑鍚屽宸茬粡鐭ラ亾榪?鏉¤鍙ュ垎鍒搴斾簬浠涔堟鍒欒〃杈懼紡.<br><span style="COLOR: red">Symbol->[_a-zA-Z]+[_0-9a-zA-Z]*<br>Number->[0-9]+<br>Real->[0-9]+.[0-9]+<br></span><br>瀹氫箟涓涓緟鍒嗘瀽鐨勫瓧絎︿覆.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">1</span> <span style="COLOR: #000000">    NWString str </span><span style="COLOR: #000000">=</span><span style="COLOR: #000000"> L</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">abcce_fg123.459agetr</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;</span></div> <br>瀵瑰叾鍒嗘瀽.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">1</span> <span style="COLOR: #000000">    wprintf(L</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%s\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,str);<br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000">    wprintf(L</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%s\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,Symbol</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">Parser(str));<br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">    wprintf(L</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%s\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,Real</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">Parser(str));<br></span><span style="COLOR: #008080">4</span> <span style="COLOR: #000000">    wprintf(L</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%s\n</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,Symbol</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">Parser(str));</span></div> <br>鍒嗘瀽緇撴灉.<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">1</span> <span style="COLOR: #000000">abcce_fg123.459agetr<br></span><span style="COLOR: #008080">2</span> <span style="COLOR: #000000"></span><span style="COLOR: #000000">123</span><span style="COLOR: #000000">.459agetr<br></span><span style="COLOR: #008080">3</span> <span style="COLOR: #000000">agetr<br></span><span style="COLOR: #008080">4</span> </div> <br>鍥犱負娌℃湁鑰冭檻鍒嗘瀽鏁堢巼闂,鎵浠ヤ嬌鐢∟WString浣滀負杈撳叆鍜岃緭鍑?鍦ㄥ疄闄呬嬌鐢ㄤ腑鍙敤LPTSTR鏉ヤ唬鏇縉WString,鍚屾椂淇敼鍝嶅簲浠g爜.<br>鏈鍚庣粰鍑?a href="http://www.shnenglu.com/Files/lwch/RegexEngine.rar">婧愪唬鐮?/a><img src ="http://www.shnenglu.com/lwch/aggbug/139377.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2011-01-26 22:11 <a href="http://www.shnenglu.com/lwch/archive/2011/01/26/139377.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>闈㈠悜緇勫悎瀛愮殑涓浜涙祴璇?/title><link>http://www.shnenglu.com/lwch/archive/2011/01/22/139121.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Sat, 22 Jan 2011 09:11:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2011/01/22/139121.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/139121.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2011/01/22/139121.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/139121.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/139121.html</trackback:ping><description><![CDATA[     鎽樿: 鏈枃鐨勬濊礬鏉ユ簮浜巋ttp://www.shnenglu.com/vczh/archive/2008/05/21/50656.html棣栧厛鍏堢湅浠g爜:   1 #include <stdio.h>  2   3 class Element  4 {&n...  <a href='http://www.shnenglu.com/lwch/archive/2011/01/22/139121.html'>闃呰鍏ㄦ枃</a><img src ="http://www.shnenglu.com/lwch/aggbug/139121.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2011-01-22 17:11 <a href="http://www.shnenglu.com/lwch/archive/2011/01/22/139121.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>NScript閮ㄥ垎鏁版嵁緇撴瀯http://www.shnenglu.com/lwch/archive/2011/01/14/138541.htmllwchlwchFri, 14 Jan 2011 08:00:00 GMThttp://www.shnenglu.com/lwch/archive/2011/01/14/138541.htmlhttp://www.shnenglu.com/lwch/comments/138541.htmlhttp://www.shnenglu.com/lwch/archive/2011/01/14/138541.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/138541.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/138541.htmlNScript鐨勯儴鍒嗘暟鎹粨鏋?br>
 1     class SyntaxNode
 2     {
 3     public:
 4         int Op1;
 5         int Op2;
 6         List<NAutoPtr<SyntaxNode>> Child;
 7 
 8         SyntaxNode(int O1,int O2) : Op1(O1),Op2(O2){}
 9     };
10 
11     class CharClass
12     {
13     public:
14         int Index;
15         NWString String;
16 
17         CharClass(NWString S) : String(S){}
18     };

姣忎釜璇硶鏍戠殑鑺傜偣鏈?涓弬鏁癘p1,Op2鍒嗗埆琛ㄧず褰撳墠鑺傜偣鐨勭被鍨嬪拰闄勫姞鍙傛暟
Child涓哄綋鍓嶈妭鐐圭殑瀛愯妭鐐?br>
CharClass緇撴瀯鍒欐瘮杈冪畝鍗曞垎鍒負绱㈠紩鍜屽瓧絎?br>
鐒跺悗鏄儴鍒哠yntaxNode鐨凮p1鐨勬灇涓?
1     enum OpCode_Type
2     {
3         opNull,
4         opVar,
5         opConst,
6     };

浠ュ強VarType鐨勬灇涓?
 1     enum Var_Type
 2     {
 3         vtNull,
 4         vtVoid,
 5         vtBool,
 6         vtInt,
 7         vtReal,
 8         vtString,
 9         vtSymbol,
10     };
鍜屼駭鐢熷紡绱㈠紩鐨勫畯瀹氫箟:
 1     #define INDEX_VARTYPE_VOID                1
 2     #define INDEX_VARTYPE_BOOL                2
 3     #define INDEX_VARTYPE_INT                3
 4     #define INDEX_VARTYPE_REAL                4
 5     #define INDEX_VARTYPE_STRING            5
 6     #define INDEX_VALUETYPE_STRING            6
 7     #define INDEX_VALUETYPE_SYMBOL            7
 8     #define INDEX_VALUETYPE_REAL            8
 9     #define INDEX_VALUETYPE_DIGIT            9
10     #define INDEX_VALUETYPE_TRUE            10
11     #define INDEX_VALUETYPE_FALSE            11

浠ヤ笂绱㈠紩鐨勫畾涔夊彇鑷狽S.txt,闅忕潃浠ュ悗鏂囨硶鐨勫鍔犺繖閲岀殑绱㈠紩瀹氫箟涔熶細澧炲姞
NS.h,NS.cpp,NS.ParserTable鍧囨槸鐢盢ScriptMacro.exe榪愯NS.txt鐢熸垚鐨?br>
涓嬮潰鏉ョ湅涓涓婼yntaxAnalyze鍑芥暟:
 1 BOOL NSyntax::SyntaxAnalyze(int i)
 2 {
 3     BOOL bResult = TRUE;
 4     // 鏍規(guī)嵁浜х敓寮忕儲寮曠敓鎴愯娉曟爲
 5     switch(i)
 6     {
 7     case INDEX_VARTYPE_VOID:
 8     case INDEX_VARTYPE_BOOL:
 9     case INDEX_VARTYPE_INT:
10     case INDEX_VARTYPE_REAL:
11     case INDEX_VARTYPE_STRING:
12         bResult = VarType(i);
13         break;
14     case INDEX_VALUETYPE_STRING:
15     case INDEX_VALUETYPE_SYMBOL:
16     case INDEX_VALUETYPE_REAL:
17     case INDEX_VALUETYPE_DIGIT:
18     case INDEX_VALUETYPE_TRUE:
19     case INDEX_VALUETYPE_FALSE:
20         bResult = ValueType(i);
21         break;
22     }
23     return bResult;
24 }

榪欎釜鍑芥暟鏍規(guī)嵁浼犲叆鍙傛暟(浜х敓寮忕儲寮?璋冪敤鐩稿叧鍑芥暟鐢熸垚璇硶鏍?鍏蜂綋璇硶鏍戠殑鐢熸垚榪囩▼璇風(fēng)湅鐩稿叧浠g爜

lwch 2011-01-14 16:00 鍙戣〃璇勮
]]>
寮婧愮紪璇戝櫒欏圭洰NScripthttp://www.shnenglu.com/lwch/archive/2011/01/13/138484.htmllwchlwchThu, 13 Jan 2011 13:38:00 GMThttp://www.shnenglu.com/lwch/archive/2011/01/13/138484.htmlhttp://www.shnenglu.com/lwch/comments/138484.htmlhttp://www.shnenglu.com/lwch/archive/2011/01/13/138484.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/138484.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/138484.html欏圭洰鍦板潃

鏈鍒濇枃娉曞畾涔変負:
 1 %token "void" "bool" "int" "real" "string";
 2 %token "true" "false";
 3 %token "{" "}" "," ";" "=";
 4 %token "+" "-" "*" "/";
 5 %token ">" "<" ">=" "<=" "==" "and" "not" "or";
 6 
 7 %start program;
 8 
 9 var_type    ->    "void"
10             |    "bool"
11             |    "int"
12             |    "real"
13             |    "string"
14             ;
15 
16 value_type    ->    "{String}"
17             |    "{Symbol}"
18             |    "{real}"
19             |    "{digit}"
20             |    "true"
21             |    "false"
22             ;
23 
24 paramter_define_desc    ->    "{LQ}" paramter_defines "{RQ}"
25                         |    "{LQ}" "{RQ}"
26                         ;
27 
28 paramter_defines    ->    paramter_defines "," paramter_one
29                     |    paramter_one
30                     ;
31 
32 paramter_one        ->    var_type "{Symbol}"
33                     ;
34 
35 assign_type            ->    "{Symbol}"
36                     ;
37 
38 program        ->    item_list
39             ;
40 
41 item_list    ->    item_list item
42             |    item
43             ;
44 
45 item        ->    function
46             |    define_desc ";"
47             ;
48 
49 stmt_list    ->    stmt_list stmt
50             |    stmt
51             ;
52 
53 stmt        ->    define_desc ";"
54             |    assign_desc ";"
55             |    ";"
56             ;
57 
58 function    ->    var_type "{Symbol}" paramter_define_desc "{" stmt_list "}"
59             |    var_type "{Symbol}" paramter_define_desc "{" "}"
60             ;
61 
62 define_desc    ->    define_desc "," "{Symbol}"
63             |    var_type "{Symbol}"
64             ;
65 
66 assign_desc    ->    assign_type "=" exp
67             ;
68 
69 exp        ->    exp ">" exp1
70         |    exp "<" exp1
71         |    exp ">=" exp1
72         |    exp "<=" exp1
73         |    exp "==" exp1
74         |    exp "and" exp1
75         |    exp "or" exp1
76         |    "not" exp1
77         |    "+" exp1
78         |    "-" exp1
79         |    exp1
80         ;
81 
82 exp1        ->    exp1 "+" exp2
83         |    exp1 "-" exp2
84         |    exp2
85         ;
86 
87 exp2        ->    exp2 "*" exp3
88         |    exp2 "/" exp3
89         |    exp3
90         ;
91 
92 exp3        ->    "{LQ}" exp "{RQ}"
93         |    value_type
94         ;

鐢變互涓婃枃娉曚腑浠呮湁鍑芥暟鐨勫畾涔夊拰鍙橀噺鐨勫畾涔?br>鏈夌偣綾籆鐨勫懗閬?
宸叉垚鍔熷皢ESLanguage澶ч儴鍒嗕唬鐮佺Щ妞嶅埌榪欎釜欏圭洰閲?

lwch 2011-01-13 21:38 鍙戣〃璇勮
]]>
宸插畬鎴愯娉曞垎鏋愬櫒http://www.shnenglu.com/lwch/archive/2010/08/30/125289.htmllwchlwchMon, 30 Aug 2010 09:29:00 GMThttp://www.shnenglu.com/lwch/archive/2010/08/30/125289.htmlhttp://www.shnenglu.com/lwch/comments/125289.htmlhttp://www.shnenglu.com/lwch/archive/2010/08/30/125289.html#Feedback1http://www.shnenglu.com/lwch/comments/commentRss/125289.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/125289.html鍒嗘瀽鍣ㄦ枃娉?

 1 %token    "%token" "%start"                ;
 2 %token    ";" "->" "|"                    ;
 3 
 4 %start program                        ;
 5 
 6 program        ->    item_list
 7         ;
 8 
 9 item_list    ->    item_list item
10         |    item
11         ;
12 
13 item        ->    token_def ";"
14         |    start_def ";"
15         |    rule_def ";"
16         |    ";"
17         ;
18 
19 token_def    ->    token_def "{String}"
20         |    "%token" "{String}"
21         ;
22 
23 start_def    ->    "%start" "{Symbol}"
24         ;
25 
26 rule_def    ->    "{Symbol}" "->" rhs_list
27         ;
28 
29 rhs_list    ->    rhs_list "|" rhs
30         |    rhs
31         ;
32 
33 rhs        ->    rhs "{String}"
34         |    rhs "{Symbol}"
35         |    "{String}"
36         |    "{Symbol}"
37         ;
38 
NScriptMacro
涓昏鐢ㄦ潵灝嗙粰瀹氱殑鏂囨硶鏂囦歡杞寲涓篖ALR(1)鍒嗘瀽琛?鐢熸垚鐨刢pp鍜宧鏂囦歡鍙嬌鐢ㄥ垎鏋愬櫒鍒嗘瀽,out鏂囦歡鏄娉曞垎鏋愯〃
閲岄潰鏈変釜綆鍗曠殑CMinus鐨勪緥瀛?

lwch 2010-08-30 17:29 鍙戣〃璇勮
]]>
宸插疄鐜板垎鏋愬櫒鑷姩鐢熸垚鍒嗘瀽琛?/title><link>http://www.shnenglu.com/lwch/archive/2010/08/28/125052.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Sat, 28 Aug 2010 07:28:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/08/28/125052.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/125052.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/08/28/125052.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/125052.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/125052.html</trackback:ping><description><![CDATA[瀵逛簬緇欏畾鏂囨硶鏂囦歡:<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #000000">%</span><span style="COLOR: #000000">token </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">if</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">then</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">else</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">end</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> ;<br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000"></span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">token </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">st</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> ;<br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000"></span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">token </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> ;<br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000"></span><span style="COLOR: #000000">%</span><span style="COLOR: #000000">start program ;<br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000">program        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    if_stmt<br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">        ;<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000">if_stmt        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">if</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> exp </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">then</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> stmt </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">end</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">        </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">    </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">if</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> exp </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">then</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> stmt </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">else</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> stmt </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">end</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000">        ;<br></span><span style="COLOR: #008080">13</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">14</span> <span style="COLOR: #000000">exp        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    exp1<br></span><span style="COLOR: #008080">15</span> <span style="COLOR: #000000">        ;<br></span><span style="COLOR: #008080">16</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">17</span> <span style="COLOR: #000000">exp1        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    exp1 </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> exp2<br></span><span style="COLOR: #008080">18</span> <span style="COLOR: #000000">        </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">    exp2<br></span><span style="COLOR: #008080">19</span> <span style="COLOR: #000000">        ;<br></span><span style="COLOR: #008080">20</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">21</span> <span style="COLOR: #000000">exp2        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    exp2 </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> exp3<br></span><span style="COLOR: #008080">22</span> <span style="COLOR: #000000">        </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">    exp3<br></span><span style="COLOR: #008080">23</span> <span style="COLOR: #000000">        ;<br></span><span style="COLOR: #008080">24</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">25</span> <span style="COLOR: #000000">exp3        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{LQ}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> exp1 </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{RQ}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">26</span> <span style="COLOR: #000000">        </span><span style="COLOR: #000000">|</span><span style="COLOR: #000000">    </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">{digit}</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">27</span> <span style="COLOR: #000000">        ;<br></span><span style="COLOR: #008080">28</span> <span style="COLOR: #000000"><br></span><span style="COLOR: #008080">29</span> <span style="COLOR: #000000">stmt        </span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">    </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">st</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><br></span><span style="COLOR: #008080">30</span> <span style="COLOR: #000000">        ;</span></div> 鐢熸垚鍒嗘瀽琛ㄥ緱:<br><img height=768 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/0000000000.PNG" width=985 border=0> <img src ="http://www.shnenglu.com/lwch/aggbug/125052.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-08-28 15:28 <a href="http://www.shnenglu.com/lwch/archive/2010/08/28/125052.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>淇敼鍒嗘瀽鍣ㄧ殑鍒嗘瀽鍣ㄧ殑璇硶http://www.shnenglu.com/lwch/archive/2010/08/28/125051.htmllwchlwchSat, 28 Aug 2010 07:23:00 GMThttp://www.shnenglu.com/lwch/archive/2010/08/28/125051.htmlhttp://www.shnenglu.com/lwch/comments/125051.htmlhttp://www.shnenglu.com/lwch/archive/2010/08/28/125051.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/125051.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/125051.html 1 %token    "%token" "%start"                ;
 2 %token    ";" "->" "|"                    ;
 3 
 4 %start program                        ;
 5 
 6 program        ->    item_list
 7         ;
 8 
 9 item_list    ->    item_list item
10         |    item
11         ;
12 
13 item        ->    token_def ";"
14         |    start_def ";"
15         |    rule_def ";"
16         |    ";"
17         ;
18 
19 token_def    ->    token_def "{String}"
20         |    "%token" "{String}"
21         ;
22 
23 start_def    ->    "%start" "{Symbol}"
24         ;
25 
26 rule_def    ->    "{Symbol}" "->" rhs_list
27         ;
28 
29 rhs_list    ->    rhs_list "|" rhs
30         |    rhs
31         ;
32 
33 rhs        ->    rhs "{String}"
34         |    rhs "{Symbol}"
35         |    "{String}"
36         |    "{Symbol}"
37         ;
38  鍘婚櫎浜唋etter瀹氫箟,鏆傛椂榪樹笉鏀寔姝e垯琛ㄨ揪寮?.

lwch 2010-08-28 15:23 鍙戣〃璇勮
]]>
鎴戠殑璇硶鍒嗘瀽鍣ㄧ殑鍒嗘瀽鍣ㄧ殑鍩烘湰璇硶鍜屽垎鏋愯〃http://www.shnenglu.com/lwch/archive/2010/08/03/122098.htmllwchlwchTue, 03 Aug 2010 12:21:00 GMThttp://www.shnenglu.com/lwch/archive/2010/08/03/122098.htmlhttp://www.shnenglu.com/lwch/comments/122098.htmlhttp://www.shnenglu.com/lwch/archive/2010/08/03/122098.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/122098.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/122098.html鍩烘湰璇硶:

 1 %token    "%token" "%letter" "%start"            ;
 2 %token    ":" ";" "->" "|"                ;
 3 
 4 %letter string    :    "{string}"            ;
 5 %letter symbol    :    "{symbol}"            ;
 6 
 7 %start program                        ;
 8 
 9 string_list    ->    string_list string
10         |    string
11         ;
12 
13 symbol_list    ->    symbol_list symbol
14         |    symbol
15         ;
16 
17 program        ->    item_list
18         ;
19 
20 item_list    ->    item_list item
21         |    item
22         ;
23 
24 item        ->    token_def ";"
25         |    letter_def ";"
26         |    start_def ";"
27         |    rule_def ";"
28         |    ";"
29         ;
30 
31 token_def    ->    "%token" string_list
32         ;
33 
34 letter_def    ->    "%letter" symbol ":" string_list
35         ;
36 
37 start_def    ->    "%start" symbol
38         ;
39 
40 rule_def    ->    symbol "->" rhs_list
41         ;
42 
43 rhs_list    ->    rhs_list "|" rhs
44         |    rhs
45         ;
46 
47 rhs        ->    term_list
48         ;
49 
50 term_list    ->    term_list string
51         |    term_list symbol
52         |    string
53         |    symbol
54         ;


鐢熸垚鐨勫垎鏋愯〃:
鐢變簬鐘舵佹暟閲忓拰闈炵粓緇撶鏁伴噺榪囧,鎵浠ョ粰鍑烘枃浠?a href="http://www.shnenglu.com/Files/lwch/ParserTable001.txt">銆婂垎鏋愯〃銆?/a>

涓嬮潰鏄洓鍒欐販鍚堣繍綆楃殑鏂囨硶鏂囦歡:
 1 %token "+" "-"                ;
 2 %token "*" "/"                ;
 3 %token "(" ")"                ;
 4 
 5 %letter AddOp    :    "+" "-"        ;
 6 %letter MulOp    :    "*" "/"        ;
 7 %letter ID    :    "{digit}"    ;
 8 %letter LQ    :    "("        ;
 9 %letter RQ    :    ")"        ;
10 
11 %start Program                ;
12 
13 Program        ->    Exp
14         ;
15 
16 Exp        ->    Exp AddOp Term
17         |    Term
18         ;
19 
20 Term        ->    Term MulOp Factor
21         |    Factor
22         ;
23 
24 Factor        ->    LQ Exp RQ
25         |    ID
26         ;


lwch 2010-08-03 20:21 鍙戣〃璇勮
]]>
宸插疄鐜頒粠璇硶鏍戝埌鍥涘厓鐮佺殑鐢熸垚http://www.shnenglu.com/lwch/archive/2010/08/01/121824.htmllwchlwchSat, 31 Jul 2010 17:05:00 GMThttp://www.shnenglu.com/lwch/archive/2010/08/01/121824.htmlhttp://www.shnenglu.com/lwch/comments/121824.htmlhttp://www.shnenglu.com/lwch/archive/2010/08/01/121824.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/121824.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/121824.html123 * 567 + 456 * (789 + 456)
鐢熸垚鍥涘厓鐮佸緱:


瀵逛簬琛ㄨ揪寮?
123 + 456 * (789 + 456) / 123 + 789
鐢熸垚鍥涘厓鐮佸緱:


lwch 2010-08-01 01:05 鍙戣〃璇勮
]]>
宸插疄鐜頒竴涓洓鍒欐販鍚堣繍綆楀垎鏋愬櫒http://www.shnenglu.com/lwch/archive/2010/07/26/121295.htmllwchlwchMon, 26 Jul 2010 03:41:00 GMThttp://www.shnenglu.com/lwch/archive/2010/07/26/121295.htmlhttp://www.shnenglu.com/lwch/comments/121295.htmlhttp://www.shnenglu.com/lwch/archive/2010/07/26/121295.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/121295.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/121295.html姹傝В榪囩▼濡備笅:
 

涓昏鍦ㄨ綰﹁繃紼嬩腑澧炲姞浜嗚皟鐢ㄧ浉鍏寵涔夊鐞嗗嚱鏁版潵瀹炵幇璁$畻.

lwch 2010-07-26 11:41 鍙戣〃璇勮
]]>
鍥涘垯娣峰悎榪愮畻鍒嗘瀽琛?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/24/121204.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Sat, 24 Jul 2010 15:35:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/24/121204.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/121204.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/24/121204.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/121204.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/121204.html</trackback:ping><description><![CDATA[<img height=534 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/ParserTable0001.PNG" width=768 border=0> <img src ="http://www.shnenglu.com/lwch/aggbug/121204.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-24 23:35 <a href="http://www.shnenglu.com/lwch/archive/2010/07/24/121204.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Precept鍜孨V綾葷殑灝佽http://www.shnenglu.com/lwch/archive/2010/07/22/121069.htmllwchlwchThu, 22 Jul 2010 15:23:00 GMThttp://www.shnenglu.com/lwch/archive/2010/07/22/121069.htmlhttp://www.shnenglu.com/lwch/comments/121069.htmlhttp://www.shnenglu.com/lwch/archive/2010/07/22/121069.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/121069.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/121069.html闃呰鍏ㄦ枃

lwch 2010-07-22 23:23 鍙戣〃璇勮
]]>
LALR(1)瀵逛簬鍐茬獊鐨勮В鍐蟲柟妗?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/22/121034.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Thu, 22 Jul 2010 07:04:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/22/121034.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/121034.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/22/121034.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/121034.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/121034.html</trackback:ping><description><![CDATA[1.瀵逛簬鍏稿瀷鐨刬f-else浜屼箟鎬ф枃娉?瀛樺湪縐昏繘-鎺ュ彈(縐昏繘-褰掔害)鍐茬獊,鍦ㄦ垜鐨凩ALR鍒嗘瀽鍣ㄤ腑閲囩敤浜嗗拰YACC鐩稿悓鐨勬柟娉?棣栧厛澶勭悊縐昏繘鎿嶄綔.榪欐牱灝卞彲娑堥櫎if-else鐨勪簩涔夋?<br>if-else鏂囨硶:<br>S->iEStS<br>S->iES<br>S->s<br>E->e<br>璇存槑:<br>i浠h〃if<br>s浠h〃stmt<br>e浠h〃exp<br>t浠h〃else<br>瀵逛簬浠ヤ笂鏂囨硶鐢熸垚鐨凩ALR(1)鍒嗘瀽琛ㄤ負:<br><img height=534 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/iestsParserTable.PNG" width=768 border=0><br><br>瀵逛簬if exp stmt璇彞鍒嗘瀽緇撴灉涓?<br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/ies.PNG" width=669 border=0><br><br>瀵逛簬if exp stmt else stmt璇彞鍒嗘瀽緇撴灉涓?<br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/iests.PNG" width=669 border=0><br><br>瀵逛簬if exp if exp stmt璇彞鍒嗘瀽緇撴灉涓?<br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/ieies.PNG" width=669 border=0><br><br>瀵逛簬if exp if exp stmt else stmt璇彞鍒嗘瀽緇撴灉涓?<br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/ieiests.PNG" width=669 border=0><br><br>2.浼楁墍鍛ㄧ煡LALR鏂囨硶鍚屾牱瀛樺湪褰掔害-褰掔害鍐茬獊,鍦ㄦ垜鐨凩ALR鍒嗘瀽鍣ㄤ腑浣跨敤鍏堜功鍐欑殑浜х敓寮忚繘琛屽綊綰?<br>瀵逛簬緇欏畾鐨勫瓨鍦ㄥ綊綰?褰掔害鍐茬獊鐨勬枃娉?<br>S->T<br>S->i<br>T->i<br><br>鐢熸垚LALR(1)鍒嗘瀽琛ㄤ負:<br><img height=534 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/reducereduceParserTable.PNG" width=768 border=0><br><br>鍒嗘瀽杈撳叆涓瞚鐨勮繃紼嬩負:<br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/reducereduce.PNG" width=669 border=0><br><br>浠ヤ笂灝辨槸鎴戠殑LALR(1)鍒嗘瀽鍣ㄥ鐞嗗啿紿佺殑鏂規(guī)硶浜? <br>涓嬮潰閫愭瀵硅繖涓垎鏋愬櫒榪涜鎵╁厖,浠ュ疄鐜頒竴涓兘鑷敱杈撳叆鏂囨硶鐨勫垎鏋愬櫒. <img src ="http://www.shnenglu.com/lwch/aggbug/121034.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-22 15:04 <a href="http://www.shnenglu.com/lwch/archive/2010/07/22/121034.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>宸插疄鐜癓ALR(1)鍒嗘瀽鍣?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/21/120985.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Wed, 21 Jul 2010 12:24:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/21/120985.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/120985.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/21/120985.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/120985.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/120985.html</trackback:ping><description><![CDATA[瀵逛簬緇欏畾鏂囨硶:<br>E->E+T<br>E->E-T<br>E->T<br>T->T*F<br>T->T/F<br>T->F<br>F->(E)<br>F->i<br>鐢熸垚LALR(1)鍒嗘瀽琛ㄤ負:<br><img height=534 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/LALR1ParserTable.PNG" width=768 border=0> <br><br>瀵規(guī)寚瀹氫覆:(i+i)*i鍜?i+i)*鍒嗗埆鍒嗘瀽鍚庡緱鍒?br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/LALR1Parser1.PNG" width=669 border=0><br><img height=438 alt="" src="http://www.shnenglu.com/images/cppblog_com/lwch/LALR1Parser2.PNG" width=669 border=0><br><br>铏借鎵撳嵃鐨勬椂鍊欐病瀵歸綈,浣嗙粨鏋滄槸瀵圭殑.. <img src ="http://www.shnenglu.com/lwch/aggbug/120985.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-21 20:24 <a href="http://www.shnenglu.com/lwch/archive/2010/07/21/120985.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>LR(0),SLR(1),LR(1)鍒嗘瀽鍣ㄦ簮鐮?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/18/120713.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Sun, 18 Jul 2010 10:02:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/18/120713.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/120713.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/18/120713.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/120713.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/120713.html</trackback:ping><description><![CDATA[<p><a title=鍒嗘瀽鍣?href="http://www.shnenglu.com/Files/lwch/LR.rar">鍒嗘瀽鍣?/a><a title=鍒嗘瀽鍣?href="http://www.shnenglu.com/Files/lwch/LR.rar"></a></p> LR欏圭洰鍐呮湁涓瀹忓畾涔夊彲瀹氫箟涓篖R0鎴朣LR1<br>LR1鍒嗘瀽鍣ㄥ垎鏋愰熷害榪囨參鏈夊緟浼樺寲.. <br>姹侳ollow闆嗙敤浜嗛潪閫掑綊綆楁硶,鍙戠幇閫掑綊綆楁硶瀹規(guī)槗寮曡搗鏃犻檺寰幆.<br>甯屾湜瀵規(guī)鍦ㄥ涔犵紪璇戝師鐞嗙殑鍚屽鏈夋墍鍚彂. <img src ="http://www.shnenglu.com/lwch/aggbug/120713.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-18 18:02 <a href="http://www.shnenglu.com/lwch/archive/2010/07/18/120713.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>宸插疄鐜癓R(1)鍒嗘瀽琛ㄧ殑鑷姩鍒涘緩http://www.shnenglu.com/lwch/archive/2010/07/17/120624.htmllwchlwchSat, 17 Jul 2010 05:59:00 GMThttp://www.shnenglu.com/lwch/archive/2010/07/17/120624.htmlhttp://www.shnenglu.com/lwch/comments/120624.htmlhttp://www.shnenglu.com/lwch/archive/2010/07/17/120624.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/120624.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/120624.htmlE->E+T
E->E-T
E->T
T->T*F
T->T/F
T->F
F->(E)
F->i
鐢熸垚LR(1)鍒嗘瀽琛ㄥ緱:



LR(1)鍒嗘瀽琛ㄧ殑紜槸鏃犳瘮鐨勫法澶у晩...

lwch 2010-07-17 13:59 鍙戣〃璇勮
]]>
宸插疄鐜癓R(1)DFA鐘舵佹満鐨勮嚜鍔ㄥ垱寤?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/16/120553.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Fri, 16 Jul 2010 08:03:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/16/120553.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/120553.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/16/120553.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/120553.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/120553.html</trackback:ping><description><![CDATA[<p>瀵逛簬緇欏畾鏂囨硶:<br>E->E+T<br>E->E-T<br>E->T<br>T->T*F<br>T->T/F<br>T->F<br>F->(E)<br>F->i<br>鐢熸垚DFA鐘舵佹満寰?</p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">  1</span> <span style="COLOR: #000000">璇ユ枃娉曠殑鎷撳睍鏂囨硶涓猴細<br></span><span style="COLOR: #008080">  2</span> <span style="COLOR: #000000">$->E<br></span><span style="COLOR: #008080">  3</span> <span style="COLOR: #000000">E->E+T<br></span><span style="COLOR: #008080">  4</span> <span style="COLOR: #000000">E->E-T<br></span><span style="COLOR: #008080">  5</span> <span style="COLOR: #000000">E->T<br></span><span style="COLOR: #008080">  6</span> <span style="COLOR: #000000">T->T*F<br></span><span style="COLOR: #008080">  7</span> <span style="COLOR: #000000">T->T/F<br></span><span style="COLOR: #008080">  8</span> <span style="COLOR: #000000">T->F<br></span><span style="COLOR: #008080">  9</span> <span style="COLOR: #000000">F->(E)<br></span><span style="COLOR: #008080"> 10</span> <span style="COLOR: #000000">F->i<br></span><span style="COLOR: #008080"> 11</span> <span style="COLOR: #000000">璇ユ枃娉曠殑欏圭洰濡備笅錛?br></span><span style="COLOR: #008080"> 12</span> <span style="COLOR: #000000">(1) $->.E,#<br></span><span style="COLOR: #008080"> 13</span> <span style="COLOR: #000000">(2) E->.E+T,#<br></span><span style="COLOR: #008080"> 14</span> <span style="COLOR: #000000">(3) E->.E-T,#<br></span><span style="COLOR: #008080"> 15</span> <span style="COLOR: #000000">(4) E->.T,#<br></span><span style="COLOR: #008080"> 16</span> <span style="COLOR: #000000">(5) E->.E+T,+<br></span><span style="COLOR: #008080"> 17</span> <span style="COLOR: #000000">(6) E->.E-T,+<br></span><span style="COLOR: #008080"> 18</span> <span style="COLOR: #000000">(7) E->.T,+<br></span><span style="COLOR: #008080"> 19</span> <span style="COLOR: #000000">(8) E->.E+T,-<br></span><span style="COLOR: #008080"> 20</span> <span style="COLOR: #000000">(9) E->.E-T,-<br></span><span style="COLOR: #008080"> 21</span> <span style="COLOR: #000000">(10) E->.T,-<br></span><span style="COLOR: #008080"> 22</span> <span style="COLOR: #000000">(11) T->.T*F,#<br></span><span style="COLOR: #008080"> 23</span> <span style="COLOR: #000000">(12) T->.T/F,#<br></span><span style="COLOR: #008080"> 24</span> <span style="COLOR: #000000">(13) T->.F,#<br></span><span style="COLOR: #008080"> 25</span> <span style="COLOR: #000000">(14) T->.T*F,+<br></span><span style="COLOR: #008080"> 26</span> <span style="COLOR: #000000">(15) T->.T/F,+<br></span><span style="COLOR: #008080"> 27</span> <span style="COLOR: #000000">(16) T->.F,+<br></span><span style="COLOR: #008080"> 28</span> <span style="COLOR: #000000">(17) T->.T*F,-<br></span><span style="COLOR: #008080"> 29</span> <span style="COLOR: #000000">(18) T->.T/F,-<br></span><span style="COLOR: #008080"> 30</span> <span style="COLOR: #000000">(19) T->.F,-<br></span><span style="COLOR: #008080"> 31</span> <span style="COLOR: #000000">(20) T->.T*F,*<br></span><span style="COLOR: #008080"> 32</span> <span style="COLOR: #000000">(21) T->.T/F,*<br></span><span style="COLOR: #008080"> 33</span> <span style="COLOR: #000000">(22) T->.F,*<br></span><span style="COLOR: #008080"> 34</span> <span style="COLOR: #000000">(23) T->.T*F,/<br></span><span style="COLOR: #008080"> 35</span> <span style="COLOR: #000000">(24) T->.T/F,/<br></span><span style="COLOR: #008080"> 36</span> <span style="COLOR: #000000">(25) T->.F,/<br></span><span style="COLOR: #008080"> 37</span> <span style="COLOR: #000000">(26) F->.(E),#<br></span><span style="COLOR: #008080"> 38</span> <span style="COLOR: #000000">(27) F->.i,#<br></span><span style="COLOR: #008080"> 39</span> <span style="COLOR: #000000">(28) F->.(E),+<br></span><span style="COLOR: #008080"> 40</span> <span style="COLOR: #000000">(29) F->.i,+<br></span><span style="COLOR: #008080"> 41</span> <span style="COLOR: #000000">(30) F->.(E),-<br></span><span style="COLOR: #008080"> 42</span> <span style="COLOR: #000000">(31) F->.i,-<br></span><span style="COLOR: #008080"> 43</span> <span style="COLOR: #000000">(32) F->.(E),*<br></span><span style="COLOR: #008080"> 44</span> <span style="COLOR: #000000">(33) F->.i,*<br></span><span style="COLOR: #008080"> 45</span> <span style="COLOR: #000000">(34) F->.(E),/<br></span><span style="COLOR: #008080"> 46</span> <span style="COLOR: #000000">(35) F->.i,/<br></span><span style="COLOR: #008080"> 47</span> <span style="COLOR: #000000">(36) $->E.,#<br></span><span style="COLOR: #008080"> 48</span> <span style="COLOR: #000000">(37) E->E.+T,#<br></span><span style="COLOR: #008080"> 49</span> <span style="COLOR: #000000">(38) E->E.-T,#<br></span><span style="COLOR: #008080"> 50</span> <span style="COLOR: #000000">(39) E->E.+T,+<br></span><span style="COLOR: #008080"> 51</span> <span style="COLOR: #000000">(40) E->E.-T,+<br></span><span style="COLOR: #008080"> 52</span> <span style="COLOR: #000000">(41) E->E.+T,-<br></span><span style="COLOR: #008080"> 53</span> <span style="COLOR: #000000">(42) E->E.-T,-<br></span><span style="COLOR: #008080"> 54</span> <span style="COLOR: #000000">(43) E->T.,#<br></span><span style="COLOR: #008080"> 55</span> <span style="COLOR: #000000">(44) E->T.,+<br></span><span style="COLOR: #008080"> 56</span> <span style="COLOR: #000000">(45) E->T.,-<br></span><span style="COLOR: #008080"> 57</span> <span style="COLOR: #000000">(46) T->T.*F,#<br></span><span style="COLOR: #008080"> 58</span> <span style="COLOR: #000000">(47) T->T./F,#<br></span><span style="COLOR: #008080"> 59</span> <span style="COLOR: #000000">(48) T->T.*F,+<br></span><span style="COLOR: #008080"> 60</span> <span style="COLOR: #000000">(49) T->T./F,+<br></span><span style="COLOR: #008080"> 61</span> <span style="COLOR: #000000">(50) T->T.*F,-<br></span><span style="COLOR: #008080"> 62</span> <span style="COLOR: #000000">(51) T->T./F,-<br></span><span style="COLOR: #008080"> 63</span> <span style="COLOR: #000000">(52) T->T.*F,*<br></span><span style="COLOR: #008080"> 64</span> <span style="COLOR: #000000">(53) T->T./F,*<br></span><span style="COLOR: #008080"> 65</span> <span style="COLOR: #000000">(54) T->T.*F,/<br></span><span style="COLOR: #008080"> 66</span> <span style="COLOR: #000000">(55) T->T./F,/<br></span><span style="COLOR: #008080"> 67</span> <span style="COLOR: #000000">(56) T->F.,#<br></span><span style="COLOR: #008080"> 68</span> <span style="COLOR: #000000">(57) T->F.,+<br></span><span style="COLOR: #008080"> 69</span> <span style="COLOR: #000000">(58) T->F.,-<br></span><span style="COLOR: #008080"> 70</span> <span style="COLOR: #000000">(59) T->F.,*<br></span><span style="COLOR: #008080"> 71</span> <span style="COLOR: #000000">(60) T->F.,/<br></span><span style="COLOR: #008080"> 72</span> <span style="COLOR: #000000">(61) F->(.E),#<br></span><span style="COLOR: #008080"> 73</span> <span style="COLOR: #000000">(62) E->.E+T,)<br></span><span style="COLOR: #008080"> 74</span> <span style="COLOR: #000000">(63) E->.E-T,)<br></span><span style="COLOR: #008080"> 75</span> <span style="COLOR: #000000">(64) E->.T,)<br></span><span style="COLOR: #008080"> 76</span> <span style="COLOR: #000000">(65) T->.T*F,)<br></span><span style="COLOR: #008080"> 77</span> <span style="COLOR: #000000">(66) T->.T/F,)<br></span><span style="COLOR: #008080"> 78</span> <span style="COLOR: #000000">(67) T->.F,)<br></span><span style="COLOR: #008080"> 79</span> <span style="COLOR: #000000">(68) F->.(E),)<br></span><span style="COLOR: #008080"> 80</span> <span style="COLOR: #000000">(69) F->.i,)<br></span><span style="COLOR: #008080"> 81</span> <span style="COLOR: #000000">(70) F->(.E),+<br></span><span style="COLOR: #008080"> 82</span> <span style="COLOR: #000000">(71) F->(.E),-<br></span><span style="COLOR: #008080"> 83</span> <span style="COLOR: #000000">(72) F->(.E),*<br></span><span style="COLOR: #008080"> 84</span> <span style="COLOR: #000000">(73) F->(.E),/<br></span><span style="COLOR: #008080"> 85</span> <span style="COLOR: #000000">(74) F->i.,#<br></span><span style="COLOR: #008080"> 86</span> <span style="COLOR: #000000">(75) F->i.,+<br></span><span style="COLOR: #008080"> 87</span> <span style="COLOR: #000000">(76) F->i.,-<br></span><span style="COLOR: #008080"> 88</span> <span style="COLOR: #000000">(77) F->i.,*<br></span><span style="COLOR: #008080"> 89</span> <span style="COLOR: #000000">(78) F->i.,/<br></span><span style="COLOR: #008080"> 90</span> <span style="COLOR: #000000">(79) E->E+.T,#<br></span><span style="COLOR: #008080"> 91</span> <span style="COLOR: #000000">(80) E->E+.T,+<br></span><span style="COLOR: #008080"> 92</span> <span style="COLOR: #000000">(81) E->E+.T,-<br></span><span style="COLOR: #008080"> 93</span> <span style="COLOR: #000000">(82) E->E-.T,#<br></span><span style="COLOR: #008080"> 94</span> <span style="COLOR: #000000">(83) E->E-.T,+<br></span><span style="COLOR: #008080"> 95</span> <span style="COLOR: #000000">(84) E->E-.T,-<br></span><span style="COLOR: #008080"> 96</span> <span style="COLOR: #000000">(85) T->T*.F,#<br></span><span style="COLOR: #008080"> 97</span> <span style="COLOR: #000000">(86) T->T*.F,+<br></span><span style="COLOR: #008080"> 98</span> <span style="COLOR: #000000">(87) T->T*.F,-<br></span><span style="COLOR: #008080"> 99</span> <span style="COLOR: #000000">(88) T->T*.F,*<br></span><span style="COLOR: #008080">100</span> <span style="COLOR: #000000">(89) T->T*.F,/<br></span><span style="COLOR: #008080">101</span> <span style="COLOR: #000000">(90) T->T/.F,#<br></span><span style="COLOR: #008080">102</span> <span style="COLOR: #000000">(91) T->T/.F,+<br></span><span style="COLOR: #008080">103</span> <span style="COLOR: #000000">(92) T->T/.F,-<br></span><span style="COLOR: #008080">104</span> <span style="COLOR: #000000">(93) T->T/.F,*<br></span><span style="COLOR: #008080">105</span> <span style="COLOR: #000000">(94) T->T/.F,/<br></span><span style="COLOR: #008080">106</span> <span style="COLOR: #000000">(95) F->(E.),#<br></span><span style="COLOR: #008080">107</span> <span style="COLOR: #000000">(96) E->E.+T,)<br></span><span style="COLOR: #008080">108</span> <span style="COLOR: #000000">(97) E->E.-T,)<br></span><span style="COLOR: #008080">109</span> <span style="COLOR: #000000">(98) F->(E.),+<br></span><span style="COLOR: #008080">110</span> <span style="COLOR: #000000">(99) F->(E.),-<br></span><span style="COLOR: #008080">111</span> <span style="COLOR: #000000">(100) F->(E.),*<br></span><span style="COLOR: #008080">112</span> <span style="COLOR: #000000">(101) F->(E.),/<br></span><span style="COLOR: #008080">113</span> <span style="COLOR: #000000">(102) E->T.,)<br></span><span style="COLOR: #008080">114</span> <span style="COLOR: #000000">(103) T->T.*F,)<br></span><span style="COLOR: #008080">115</span> <span style="COLOR: #000000">(104) T->T./F,)<br></span><span style="COLOR: #008080">116</span> <span style="COLOR: #000000">(105) T->F.,)<br></span><span style="COLOR: #008080">117</span> <span style="COLOR: #000000">(106) F->(.E),)<br></span><span style="COLOR: #008080">118</span> <span style="COLOR: #000000">(107) F->i.,)<br></span><span style="COLOR: #008080">119</span> <span style="COLOR: #000000">(108) E->E+T.,#<br></span><span style="COLOR: #008080">120</span> <span style="COLOR: #000000">(109) E->E+T.,+<br></span><span style="COLOR: #008080">121</span> <span style="COLOR: #000000">(110) E->E+T.,-<br></span><span style="COLOR: #008080">122</span> <span style="COLOR: #000000">(111) E->E-T.,#<br></span><span style="COLOR: #008080">123</span> <span style="COLOR: #000000">(112) E->E-T.,+<br></span><span style="COLOR: #008080">124</span> <span style="COLOR: #000000">(113) E->E-T.,-<br></span><span style="COLOR: #008080">125</span> <span style="COLOR: #000000">(114) T->T*F.,#<br></span><span style="COLOR: #008080">126</span> <span style="COLOR: #000000">(115) T->T*F.,+<br></span><span style="COLOR: #008080">127</span> <span style="COLOR: #000000">(116) T->T*F.,-<br></span><span style="COLOR: #008080">128</span> <span style="COLOR: #000000">(117) T->T*F.,*<br></span><span style="COLOR: #008080">129</span> <span style="COLOR: #000000">(118) T->T*F.,/<br></span><span style="COLOR: #008080">130</span> <span style="COLOR: #000000">(119) T->T/F.,#<br></span><span style="COLOR: #008080">131</span> <span style="COLOR: #000000">(120) T->T/F.,+<br></span><span style="COLOR: #008080">132</span> <span style="COLOR: #000000">(121) T->T/F.,-<br></span><span style="COLOR: #008080">133</span> <span style="COLOR: #000000">(122) T->T/F.,*<br></span><span style="COLOR: #008080">134</span> <span style="COLOR: #000000">(123) T->T/F.,/<br></span><span style="COLOR: #008080">135</span> <span style="COLOR: #000000">(124) F->(E).,#<br></span><span style="COLOR: #008080">136</span> <span style="COLOR: #000000">(125) F->(E).,+<br></span><span style="COLOR: #008080">137</span> <span style="COLOR: #000000">(126) F->(E).,-<br></span><span style="COLOR: #008080">138</span> <span style="COLOR: #000000">(127) F->(E).,*<br></span><span style="COLOR: #008080">139</span> <span style="COLOR: #000000">(128) F->(E).,/<br></span><span style="COLOR: #008080">140</span> <span style="COLOR: #000000">(129) E->E+.T,)<br></span><span style="COLOR: #008080">141</span> <span style="COLOR: #000000">(130) E->E-.T,)<br></span><span style="COLOR: #008080">142</span> <span style="COLOR: #000000">(131) T->T*.F,)<br></span><span style="COLOR: #008080">143</span> <span style="COLOR: #000000">(132) T->T/.F,)<br></span><span style="COLOR: #008080">144</span> <span style="COLOR: #000000">(133) F->(E.),)<br></span><span style="COLOR: #008080">145</span> <span style="COLOR: #000000">(134) E->E+T.,)<br></span><span style="COLOR: #008080">146</span> <span style="COLOR: #000000">(135) E->E-T.,)<br></span><span style="COLOR: #008080">147</span> <span style="COLOR: #000000">(136) T->T*F.,)<br></span><span style="COLOR: #008080">148</span> <span style="COLOR: #000000">(137) T->T/F.,)<br></span><span style="COLOR: #008080">149</span> <span style="COLOR: #000000">(138) F->(E).,)<br></span><span style="COLOR: #008080">150</span> <span style="COLOR: #000000">欏圭洰瑙勮寖鏃忓涓嬶細<br></span><span style="COLOR: #008080">151</span> <span style="COLOR: #000000">I0 { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 }<br></span><span style="COLOR: #008080">152</span> <span style="COLOR: #000000">I1 { 36, 37, 38, 39, 40, 41, 42 }<br></span><span style="COLOR: #008080">153</span> <span style="COLOR: #000000">I2 { 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55 }<br></span><span style="COLOR: #008080">154</span> <span style="COLOR: #000000">I3 { 56, 57, 58, 59, 60 }<br></span><span style="COLOR: #008080">155</span> <span style="COLOR: #000000">I4 { 61, 62, 63, 64, 5, 6, 7, 8, 9, 10, 65, 66, 67, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 68, 69, 28, 29, 30, 31, 32, 33, 34, 35, 70, 71, 72, 73 }<br></span><span style="COLOR: #008080">156</span> <span style="COLOR: #000000">I5 { 74, 75, 76, 77, 78 }<br></span><span style="COLOR: #008080">157</span> <span style="COLOR: #000000">I6 { 79, 11, 12, 13, 20, 21, 22, 23, 24, 25, 26, 27, 32, 33, 34, 35, 80, 14, 15, 16, 28, 29, 81, 17, 18, 19, 30, 31 }<br></span><span style="COLOR: #008080">158</span> <span style="COLOR: #000000">I7 { 82, 11, 12, 13, 20, 21, 22, 23, 24, 25, 26, 27, 32, 33, 34, 35, 83, 14, 15, 16, 28, 29, 84, 17, 18, 19, 30, 31 }<br></span><span style="COLOR: #008080">159</span> <span style="COLOR: #000000">I8 { 85, 26, 27, 86, 28, 29, 87, 30, 31, 88, 32, 33, 89, 34, 35 }<br></span><span style="COLOR: #008080">160</span> <span style="COLOR: #000000">I9 { 90, 26, 27, 91, 28, 29, 92, 30, 31, 93, 32, 33, 94, 34, 35 }<br></span><span style="COLOR: #008080">161</span> <span style="COLOR: #000000">I10 { 95, 96, 97, 39, 40, 41, 42, 98, 99, 100, 101 }<br></span><span style="COLOR: #008080">162</span> <span style="COLOR: #000000">I11 { 102, 44, 45, 103, 104, 48, 49, 50, 51, 52, 53, 54, 55 }<br></span><span style="COLOR: #008080">163</span> <span style="COLOR: #000000">I12 { 105, 57, 58, 59, 60 }<br></span><span style="COLOR: #008080">164</span> <span style="COLOR: #000000">I13 { 106, 62, 63, 64, 5, 6, 7, 8, 9, 10, 65, 66, 67, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 68, 69, 28, 29, 30, 31, 32, 33, 34, 35, 70, 71, 72, 73 }<br></span><span style="COLOR: #008080">165</span> <span style="COLOR: #000000">I14 { 107, 75, 76, 77, 78 }<br></span><span style="COLOR: #008080">166</span> <span style="COLOR: #000000">I15 { 108, 46, 47, 52, 53, 54, 55, 109, 48, 49, 110, 50, 51 }<br></span><span style="COLOR: #008080">167</span> <span style="COLOR: #000000">I16 { 56, 59, 60, 57, 58 }<br></span><span style="COLOR: #008080">168</span> <span style="COLOR: #000000">I17 { 61, 62, 63, 64, 5, 6, 7, 8, 9, 10, 65, 66, 67, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 68, 69, 28, 29, 30, 31, 32, 33, 34, 35, 72, 73, 70, 71 }<br></span><span style="COLOR: #008080">169</span> <span style="COLOR: #000000">I18 { 74, 77, 78, 75, 76 }<br></span><span style="COLOR: #008080">170</span> <span style="COLOR: #000000">I19 { 111, 46, 47, 52, 53, 54, 55, 112, 48, 49, 113, 50, 51 }<br></span><span style="COLOR: #008080">171</span> <span style="COLOR: #000000">I20 { 114, 115, 116, 117, 118 }<br></span><span style="COLOR: #008080">172</span> <span style="COLOR: #000000">I21 { 119, 120, 121, 122, 123 }<br></span><span style="COLOR: #008080">173</span> <span style="COLOR: #000000">I22 { 124, 125, 126, 127, 128 }<br></span><span style="COLOR: #008080">174</span> <span style="COLOR: #000000">I23 { 129, 65, 66, 67, 20, 21, 22, 23, 24, 25, 68, 69, 32, 33, 34, 35, 80, 14, 15, 16, 28, 29, 81, 17, 18, 19, 30, 31 }<br></span><span style="COLOR: #008080">175</span> <span style="COLOR: #000000">I24 { 130, 65, 66, 67, 20, 21, 22, 23, 24, 25, 68, 69, 32, 33, 34, 35, 83, 14, 15, 16, 28, 29, 84, 17, 18, 19, 30, 31 }<br></span><span style="COLOR: #008080">176</span> <span style="COLOR: #000000">I25 { 131, 68, 69, 86, 28, 29, 87, 30, 31, 88, 32, 33, 89, 34, 35 }<br></span><span style="COLOR: #008080">177</span> <span style="COLOR: #000000">I26 { 132, 68, 69, 91, 28, 29, 92, 30, 31, 93, 32, 33, 94, 34, 35 }<br></span><span style="COLOR: #008080">178</span> <span style="COLOR: #000000">I27 { 133, 96, 97, 39, 40, 41, 42, 98, 99, 100, 101 }<br></span><span style="COLOR: #008080">179</span> <span style="COLOR: #000000">I28 { 85, 26, 27, 88, 32, 33, 89, 34, 35, 86, 28, 29, 87, 30, 31 }<br></span><span style="COLOR: #008080">180</span> <span style="COLOR: #000000">I29 { 90, 26, 27, 93, 32, 33, 94, 34, 35, 91, 28, 29, 92, 30, 31 }<br></span><span style="COLOR: #008080">181</span> <span style="COLOR: #000000">I30 { 95, 96, 97, 39, 40, 41, 42, 100, 101, 98, 99 }<br></span><span style="COLOR: #008080">182</span> <span style="COLOR: #000000">I31 { 134, 103, 104, 52, 53, 54, 55, 109, 48, 49, 110, 50, 51 }<br></span><span style="COLOR: #008080">183</span> <span style="COLOR: #000000">I32 { 105, 59, 60, 57, 58 }<br></span><span style="COLOR: #008080">184</span> <span style="COLOR: #000000">I33 { 106, 62, 63, 64, 5, 6, 7, 8, 9, 10, 65, 66, 67, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 68, 69, 28, 29, 30, 31, 32, 33, 34, 35, 72, 73, 70, 71 }<br></span><span style="COLOR: #008080">185</span> <span style="COLOR: #000000">I34 { 107, 77, 78, 75, 76 }<br></span><span style="COLOR: #008080">186</span> <span style="COLOR: #000000">I35 { 135, 103, 104, 52, 53, 54, 55, 112, 48, 49, 113, 50, 51 }<br></span><span style="COLOR: #008080">187</span> <span style="COLOR: #000000">I36 { 136, 115, 116, 117, 118 }<br></span><span style="COLOR: #008080">188</span> <span style="COLOR: #000000">I37 { 137, 120, 121, 122, 123 }<br></span><span style="COLOR: #008080">189</span> <span style="COLOR: #000000">I38 { 138, 125, 126, 127, 128 }<br></span><span style="COLOR: #008080">190</span> <span style="COLOR: #000000">I39 { 114, 117, 118, 115, 116 }<br></span><span style="COLOR: #008080">191</span> <span style="COLOR: #000000">I40 { 119, 122, 123, 120, 121 }<br></span><span style="COLOR: #008080">192</span> <span style="COLOR: #000000">I41 { 124, 127, 128, 125, 126 }<br></span><span style="COLOR: #008080">193</span> <span style="COLOR: #000000">I42 { 131, 68, 69, 88, 32, 33, 89, 34, 35, 86, 28, 29, 87, 30, 31 }<br></span><span style="COLOR: #008080">194</span> <span style="COLOR: #000000">I43 { 132, 68, 69, 93, 32, 33, 94, 34, 35, 91, 28, 29, 92, 30, 31 }<br></span><span style="COLOR: #008080">195</span> <span style="COLOR: #000000">I44 { 133, 96, 97, 39, 40, 41, 42, 100, 101, 98, 99 }<br></span><span style="COLOR: #008080">196</span> <span style="COLOR: #000000">I45 { 136, 117, 118, 115, 116 }<br></span><span style="COLOR: #008080">197</span> <span style="COLOR: #000000">I46 { 137, 122, 123, 120, 121 }<br></span><span style="COLOR: #008080">198</span> <span style="COLOR: #000000">I47 { 138, 127, 128, 125, 126 }<br></span><span style="COLOR: #008080">199</span> <span style="COLOR: #000000">鐘舵佽漿縐昏〃濡備笅錛?br></span><span style="COLOR: #008080">200</span> <span style="COLOR: #000000">I0 -> I1 [ E ]<br></span><span style="COLOR: #008080">201</span> <span style="COLOR: #000000">I0 -> I2 [ T ]<br></span><span style="COLOR: #008080">202</span> <span style="COLOR: #000000">I0 -> I3 [ F ]<br></span><span style="COLOR: #008080">203</span> <span style="COLOR: #000000">I0 -> I4 [ ( ]<br></span><span style="COLOR: #008080">204</span> <span style="COLOR: #000000">I0 -> I5 [ i ]<br></span><span style="COLOR: #008080">205</span> <span style="COLOR: #000000">I1 -> I6 [ + ]<br></span><span style="COLOR: #008080">206</span> <span style="COLOR: #000000">I1 -> I7 [ - ]<br></span><span style="COLOR: #008080">207</span> <span style="COLOR: #000000">I2 -> I8 [ * ]<br></span><span style="COLOR: #008080">208</span> <span style="COLOR: #000000">I2 -> I9 [ / ]<br></span><span style="COLOR: #008080">209</span> <span style="COLOR: #000000">I4 -> I10 [ E ]<br></span><span style="COLOR: #008080">210</span> <span style="COLOR: #000000">I4 -> I11 [ T ]<br></span><span style="COLOR: #008080">211</span> <span style="COLOR: #000000">I4 -> I12 [ F ]<br></span><span style="COLOR: #008080">212</span> <span style="COLOR: #000000">I4 -> I13 [ ( ]<br></span><span style="COLOR: #008080">213</span> <span style="COLOR: #000000">I4 -> I14 [ i ]<br></span><span style="COLOR: #008080">214</span> <span style="COLOR: #000000">I6 -> I15 [ T ]<br></span><span style="COLOR: #008080">215</span> <span style="COLOR: #000000">I6 -> I16 [ F ]<br></span><span style="COLOR: #008080">216</span> <span style="COLOR: #000000">I6 -> I17 [ ( ]<br></span><span style="COLOR: #008080">217</span> <span style="COLOR: #000000">I6 -> I18 [ i ]<br></span><span style="COLOR: #008080">218</span> <span style="COLOR: #000000">I7 -> I19 [ T ]<br></span><span style="COLOR: #008080">219</span> <span style="COLOR: #000000">I7 -> I16 [ F ]<br></span><span style="COLOR: #008080">220</span> <span style="COLOR: #000000">I7 -> I17 [ ( ]<br></span><span style="COLOR: #008080">221</span> <span style="COLOR: #000000">I7 -> I18 [ i ]<br></span><span style="COLOR: #008080">222</span> <span style="COLOR: #000000">I8 -> I20 [ F ]<br></span><span style="COLOR: #008080">223</span> <span style="COLOR: #000000">I8 -> I4 [ ( ]<br></span><span style="COLOR: #008080">224</span> <span style="COLOR: #000000">I8 -> I5 [ i ]<br></span><span style="COLOR: #008080">225</span> <span style="COLOR: #000000">I9 -> I21 [ F ]<br></span><span style="COLOR: #008080">226</span> <span style="COLOR: #000000">I9 -> I4 [ ( ]<br></span><span style="COLOR: #008080">227</span> <span style="COLOR: #000000">I9 -> I5 [ i ]<br></span><span style="COLOR: #008080">228</span> <span style="COLOR: #000000">I10 -> I22 [ ) ]<br></span><span style="COLOR: #008080">229</span> <span style="COLOR: #000000">I10 -> I23 [ + ]<br></span><span style="COLOR: #008080">230</span> <span style="COLOR: #000000">I10 -> I24 [ - ]<br></span><span style="COLOR: #008080">231</span> <span style="COLOR: #000000">I11 -> I25 [ * ]<br></span><span style="COLOR: #008080">232</span> <span style="COLOR: #000000">I11 -> I26 [ / ]<br></span><span style="COLOR: #008080">233</span> <span style="COLOR: #000000">I13 -> I27 [ E ]<br></span><span style="COLOR: #008080">234</span> <span style="COLOR: #000000">I13 -> I11 [ T ]<br></span><span style="COLOR: #008080">235</span> <span style="COLOR: #000000">I13 -> I12 [ F ]<br></span><span style="COLOR: #008080">236</span> <span style="COLOR: #000000">I13 -> I13 [ ( ]<br></span><span style="COLOR: #008080">237</span> <span style="COLOR: #000000">I13 -> I14 [ i ]<br></span><span style="COLOR: #008080">238</span> <span style="COLOR: #000000">I15 -> I28 [ * ]<br></span><span style="COLOR: #008080">239</span> <span style="COLOR: #000000">I15 -> I29 [ / ]<br></span><span style="COLOR: #008080">240</span> <span style="COLOR: #000000">I17 -> I30 [ E ]<br></span><span style="COLOR: #008080">241</span> <span style="COLOR: #000000">I17 -> I11 [ T ]<br></span><span style="COLOR: #008080">242</span> <span style="COLOR: #000000">I17 -> I12 [ F ]<br></span><span style="COLOR: #008080">243</span> <span style="COLOR: #000000">I17 -> I13 [ ( ]<br></span><span style="COLOR: #008080">244</span> <span style="COLOR: #000000">I17 -> I14 [ i ]<br></span><span style="COLOR: #008080">245</span> <span style="COLOR: #000000">I19 -> I28 [ * ]<br></span><span style="COLOR: #008080">246</span> <span style="COLOR: #000000">I19 -> I29 [ / ]<br></span><span style="COLOR: #008080">247</span> <span style="COLOR: #000000">I23 -> I31 [ T ]<br></span><span style="COLOR: #008080">248</span> <span style="COLOR: #000000">I23 -> I32 [ F ]<br></span><span style="COLOR: #008080">249</span> <span style="COLOR: #000000">I23 -> I33 [ ( ]<br></span><span style="COLOR: #008080">250</span> <span style="COLOR: #000000">I23 -> I34 [ i ]<br></span><span style="COLOR: #008080">251</span> <span style="COLOR: #000000">I24 -> I35 [ T ]<br></span><span style="COLOR: #008080">252</span> <span style="COLOR: #000000">I24 -> I32 [ F ]<br></span><span style="COLOR: #008080">253</span> <span style="COLOR: #000000">I24 -> I33 [ ( ]<br></span><span style="COLOR: #008080">254</span> <span style="COLOR: #000000">I24 -> I34 [ i ]<br></span><span style="COLOR: #008080">255</span> <span style="COLOR: #000000">I25 -> I36 [ F ]<br></span><span style="COLOR: #008080">256</span> <span style="COLOR: #000000">I25 -> I13 [ ( ]<br></span><span style="COLOR: #008080">257</span> <span style="COLOR: #000000">I25 -> I14 [ i ]<br></span><span style="COLOR: #008080">258</span> <span style="COLOR: #000000">I26 -> I37 [ F ]<br></span><span style="COLOR: #008080">259</span> <span style="COLOR: #000000">I26 -> I13 [ ( ]<br></span><span style="COLOR: #008080">260</span> <span style="COLOR: #000000">I26 -> I14 [ i ]<br></span><span style="COLOR: #008080">261</span> <span style="COLOR: #000000">I27 -> I38 [ ) ]<br></span><span style="COLOR: #008080">262</span> <span style="COLOR: #000000">I27 -> I23 [ + ]<br></span><span style="COLOR: #008080">263</span> <span style="COLOR: #000000">I27 -> I24 [ - ]<br></span><span style="COLOR: #008080">264</span> <span style="COLOR: #000000">I28 -> I39 [ F ]<br></span><span style="COLOR: #008080">265</span> <span style="COLOR: #000000">I28 -> I17 [ ( ]<br></span><span style="COLOR: #008080">266</span> <span style="COLOR: #000000">I28 -> I18 [ i ]<br></span><span style="COLOR: #008080">267</span> <span style="COLOR: #000000">I29 -> I40 [ F ]<br></span><span style="COLOR: #008080">268</span> <span style="COLOR: #000000">I29 -> I17 [ ( ]<br></span><span style="COLOR: #008080">269</span> <span style="COLOR: #000000">I29 -> I18 [ i ]<br></span><span style="COLOR: #008080">270</span> <span style="COLOR: #000000">I30 -> I41 [ ) ]<br></span><span style="COLOR: #008080">271</span> <span style="COLOR: #000000">I30 -> I23 [ + ]<br></span><span style="COLOR: #008080">272</span> <span style="COLOR: #000000">I30 -> I24 [ - ]<br></span><span style="COLOR: #008080">273</span> <span style="COLOR: #000000">I31 -> I42 [ * ]<br></span><span style="COLOR: #008080">274</span> <span style="COLOR: #000000">I31 -> I43 [ / ]<br></span><span style="COLOR: #008080">275</span> <span style="COLOR: #000000">I33 -> I44 [ E ]<br></span><span style="COLOR: #008080">276</span> <span style="COLOR: #000000">I33 -> I11 [ T ]<br></span><span style="COLOR: #008080">277</span> <span style="COLOR: #000000">I33 -> I12 [ F ]<br></span><span style="COLOR: #008080">278</span> <span style="COLOR: #000000">I33 -> I13 [ ( ]<br></span><span style="COLOR: #008080">279</span> <span style="COLOR: #000000">I33 -> I14 [ i ]<br></span><span style="COLOR: #008080">280</span> <span style="COLOR: #000000">I35 -> I42 [ * ]<br></span><span style="COLOR: #008080">281</span> <span style="COLOR: #000000">I35 -> I43 [ / ]<br></span><span style="COLOR: #008080">282</span> <span style="COLOR: #000000">I42 -> I45 [ F ]<br></span><span style="COLOR: #008080">283</span> <span style="COLOR: #000000">I42 -> I33 [ ( ]<br></span><span style="COLOR: #008080">284</span> <span style="COLOR: #000000">I42 -> I34 [ i ]<br></span><span style="COLOR: #008080">285</span> <span style="COLOR: #000000">I43 -> I46 [ F ]<br></span><span style="COLOR: #008080">286</span> <span style="COLOR: #000000">I43 -> I33 [ ( ]<br></span><span style="COLOR: #008080">287</span> <span style="COLOR: #000000">I43 -> I34 [ i ]<br></span><span style="COLOR: #008080">288</span> <span style="COLOR: #000000">I44 -> I47 [ ) ]<br></span><span style="COLOR: #008080">289</span> <span style="COLOR: #000000">I44 -> I23 [ + ]<br></span><span style="COLOR: #008080">290</span> <span style="COLOR: #000000">I44 -> I24 [ - ]</span></div> <br>鐢辨鍙LR(1)鍒嗘瀽琛ㄤ細鍙樺緱鏃犳瘮鐨勫法澶? <img src ="http://www.shnenglu.com/lwch/aggbug/120553.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-16 16:03 <a href="http://www.shnenglu.com/lwch/archive/2010/07/16/120553.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>宸插疄鐜癝LR(1)鍒嗘瀽琛ㄧ殑鑷姩鍒涘緩http://www.shnenglu.com/lwch/archive/2010/07/13/120174.htmllwchlwchMon, 12 Jul 2010 16:00:00 GMThttp://www.shnenglu.com/lwch/archive/2010/07/13/120174.htmlhttp://www.shnenglu.com/lwch/comments/120174.htmlhttp://www.shnenglu.com/lwch/archive/2010/07/13/120174.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/120174.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/120174.htmlE->E+T
E->E-T
E->T
T->T*F
T->T/F
T->F
F->(E)
F->i
姹傚緱SLR(1)鍒嗘瀽琛ㄤ負:


lwch 2010-07-13 00:00 鍙戣〃璇勮
]]>
鍏充簬瀛楃涓叉搷浣滅殑娉ㄦ剰浜嬮」http://www.shnenglu.com/lwch/archive/2010/07/11/120092.htmllwchlwchSun, 11 Jul 2010 10:38:00 GMThttp://www.shnenglu.com/lwch/archive/2010/07/11/120092.htmlhttp://www.shnenglu.com/lwch/comments/120092.htmlhttp://www.shnenglu.com/lwch/archive/2010/07/11/120092.html#Feedback3http://www.shnenglu.com/lwch/comments/commentRss/120092.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/120092.htmlCString str = L"";
str += 'a' + L"a";
鎴杝tr += L"a" + 'a';
鍒嗗埆浼氬緱鍒頒粈涔?
絳旀鏄竴鍫嗕竴鏍風(fēng)殑涔辯爜.
榪欐槸涓轟粈涔堝憿?
鐢變簬榪愮畻絎︾殑浼樺厛綰х殑鍏崇郴鍏堣綆?a' + L"a"鎴朙"a" + 'a'褰撳瓧絎︿覆涓庡崟涓瓧絎︾浉鍔犳椂緙栬瘧鍣ㄨ涓烘槸灝嗘寚閽堝悜鍚庣Щ鍔?a'(0x61)涓瓧鑺?鏈鍚庤繘鍏String鐨?=榪愮畻絎﹂噸杞藉嚱鏁?鐢變簬浼犲叆鐨勬槸涓涓瓧絎︿覆鎸囬拡鎵浠ュ嚱鏁頒細灝嗕粠L"a"+0x61鐨勪綅緗紑濮嬪埌\0緇撳熬鐨勬墍鏈夊瓧絎﹁繛鎺ュ埌鍘熷瓧絎﹀悗.搴旀涔熷氨鍑虹幇浜嗕貢鐮佺殑鎯呭喌.
瑙e喅鏂規(guī)硶:
CString str = L"";
str += CString('a') + L"a";
鎴杝tr += CString(L"a") + 'a';
鍦ㄥ仛鍔犳硶榪愮畻鏃墮兘浼氳繘鍏String鐨?榪愮畻絎︾殑閲嶈澆鍑芥暟浠ュ緱鍒版紜殑緇撴灉.

lwch 2010-07-11 18:38 鍙戣〃璇勮
]]>
宸插疄鐜癓R(0)鍒嗘瀽琛ㄧ殑鑷姩鏋勯?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/11/120088.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Sun, 11 Jul 2010 09:05:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/11/120088.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/120088.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/11/120088.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/120088.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/120088.html</trackback:ping><description><![CDATA[瀵逛簬緇欏畾鏂囨硶:<br>S->aAcBe<br>A->b<br>A->Ab<br>B->d<br>鐢熸垚鍒嗘瀽琛ㄥ緱:<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080"> 1</span> <span style="COLOR: #000000">LR(0)鍒嗘瀽琛ㄤ負錛?br></span><span style="COLOR: #008080"> 2</span> <span style="COLOR: #000000">    a    c    e    b    d    #    S    A    B<br></span><span style="COLOR: #008080"> 3</span> <span style="COLOR: #000000">0    S2    ε    ε    ε    ε    ε    1    ε    ε<br></span><span style="COLOR: #008080"> 4</span> <span style="COLOR: #000000">1    ε    ε    ε    ε    ε    acc    ε    ε    ε<br></span><span style="COLOR: #008080"> 5</span> <span style="COLOR: #000000">2    ε    ε    ε    S4    ε    ε    ε    3    ε<br></span><span style="COLOR: #008080"> 6</span> <span style="COLOR: #000000">3    ε    S5    ε    S6    ε    ε    ε    ε    ε<br></span><span style="COLOR: #008080"> 7</span> <span style="COLOR: #000000">4    R2    R2    R2    R2    R2    R2    ε    ε    ε<br></span><span style="COLOR: #008080"> 8</span> <span style="COLOR: #000000">5    ε    ε    ε    ε    S8    ε    ε    ε    7<br></span><span style="COLOR: #008080"> 9</span> <span style="COLOR: #000000">6    R3    R3    R3    R3    R3    R3    ε    ε    ε<br></span><span style="COLOR: #008080">10</span> <span style="COLOR: #000000">7    ε    ε    S9    ε    ε    ε    ε    ε    ε<br></span><span style="COLOR: #008080">11</span> <span style="COLOR: #000000">8    R4    R4    R4    R4    R4    R4    ε    ε    ε<br></span><span style="COLOR: #008080">12</span> <span style="COLOR: #000000">9    R1    R1    R1    R1    R1    R1    ε    ε    ε</span></div> <img src ="http://www.shnenglu.com/lwch/aggbug/120088.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-11 17:05 <a href="http://www.shnenglu.com/lwch/archive/2010/07/11/120088.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>宸插疄鐜頒粠鏂囨硶鏍戝埌蔚-Parser鐨勮漿鎹?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/09/119888.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Fri, 09 Jul 2010 09:45:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/09/119888.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/119888.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/09/119888.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/119888.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/119888.html</trackback:ping><description><![CDATA[瀵逛簬緇欏畾鏂囨硶:<br> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp->exp1</span></p> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp1->exp2 | exp5</span></p> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp5->exp1 (<span style="COLOR: green">“<”</span> | <span style="COLOR: green">“>”</span> | <span style="COLOR: green">“==”</span>) exp2</span></p> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp2->exp3 | exp6</span></p> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp6->exp2 (<span style="COLOR: green">“+”</span> | <span style="COLOR: green">“-“</span>) exp3</span></p> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp3->exp4 | exp7</span></p> <p class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><span lang=EN-US>exp7->exp3(<span style="COLOR: green">“*”</span> | <span style="COLOR: green">“/”</span>) exp4</span></p> <span lang=EN-US style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: 瀹嬩綋; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">exp4-><span style="COLOR: green">”(“</span> exp <span style="COLOR: green">“)”<br><br></span></span>鐢熸垚ε-Parser寰?<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> 1 ε- Parser:<br> 2 Start:28<br> 3 X:        Type        From        To<br> 4 (:        0        0        1(finial)<br> 5 ):        0        2        3(finial)<br> 6 ε:        2        1(finial)        0<br> 7 ε:        2        1(finial)        2<br> 8 *:        0        4        5(finial)<br> 9 /:        0        6        7(finial)<br>10 ε:        2        8        4<br>11 ε:        2        5(finial)        9(finial)<br>12 ε:        2        8        6<br>13 ε:        2        7(finial)        9(finial)<br>14 ε:        2        3(finial)        8<br>15 ε:        2        9(finial)        8<br>16 ε:        2        10        0<br>17 ε:        2        3(finial)        11(finial)<br>18 ε:        2        10        0<br>19 ε:        2        9(finial)        11(finial)<br>20 +:        0        12        13(finial)<br>21 -:        0        14        15(finial)<br>22 ε:        2        16        12<br>23 ε:        2        13(finial)        17(finial)<br>24 ε:        2        16        14<br>25 ε:        2        15(finial)        17(finial)<br>26 ε:        2        11(finial)        16<br>27 ε:        2        17(finial)        16<br>28 ε:        2        18        10<br>29 ε:        2        11(finial)        19(finial)<br>30 ε:        2        18        10<br>31 ε:        2        17(finial)        19(finial)<br>32 <span><:        0        20        21(finial)</span><br>33 <span>>:  </span>      0        22        23(finial)<br>34 ==:        1        24        25(finial)<br>35 ε:        2        26        20<br>36 ε:        2        21(finial)        27(finial)<br>37 ε:        2        26        22<br>38 ε:        2        23(finial)        27(finial)<br>39 ε:        2        26        24<br>40 ε:        2        25(finial)        27(finial)<br>41 ε:        2        19(finial)        26<br>42 ε:        2        27(finial)        26<br>43 ε:        2        28        18<br>44 ε:        2        19(finial)        29(finial)<br>45 ε:        2        28        18<br>46 ε:        2        27(finial)        29(finial)</div> <br>緙虹偣:蹇呴』鎵嬪姩鐢熸垚鏂囨硶鏍?<br>涓嬩竴姝ユ槸鍘婚櫎ε杈? <img src ="http://www.shnenglu.com/lwch/aggbug/119888.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-09 17:45 <a href="http://www.shnenglu.com/lwch/archive/2010/07/09/119888.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鐢ㄦ鍒欒〃杈懼紡鏋勯犺瘝娉曞垎鏋愬櫒http://www.shnenglu.com/lwch/archive/2010/07/03/119258.htmllwchlwchSat, 03 Jul 2010 10:14:00 GMThttp://www.shnenglu.com/lwch/archive/2010/07/03/119258.htmlhttp://www.shnenglu.com/lwch/comments/119258.htmlhttp://www.shnenglu.com/lwch/archive/2010/07/03/119258.html#Feedback3http://www.shnenglu.com/lwch/comments/commentRss/119258.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/119258.html銆婄敤姝e垯琛ㄨ揪寮忔瀯閫犺瘝娉曞垎鏋愬櫒銆?/a>
榪欑瘒鏂囩珷闃愯堪浜嗗浣曠敤姝e垯琛ㄨ揪寮忔瀯閫犺娉曟爲騫剁敓鎴?#949;-NFA錛屽幓闄?#949;杈硅漿鎹㈠埌NFA錛屾渶鍚庤漿鎹㈠埌DFA鐨勬墍鏈夎繃紼嬨傚涔犵紪璇戝師鐞嗙殑鏈嬪弸浠鏋滈亣鍒頒粈涔堥棶棰樹笉濡ㄧ湅涓嬭繖綃囨枃绔犮?
婧愮爜涓嬭澆

lwch 2010-07-03 18:14 鍙戣〃璇勮
]]>
宸插疄鐜扮畝鍗曟鍒欒〃杈懼紡->蔚-NFA->NFA->DFA鐨勮漿鎹?/title><link>http://www.shnenglu.com/lwch/archive/2010/07/03/119205.html</link><dc:creator>lwch</dc:creator><author>lwch</author><pubDate>Fri, 02 Jul 2010 16:21:00 GMT</pubDate><guid>http://www.shnenglu.com/lwch/archive/2010/07/03/119205.html</guid><wfw:comment>http://www.shnenglu.com/lwch/comments/119205.html</wfw:comment><comments>http://www.shnenglu.com/lwch/archive/2010/07/03/119205.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/lwch/comments/commentRss/119205.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/lwch/services/trackbacks/119205.html</trackback:ping><description><![CDATA[<p>紼嶅悗鍒朵綔鐩稿叧鏂囨。..<br></p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #008080">  1</span><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">Regex Expression:(ab|a[a-z0-9]+|cd)*<br></span><span style="COLOR: #008080">  2</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>CharClassList:<br></span><span style="COLOR: #008080">  3</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>*        0<br></span><span style="COLOR: #008080">  4</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>|        1<br></span><span style="COLOR: #008080">  5</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>a        2<br></span><span style="COLOR: #008080">  6</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>b        3<br></span><span style="COLOR: #008080">  7</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>+        4<br></span><span style="COLOR: #008080">  8</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>a - z        5<br></span><span style="COLOR: #008080">  9</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>0 - 9        6<br></span><span style="COLOR: #008080"> 10</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>c        7<br></span><span style="COLOR: #008080"> 11</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>d        8<br></span><span style="COLOR: #008080"> 12</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br></span><span style="COLOR: #008080"> 13</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε-NFA:<br></span><span style="COLOR: #008080"> 14</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>Start:26 End:26<br></span><span style="COLOR: #008080"> 15</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>X:From    To<br></span><span style="COLOR: #008080"> 16</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:0        1<br></span><span style="COLOR: #008080"> 17</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>3:2        3<br></span><span style="COLOR: #008080"> 18</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:1        2<br></span><span style="COLOR: #008080"> 19</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:4        5<br></span><span style="COLOR: #008080"> 20</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:6        7<br></span><span style="COLOR: #008080"> 21</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:8        9<br></span><span style="COLOR: #008080"> 22</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:10        6<br></span><span style="COLOR: #008080"> 23</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:10        8<br></span><span style="COLOR: #008080"> 24</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:7        11<br></span><span style="COLOR: #008080"> 25</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:9        11<br></span><span style="COLOR: #008080"> 26</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:12        13<br></span><span style="COLOR: #008080"> 27</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:14        15<br></span><span style="COLOR: #008080"> 28</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:16        12<br></span><span style="COLOR: #008080"> 29</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:16        14<br></span><span style="COLOR: #008080"> 30</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:13        17<br></span><span style="COLOR: #008080"> 31</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:15        17<br></span><span style="COLOR: #008080"> 32</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:17        10<br></span><span style="COLOR: #008080"> 33</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:11        17<br></span><span style="COLOR: #008080"> 34</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:5        16<br></span><span style="COLOR: #008080"> 35</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:18        0<br></span><span style="COLOR: #008080"> 36</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:18        4<br></span><span style="COLOR: #008080"> 37</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:3        19<br></span><span style="COLOR: #008080"> 38</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:17        19<br></span><span style="COLOR: #008080"> 39</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:20        21<br></span><span style="COLOR: #008080"> 40</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>8:22        23<br></span><span style="COLOR: #008080"> 41</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:21        22<br></span><span style="COLOR: #008080"> 42</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:24        18<br></span><span style="COLOR: #008080"> 43</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:24        20<br></span><span style="COLOR: #008080"> 44</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:19        25<br></span><span style="COLOR: #008080"> 45</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:23        25<br></span><span style="COLOR: #008080"> 46</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:26        24<br></span><span style="COLOR: #008080"> 47</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>ε:25        26<br></span><span style="COLOR: #008080"> 48</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br></span><span style="COLOR: #008080"> 49</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>NFA:<br></span><span style="COLOR: #008080"> 50</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>Start:26<br></span><span style="COLOR: #008080"> 51</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>X:From    To<br></span><span style="COLOR: #008080"> 52</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:26(finial)        21<br></span><span style="COLOR: #008080"> 53</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:26(finial)        1<br></span><span style="COLOR: #008080"> 54</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:26(finial)        5<br></span><span style="COLOR: #008080"> 55</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>3:1        3(finial)<br></span><span style="COLOR: #008080"> 56</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:3(finial)        21<br></span><span style="COLOR: #008080"> 57</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:3(finial)        1<br></span><span style="COLOR: #008080"> 58</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:3(finial)        5<br></span><span style="COLOR: #008080"> 59</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:5        13(finial)<br></span><span style="COLOR: #008080"> 60</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:5        15(finial)<br></span><span style="COLOR: #008080"> 61</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:7(finial)        7(finial)<br></span><span style="COLOR: #008080"> 62</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:7(finial)        9(finial)<br></span><span style="COLOR: #008080"> 63</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:7(finial)        21<br></span><span style="COLOR: #008080"> 64</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:7(finial)        1<br></span><span style="COLOR: #008080"> 65</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:7(finial)        5<br></span><span style="COLOR: #008080"> 66</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:9(finial)        7(finial)<br></span><span style="COLOR: #008080"> 67</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:9(finial)        9(finial)<br></span><span style="COLOR: #008080"> 68</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:9(finial)        21<br></span><span style="COLOR: #008080"> 69</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:9(finial)        1<br></span><span style="COLOR: #008080"> 70</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:9(finial)        5<br></span><span style="COLOR: #008080"> 71</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:13(finial)        7(finial)<br></span><span style="COLOR: #008080"> 72</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:13(finial)        9(finial)<br></span><span style="COLOR: #008080"> 73</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:13(finial)        21<br></span><span style="COLOR: #008080"> 74</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:13(finial)        1<br></span><span style="COLOR: #008080"> 75</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:13(finial)        5<br></span><span style="COLOR: #008080"> 76</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:15(finial)        7(finial)<br></span><span style="COLOR: #008080"> 77</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:15(finial)        9(finial)<br></span><span style="COLOR: #008080"> 78</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:15(finial)        21<br></span><span style="COLOR: #008080"> 79</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:15(finial)        1<br></span><span style="COLOR: #008080"> 80</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:15(finial)        5<br></span><span style="COLOR: #008080"> 81</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>8:21        23(finial)<br></span><span style="COLOR: #008080"> 82</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:23(finial)        21<br></span><span style="COLOR: #008080"> 83</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:23(finial)        1<br></span><span style="COLOR: #008080"> 84</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:23(finial)        5<br></span><span style="COLOR: #008080"> 85</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br></span><span style="COLOR: #008080"> 86</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>DFA:<br></span><span style="COLOR: #008080"> 87</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>Start:26<br></span><span style="COLOR: #008080"> 88</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>X:Froms        Tos<br></span><span style="COLOR: #008080"> 89</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:26 (finial)        21 <br></span><span style="COLOR: #008080"> 90</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:26 (finial)        1 5 <br></span><span style="COLOR: #008080"> 91</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>8:21         23 (finial)<br></span><span style="COLOR: #008080"> 92</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>3:1 5         3 (finial)<br></span><span style="COLOR: #008080"> 93</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:1 5         13 (finial)<br></span><span style="COLOR: #008080"> 94</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:1 5         15 (finial)<br></span><span style="COLOR: #008080"> 95</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:23 (finial)        21 <br></span><span style="COLOR: #008080"> 96</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:23 (finial)        1 5 <br></span><span style="COLOR: #008080"> 97</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:3 (finial)        21 <br></span><span style="COLOR: #008080"> 98</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:3 (finial)        1 5 <br></span><span style="COLOR: #008080"> 99</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:13 (finial)        7 (finial)<br></span><span style="COLOR: #008080">100</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:13 (finial)        9 (finial)<br></span><span style="COLOR: #008080">101</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:13 (finial)        21 <br></span><span style="COLOR: #008080">102</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:13 (finial)        1 5 <br></span><span style="COLOR: #008080">103</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:15 (finial)        7 (finial)<br></span><span style="COLOR: #008080">104</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:15 (finial)        9 (finial)<br></span><span style="COLOR: #008080">105</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:15 (finial)        21 <br></span><span style="COLOR: #008080">106</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:15 (finial)        1 5 <br></span><span style="COLOR: #008080">107</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:7 (finial)        7 (finial)<br></span><span style="COLOR: #008080">108</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:7 (finial)        9 (finial)<br></span><span style="COLOR: #008080">109</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:7 (finial)        21 <br></span><span style="COLOR: #008080">110</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:7 (finial)        1 5 <br></span><span style="COLOR: #008080">111</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>5:9 (finial)        7 (finial)<br></span><span style="COLOR: #008080">112</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>6:9 (finial)        9 (finial)<br></span><span style="COLOR: #008080">113</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>7:9 (finial)        21 <br></span><span style="COLOR: #008080">114</span><span style="COLOR: #000000"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>2:9 (finial)        1 5 </span></div> <img src ="http://www.shnenglu.com/lwch/aggbug/119205.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/lwch/" target="_blank">lwch</a> 2010-07-03 00:21 <a href="http://www.shnenglu.com/lwch/archive/2010/07/03/119205.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>NScript璇嶆硶鍒嗘瀽鍣?璇硶鍒嗘瀽鍣?浠g爜鐢熸垚鍣ㄥ凡鍒朵綔瀹屾垚http://www.shnenglu.com/lwch/archive/2010/06/26/118760.htmllwchlwchSat, 26 Jun 2010 02:57:00 GMThttp://www.shnenglu.com/lwch/archive/2010/06/26/118760.htmlhttp://www.shnenglu.com/lwch/comments/118760.htmlhttp://www.shnenglu.com/lwch/archive/2010/06/26/118760.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/118760.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/118760.htmlDo璇彞:

For璇彞:

Function:

If璇彞:

Local璇彞:

Switch璇彞:

While璇彞:

闃朵箻:



lwch 2010-06-26 10:57 鍙戣〃璇勮
]]>
NScript閮ㄥ垎鏂囨硶http://www.shnenglu.com/lwch/archive/2010/06/26/118755.htmllwchlwchSat, 26 Jun 2010 02:37:00 GMThttp://www.shnenglu.com/lwch/archive/2010/06/26/118755.htmlhttp://www.shnenglu.com/lwch/comments/118755.htmlhttp://www.shnenglu.com/lwch/archive/2010/06/26/118755.html#Feedback0http://www.shnenglu.com/lwch/comments/commentRss/118755.htmlhttp://www.shnenglu.com/lwch/services/trackbacks/118755.htmlsym->[a-z|A-Z|_][a-z|A-Z|0-9|_]*

int->[0-9]+

real->[0-9]+.[0-9]+

string->

datatype->”int” | “real” | “bool” | “string”

 

prgama->function | functionheader “;”

functionheader->”function” sym ”(“ parameters ”)”  [“as” datatype]

parameters->[[sym as datatype],parameters]

function->functionheader “{“ block “}”

block->statementlist

statement->local-stmt | if-stmt | while-stmt | do-stmt | for-stmt | switch-stmt | assign-stmt | call-stmt | return-stmt

local-stmt->”local” varlist

varlist->symlist “as” datatype [“,” varlist]

if-stmt->”if” exp statementlist [“else” statementlist]

while-stmt->”while” exp statementlist

do-stmt->”do” statementlist “while” exp “;”

for-stmt->”for” “(“ exp “;” exp “;” exp “)” statementlist

switch-stmt->”switch” exp “{“ case-stmt “}”

case-stmt->(”case” sym | “default”) “:” statementlist case-stmt

assign-stmt->exp “=” exp

call-stmt->sym “(“ parameters “)” “;”

return-stmt->”return” exp

 

symlist->sym [“,” symlist]

statement->“{“ statementlist “}”

statement->”;”

statementlist->statement [statementlist]

 

exp->exp1

exp1->exp2

exp1->exp1 (“<” | “<=” | “=” | “>=” | “>” | “!=”) exp2

exp2->exp3

exp2->exp2 (“+” | “-“) exp3

exp3->exp4

exp3->exp3(“*” | “/”) exp4

exp4->”(“ exp “)”

 



lwch 2010-06-26 10:37 鍙戣〃璇勮
]]>
亚洲av日韩精品久久久久久a| 久久久不卡国产精品一区二区 | 亚洲伊人久久大香线蕉综合图片| 久久久久久亚洲Av无码精品专口| 国产精品伊人久久伊人电影| 久久国产免费直播| 99久久精品免费国产大片| 久久精品中文无码资源站| 亚洲色欲久久久久综合网| 日韩精品久久久久久| 精品久久久一二三区| 97久久精品人人做人人爽| 亚洲欧美精品伊人久久| 中文字幕一区二区三区久久网站| 日韩精品国产自在久久现线拍| 免费国产99久久久香蕉| 国产精品一久久香蕉国产线看| 日本一区精品久久久久影院| www.久久精品| 国产一区二区精品久久岳 | www性久久久com| 欧美国产成人久久精品| 亚洲午夜久久久久久久久久| 熟妇人妻久久中文字幕| www.久久热.com| 久久不见久久见免费影院www日本| 久久久久亚洲精品无码网址 | 亚洲国产成人精品91久久久 | 99久久精品毛片免费播放| 国产精品岛国久久久久| 91亚洲国产成人久久精品网址| 久久久艹| 亚洲国产精品无码久久一区二区| 996久久国产精品线观看| 热99re久久国超精品首页| 欧美成a人片免费看久久| 久久久久久精品无码人妻| 国产精品天天影视久久综合网| 99热热久久这里只有精品68| 一本一道久久a久久精品综合| 久久国产亚洲高清观看|