{"id":619,"date":"2005-05-18T08:38:38","date_gmt":"2005-05-18T00:38:38","guid":{"rendered":"http:\/\/pony.hk\/?p=619"},"modified":"2020-09-29T11:31:33","modified_gmt":"2020-09-29T03:31:33","slug":"%e7%bc%96%e8%af%91%e5%8e%9f%e7%90%86%e4%b9%8b%e8%af%8d%e6%b3%95%e5%88%86%e6%9e%90%e5%99%a8-pass%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lnmp.ivan.xin\/?p=619","title":{"rendered":"\u7f16\u8bd1\u539f\u7406\u4e4b\u8bcd\u6cd5\u5206\u6790\u5668-----pass\uff01"},"content":{"rendered":"<p><a href=\"http:\/\/attachments.ivan.xin\/files\/program\/cifa.tar.gz\">\u8bf7\u70b9\u51fb\u8fd9\u91cc\u4e0b\u8f7d\u201c\u8bcd\u6cd5\u5206\u6790\u5668\u201d\u6e90\u7a0b\u5e8f<\/a><\/p>\n<blockquote><p>#include&lt;cstdio&gt;<br \/>\n#include&lt;iostream&gt;<br \/>\n#include&lt;cstdlib&gt;<br \/>\n#include&lt;fstream&gt;<br \/>\n#include&lt;string&gt;<br \/>\n#include&lt;cmath&gt;<br \/>\nusing namespace std;<br \/>\nstruct token\/\/token\u7ed3\u6784\u4f53<br \/>\n{<br \/>\nint code;<br \/>\nint num;<br \/>\ntoken *next;<br \/>\n};<br \/>\ntoken *token_head,*token_tail;\/\/token\u961f\u5217<br \/>\nstruct number\/\/number\u7ed3\u6784\u4f53<br \/>\n{<br \/>\nint num;<br \/>\nint value;<br \/>\nnumber *next;<br \/>\n};<br \/>\nnumber *number_head,*number_tail;\/\/number\u961f\u5217<br \/>\nstruct str\/\/string\u7ed3\u6784\u4f53<br \/>\n{<br \/>\nint num;<br \/>\nstring\u00a0\u00a0word;<br \/>\nstr *next;<br \/>\n};<br \/>\nstr *string_head,*string_tail;\/\/string\u961f\u5217<br \/>\nvoid scan();\/\/\u6309\u5b57\u7b26\u8bfb\u53d6\u6e90\u6587\u4ef6<br \/>\nint judge(char ch);\/\/\u5224\u65ad\u8f93\u5165\u5b57\u7b26\u7684\u7c7b\u578b<br \/>\nvoid out1(char ch);\/\/\u5199\u5165token.txt<br \/>\nvoid out2(char ch,string word);\/\/\u5199\u5165number.txt<br \/>\nvoid out3(char ch,string word);\/\/\u5199\u5165string.txt<br \/>\nvoid input1(token *temp);\/\/\u63d2\u5165\u7ed3\u70b9\u5230\u961f\u5217token<br \/>\nvoid input2(number *temp);\/\/\u63d2\u5165\u7ed3\u70b9\u5230\u961f\u5217number<br \/>\nvoid input3(str *temp);\/\/\u63d2\u5165\u7ed3\u70b9\u5230\u961f\u5217string<br \/>\nvoid output();\/\/\u8f93\u51fa\u4e09\u4e2a\u961f\u5217\u7684\u5185\u5bb9<br \/>\nvoid outfile();\/\/\u8f93\u51fa\u4e09\u4e2a\u961f\u5217\u7684\u5185\u5bb9\u5230\u76f8\u5e94\u6587\u4ef6\u4e2d<br \/>\nFILE *fp;\/\/\u6587\u4ef6<br \/>\nint wordcount;\/\/\u6807\u5fd7\u7b26\u8ba1\u6570<br \/>\nint numcount;\/\/\u6574\u578b\u5e38\u6570\u8ba1\u6570<br \/>\nint err;\/\/\u6807\u5fd7\u8bcd\u6cd5\u5206\u6790\u7ed3\u679c\u6b63\u786e\u6216\u9519\u8bef<br \/>\nint nl;\/\/\u8bfb\u53d6\u884c\u6570<br \/>\n\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026<\/p><\/blockquote>\n<p>8421(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2006-1-6 14:37:45<\/p>\n<p>\u8bbe\u8ba1\u9898\u76ee<br \/>\n1\u3001\u00a0\u00a0\u5355\u8bcd\u8bc6\u522b\uff08\u5fc5\u9009\uff09<br \/>\n*C\u8bed\u8a00\u5e38\u6570<br \/>\n*C\u8bed\u8a00\u6807\u8bc6\u7b26<br \/>\n2\u3001\u00a0\u00a0\u7a0b\u5e8f\u6587\u672c\u7684\u5904\u7406\uff08\u5fc5\u9009\uff09<br \/>\n*\u5c06C\u7a0b\u5e8f\u4e2d\u7684\u6240\u6709\u6ce8\u91ca\u5b57\u6bcd\u519b\u5927\u5199<br \/>\n*\u5c06C\u8bed\u8a00\u6ce8\u91ca\u4e4b\u5916\u7684\u6240\u6709\u4fdd\u7559\u5b57\u5168\u90e8\u5927\u5199<br \/>\n3\u3001\u00a0\u00a0\u7a0b\u5e8f\u5b9e\u73b0\uff08\u9009\u505a1\u4e2a\uff09<br \/>\n*\u7b80\u5355\u8bed\u8a00\u8bcd\u6cd5\u5206\u6790\u5668\u7684\u72b6\u6001\u8f6c\u6362\u56fe\uff08P43\uff09<br \/>\n*\u9012\u5f52\u4e0b\u964d\u8bed\u6cd5\u5206\u6790\uff08P74\uff09<br \/>\n\u5404\u4f4d\u5927\u54e5 \u8fd9\u662f\u6211\u4eec\u7684\u7f16\u8bd1\u539f\u7406\u8bfe\u8bbe\u8981\u6c42\uff0c\u90a3\u4f4d\u5927\u54e5\u5e2e\u5e2e\u5c0f\u5f1f\u963f<br \/>\n\u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u76f8\u5e94\u7a0b\u5e8f\u8bf7\u53c2\u8003blog\u5de6\u4e0a\u89d2\u7a0b\u5e8f\u4e0b\u8f7d\u94fe\u63a5\u3002<\/p>\n<p>\u54e6(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-12-12 16:16:48<\/p>\n<p>\u6211\u770b\u4e0d\u592a\u61c2 \u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u8bcd\u6cd5\u5206\u6790\u529f\u80fd\u5176\u5b9e\u5c31\u662f\u5206\u7c7b\u548c\u8f6c\u5316<\/p>\n<p>\u5b50\u5706(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-11-25 9:04:46<\/p>\n<p>\u5404\u4f4d\u9ad8\u624b\uff0c\u8fd9\u662f\u6211\u4eec\u7684\u5b9e\u9a8c\u8bfe\uff0c\u4f46\u4e0d\u662f\u5f88\u61c2\u554a\uff0c\u8bf7\u5927\u5bb6\u5e2e\u5e2e\u5fd9\u5427\uff01\uff01\u975e\u5e38\u611f\u8c22\uff01\uff01\uff01<br \/>\n\u9898\u76ee\u662f\uff1a\u7ed9\u51fapascal\u7a0b\u5e8f\u8bed\u8a00\u6587\u6cd5\u5982\u4e0b\uff1as\u2014\u2014if\u00a0\u00a0B then\u00a0\u00a0S else S\u00a0\u00a0|while B do S |begin L\u00a0 \u00a0end| A<br \/>\nL\u2014\u2014S;L|S\u00a0 \u00a0\u00a0\u00a0A\u2014\u2014i:=E\u00a0 \u00a0\u00a0 \u00a0B\u2014\u2014B ^B|B V B| &gt; B|i rop i|I\u00a0 \u00a0E\u2014\u2014E+E|E*E| (E)|I<br \/>\n\u5176\u4e2drop\u4ee3\u8868\u5173\u7cfb\u8fd0\u7b97\u7b26&gt;,&gt;=,&lt;,&lt;=,==,&lt;&gt;\u00a0 \u00a0 ^\u8868\u793a\u903b\u8f91\u4e0e\u00a0 \u00a0V\u8868\u793a\u903b\u8f91\u6216\u00a0 \u00a0&gt;\u8868\u793a\u903b\u8f91\u975e\u00a0\u00a0\u2014\u2014\u8868\u793a\u63a8\u51fa\u7b26\u53f7<br \/>\n\u8981\u6c42\uff1a\u5199\u51fa\u5355\u8bcd\u79cd\u522b\u7f16\u7801\uff0c\u5e76\u7ed9\u51fa\u539f\u7a0b\u5e8f\u3002<\/p>\n<p>\u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u8981\u6c42\u5199\u51fa\u7f16\u7801,\u597d\u8c61\u53ea\u662f\u8bcd\u6cd5\u5206\u6790\u554a\u3002\u5176\u5b9e\u8bcd\u6cd5\u5206\u6790\u5c31\u662f\u4e00\u4e2a\u6620\u5c04\u7684\u601d\u60f3,\u6ca1\u4ec0\u4e48\u96be\u7684,\u8bed\u6cd5\u5206\u6790\u8981\u4fdd\u8bc1\u8bed\u6cd5\u7684\u6b63\u786e\u6027,\u7136\u540e\u91c7\u53d6\u5408\u9002\u7684\u8bed\u6cd5\u5206\u6790\u65b9\u6cd5(\u7b97\u7b26\u4f18\u5148\u3001slr\u3001lr\u7b49)\u6765\u505a\uff0c\u8bed\u4e49\u5206\u6790\u5c31\u662f\u56de\u8fc7\u5934\u6765\u5728\u8bed\u6cd5\u5206\u6790\u7684\u540c\u65f6\u52a0\u4e00\u4e9b\u4e1c\u897f\u3002\u81f3\u4e8e\u539f\u7a0b\u5e8f\u561b\uff0c\u6700\u7ec8\u8fd8\u662f\u8981\u81ea\u5df1\u53bb\u5199\u7684\u54e6\u3002\u4e0d\u7ba1\u8bed\u6cd5\u7b80\u5355\u6216\u96be\uff0c\u539f\u7406\u90fd\u662f\u4e00\u6837\u7684\uff0c\u53ea\u8981\u4f60\u601d\u60f3\u660e\u767d\u4e86\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u4f53\u529b\u52b3\u52a8\u4e86\uff0c\u53ea\u662f\u65f6\u95f4\u591a\u4e00\u70b9\u7f62\u4e86\uff0c\u4e0d\u53ef\u80fd\u505a\u4e0d\u51fa\u6765\u7684\u3002<\/p>\n<p>Mark(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-10-20 18:45:07<\/p>\n<p>\u4e0b\u9762\u7684\u4ee3\u7801\u7528c#\u5199\u7684\uff0c\u5236\u4f5c\u5f88\u5c0f\u7684\u6539\u52a8\u5c31\u53ef\u7528\u4e8eC\u5b9e\u73b0\u4e86\uff0c\u53ea\u662f\u4e3a\u4e86\u4ea4\u6d41\u4e00\u4e0b\uff0c\u8bed\u6cd5\u5206\u6790\u5668\u7b49\u6211\u6628\u665a\u540e\u4e5f\u4f1a\u8d34\u4e0a\u6765\u7684\u3002<br \/>\n\u53e6\u5916\uff0c\u672c\u6765\u8fd9\u4e2a\u7a0b\u5e8f\u662f\u6709\u56fe\u5f62\u754c\u9762\u7684\uff0c\u7528VS .net\u5f00\u53d1\u7684\uff0c\u4f46\u662f\u8fd9\u91cc\u56de\u590d\u4e0d\u4e86\u9644\u4ef6\uff0c\u9700\u8981\u7684\u8bddemail\u7ed9\u6211\u3002\u5730\u5740\u89c1\u4ee3\u7801\u3002<\/p>\n<blockquote><p>using System;<br \/>\nusing System.Drawing;<br \/>\nusing System.Collections;<br \/>\nusing System.ComponentModel;<br \/>\nusing System.Windows.Forms;<br \/>\nusing System.Data;<br \/>\nnamespace CCompiler<br \/>\n{<br \/>\n\/\/\/ &lt;summary&gt;<br \/>\n\/\/\/ \u8bcd\u6cd5\u5206\u6790\u7684\u6838\u5fc3,\u8bfb\u5165\u8f93\u5165\u6587\u4ef6,\u8bcd\u6cd5\u5206\u6790\u540e\u5c06\u7ed3\u679c(\u7b26\u53f7\u8868)<br \/>\n\/\/\/ \u53ca\u9519\u8bef\u8f93\u51fa\u5230\u6587\u4ef6\u3002<br \/>\n\/\/\/Author :MarK@hit<br \/>\n\/\/\/Date:2005-10<br \/>\n\/\/\/mailto:symphnoy@163.com<br \/>\n\/\/\/ &lt;\/summary&gt;<br \/>\npublic class Lexer :System.Object<br \/>\n{<br \/>\n#region \u7c7b\u5c5e\u6027\/\u6210\u5458\u5217\u8868<br \/>\nprivate int LineNO;\/\/\u4fdd\u7559\u5f53\u524d\u7684\u884c\u53f7<br \/>\nprivate int lastbyte;\/\/\u5224\u65ad\u6700\u540e\u4e00\u4e2a\u5b57\u7b26\uff0c\u4e3b\u8981\u7528\u4e8e\u5904\u7406\u6587\u4ef6\u7ed3\u5c3e\uff1a<br \/>\nprivate\u00a0\u00a0System.Collections.ArrayList KeyWords;\/\/\u5173\u952e\u5b57\u5217\u8868\uff0c\u5b58\u5728\u6570\u7ec4\u91cc\u4ee5\u4fbf\u67e5\u8868\u3002<br \/>\nprivate\u00a0\u00a0System.Collections.ArrayList ErrorList;\/\/\u9519\u8bef\u5217\u8868\u3002<br \/>\nprivate\u00a0\u00a0System.IO.TextReader\u00a0\u00a0inputReader;<br \/>\npublic\u00a0 \u00a0System.IO.StreamWriter\u00a0\u00a0outputWriter;<br \/>\nprivate static char\u00a0\u00a0EOF=System.Convert.ToChar(255);\/\/\u5b9a\u4e49\u6587\u4ef6\u7ed3\u5c3e\uff0c\u4ee5\u4fbf\u80fd\u88abChar\u578b\u8868\u793a\u3002<br \/>\n#endregion<br \/>\n\/\/\/ &lt;summary&gt;<br \/>\n\/\/\/ Lexer\u7684\u6784\u9020\u51fd\u6570<br \/>\n\/\/\/ &lt;\/summary&gt;<br \/>\n\/\/\/ &lt;param name=\"input\"&gt;&lt;\/param&gt;<br \/>\n\/\/\/ &lt;param name=\"output\"&gt;&lt;\/param&gt;<br \/>\npublic Lexer(string input,string output)<br \/>\n{<br \/>\nKeyWords = new ArrayList(30);<br \/>\nErrorList = new ArrayList(40);<br \/>\nLineNO=1;<br \/>\nthis.FillUpKeyWords();<br \/>\ntry<br \/>\n{<br \/>\n\/\/\u521d\u59cb\u5316\u8f93\u5165\u8f93\u51fa\u6d41<br \/>\ninputReader= new System.IO.StreamReader(input,System.Text.Encoding.ASCII);<br \/>\noutputWriter=new System.IO.StreamWriter(output,false,System.Text.Encoding.ASCII);<br \/>\nthis.outputWriter.Write(\"\\n\\t\\t\\t%%%Lexical Analysis Beginning:%%%\\t\\n\");<br \/>\nthis.outputWriter.Write(\"=========================================================================\\n\");<br \/>\n}<br \/>\ncatch(System.Exception excp)<br \/>\n{<br \/>\nthis.ErrorReport(excp.Message+\"\\n\\n\"+excp.HelpLink,\"IO Exception @ Lexical Analysis\");<br \/>\n}<br \/>\n}<br \/>\n#region \u8c03\u8bd5\u7684\u4e3b\u51fd\u6570,\u53ef\u4ee5\u4f7fLexerCore\u8fd0\u884c\u5728cmd\u4e0b\u8131\u79bb\u754c\u9762<br \/>\n\/\/\u00a0\u00a0[STAThread]<br \/>\n\/\/\u00a0\u00a0static void Main(string[] args)<br \/>\n\/\/\u00a0\u00a0{<br \/>\n\/\/\u00a0 \u00a0Lexer lex = new Lexer(\"input.txt\",\"output.txt\");<br \/>\n\/\/\u00a0 \u00a0int i=lex.DoLexicalAnalysis();<br \/>\n\/\/\u00a0 \u00a0System.Console.WriteLine(\"Finished!\");<br \/>\n\/\/\u00a0 \u00a0if(i==0)<br \/>\n\/\/\u00a0 \u00a0 Application.Exit();<br \/>\n\/\/\u00a0 \u00a0\/\/<br \/>\n\/\/\u00a0 \u00a0\/\/ TODO: \u5728\u6b64\u5904\u6dfb\u52a0\u4ee3\u7801\u4ee5\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f<br \/>\n\/\/\u00a0 \u00a0\/\/<br \/>\n\/\/\u00a0\u00a0}<br \/>\n#endregion<br \/>\n\/\/\/ &lt;summary&gt;<br \/>\n\/\/\/ \u521d\u59cb\u5316\u5173\u952e\u5b57\/\u4fdd\u7559\u5b57\u5217\u8868<br \/>\n\/\/\/ &lt;\/summary&gt;<br \/>\nprivate void FillUpKeyWords()<br \/>\n{<br \/>\nthis.KeyWords.Add(\"auto\");<br \/>\nthis.KeyWords.Add(\"break\");<br \/>\nthis.KeyWords.Add(\"case\");<br \/>\nthis.KeyWords.Add(\"char\");<br \/>\nthis.KeyWords.Add(\"const\");<br \/>\nthis.KeyWords.Add(\"continue\");<br \/>\nthis.KeyWords.Add(\"default\");<br \/>\nthis.KeyWords.Add(\"do\");<br \/>\nthis.KeyWords.Add(\"double\");<br \/>\nthis.KeyWords.Add(\"else\");<br \/>\nthis.KeyWords.Add(\"enum\");<br \/>\nthis.KeyWords.Add(\"extern\");<br \/>\nthis.KeyWords.Add(\"float\");<br \/>\nthis.KeyWords.Add(\"for\");<br \/>\nthis.KeyWords.Add(\"goto\");<br \/>\nthis.KeyWords.Add(\"if\");<br \/>\nthis.KeyWords.Add(\"int\");<br \/>\nthis.KeyWords.Add(\"long\");<br \/>\nthis.KeyWords.Add(\"register\");<br \/>\nthis.KeyWords.Add(\"return\");<br \/>\nthis.KeyWords.Add(\"short\");<br \/>\nthis.KeyWords.Add(\"signed\");<br \/>\nthis.KeyWords.Add(\"sizeof\");<br \/>\nthis.KeyWords.Add(\"static\");<br \/>\nthis.KeyWords.Add(\"struct\");<br \/>\nthis.KeyWords.Add(\"switch\");<br \/>\nthis.KeyWords.Add(\"typedef\");<br \/>\nthis.KeyWords.Add(\"union\");<br \/>\nthis.KeyWords.Add(\"usigned\");<br \/>\nthis.KeyWords.Add(\"void\");<br \/>\nthis.KeyWords.Add(\"volatile\");<br \/>\nthis.KeyWords.Add(\"while\");<br \/>\n}<br \/>\nprivate void ErrorReport(System.String msg,System.String title)<br \/>\n{<br \/>\nMessageBox.Show(msg,title,System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);<br \/>\n}<br \/>\n\/\/\/ &lt;summary&gt;<br \/>\n\/\/\/ \u5206\u6790\u5b8c\u6210\u540e\u5c06\u9519\u8bef\u6d88\u606f\u961f\u5217\u91cc\u7684\u4fe1\u606f\u4f9d\u6b21\u8f93\u51fa<br \/>\n\/\/\/ &lt;\/summary&gt;<br \/>\nprivate void ErrorReport()<br \/>\n{<br \/>\nthis.ErrorList.TrimToSize();<br \/>\nint errorno=this.ErrorList.Count;<br \/>\nfor(int i=0;i&lt;errorno;i++)<br \/>\n{<br \/>\nthis.outputWriter.WriteLine(\"Error No:\"+i+\"\\t\"+this.ErrorList);<br \/>\n}<br \/>\n}<br \/>\nprivate void SaveError(System.String msg,int lineno)<br \/>\n{<br \/>\nthis.ErrorList.Add(msg+\"@\"+lineno);<br \/>\n}<br \/>\n\/\/\/ &lt;summary&gt;<br \/>\n\/\/\/ getchar\uff1a\u4e00\u4e2a\u5b8c\u5168\u6ca1\u6709\u5fc5\u8981\u7684\u51fd\u6570<br \/>\n\/\/\/ \u8fd9\u4e48\u505a\u53ea\u662f\u4e3a\u4e86\u8c61\u5e95\u5c42C\u4e00\u6837\u7684\u7f16\u7a0b\uff0c\u5426\u5219\u76f4\u63a5\u7528Regexp\u7c7b\u6784\u9020\u597d\u4e86<br \/>\n\/\/\/ &lt;\/summary&gt;<br \/>\n\/\/\/ &lt;returns&gt;&lt;\/returns&gt;<br \/>\nprivate char getchar()<br \/>\n{<br \/>\ntry<br \/>\n{<br \/>\nlastbyte=inputReader.Read();<br \/>\nreturn System.Convert.ToChar(lastbyte);<br \/>\n}<br \/>\ncatch(System.OverflowException expc)<br \/>\n{<br \/>\nif(lastbyte==-1)<br \/>\nreturn EOF;<br \/>\nelse<br \/>\n{<br \/>\nthis.SaveError(expc.ToString()+\"\\n\\tThe Value for the InputSteam Is \"+lastbyte,0);<br \/>\nreturn System.Convert.ToChar(lastbyte);<br \/>\n}<\/p>\n<p>}<br \/>\n}<br \/>\nprivate void FormatPrint(string type,int count,char[] token,int i)<br \/>\n{<\/p>\n<p>try<br \/>\n{<br \/>\nthis.outputWriter.WriteLine(type+\"\\t\\t\\t\"+count+\"\\t\\t\"+new System.String(token,0,i)+\"\\t\\t\"+i+\"\\t@Ln:\"+this.LineNO);<br \/>\n}<br \/>\ncatch(System.Exception expc)<br \/>\n{<\/p>\n<p>String errormsg=expc.Message.ToString()+\"\\nStackTrace:\\t\\n\"+expc.StackTrace.ToString();<br \/>\nthis.outputWriter.WriteLine(errormsg);<br \/>\nMessageBox.Show(errormsg,<br \/>\n\"Exception During FormatPrint,at:\"+expc.Source,System.Windows.Forms.MessageBoxButtons.OK,System.Windows.Forms.MessageBoxIcon.Error);<br \/>\n}<br \/>\nfinally<br \/>\n{<br \/>\n\/\/this.outputWriter.Close();<br \/>\n}<br \/>\n}<br \/>\n\/\/\/<br \/>\n\/\/\/&lt;summary&gt;<br \/>\n\/\/\/\u8bcd\u6cd5\u5206\u6790\u6838\u5fc3\u90e8\u5206<br \/>\n\/\/\/&lt;\/summary&gt;<br \/>\n\/\/\/<br \/>\npublic\u00a0\u00a0int DoLexicalAnalysis()<br \/>\n{<br \/>\nchar ch;\/\/,*token=\"\";<br \/>\nchar[] token= new char[10000];<br \/>\nint i=0,isReserver=0;<br \/>\nint count=0;<\/p>\n<p>this.outputWriter.WriteLine(\"Type \\t\\t Count \\t\\t Symbol \\t\\t Lenth\\n\");<br \/>\ntry<br \/>\n{<br \/>\n#region \u8bcd\u6cd5\u5206\u6790\u5faa\u73af\u8fc7\u7a0b,\u4ea6\u662f\u72b6\u6001\u673a\u63a7\u5236\u6d41\u7a0b<br \/>\nch=getchar();<br \/>\nwhile(ch!=EOF)<br \/>\n{<br \/>\ni=0;<br \/>\n\/*\u53bb\u6389\u7a7a\u683c,\u6362\u884c\u7b26*\/<br \/>\nwhile((ch==' '||ch=='\\n'||ch=='\\t')&amp;&amp;ch!=EOF)<br \/>\n{<br \/>\nif(ch=='\\n')<br \/>\nthis.LineNO++;<br \/>\nch=getchar();<br \/>\n}<br \/>\n\/*\u5b57\u6bcd\u5f00\u5934*\/<br \/>\nif(Char.IsLetter(ch))<br \/>\n{<br \/>\nwhile(Char.IsLetterOrDigit(ch))<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ntoken='';<br \/>\nisReserver=this.IsReserver(token,i);<br \/>\nif(isReserver==1)<br \/>\n{count++;this.FormatPrint(\"Identifer\",count,token,i);}<br \/>\nelse if(isReserver==0)<br \/>\n{count++;this.FormatPrint(\"KeyWord\",count,token,i);}<br \/>\nelse if(isReserver==2)<br \/>\n{count++;this.FormatPrint(\"Operator\",count,token,i);}<br \/>\ncontinue;<br \/>\n}<br \/>\n\/*\u8bc6\u522b\u6570\u5b57*\/<br \/>\nelse if(Char.IsDigit(ch))<br \/>\n{<br \/>\nwhile(Char.IsDigit(ch))<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\n\/*\u51fa\u73b0\u975e\u6570\u5b57\u4e14\u4e3a\u70b9\u65f6*\/<br \/>\nif (ch=='.')<br \/>\n{<br \/>\ntoken[i++]=ch; \/*\u5c06\u70b9\u52a0\u5165*\/<br \/>\nch=getchar();\/*\u8bfb\u5165\u4e0b\u4e00\u4e2a\u5b57\u7b26*\/<br \/>\nif (Char.IsDigit(ch))<br \/>\n{<br \/>\nwhile(Char.IsDigit(ch)) \/*\u662f\u6570\u5b57\u65f6\uff0c\u6536\u5165\uff0c\u5e76\u5c06\u52a0\u4e00*\/<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\n\/*\u5982\u679c\u662f\u6570\u5b57\u52a0\u70b9\u518d\u52a0\u6570\u5b57\u518d\u51fa\u73b0\u5b57\u6bcd\u65f6\uff0c\u5c31\u662f\u9519\u8bef*\/<br \/>\nif(Char.IsLetter(ch))<br \/>\n{<br \/>\nwhile(Char.IsDigit(ch)||Char.IsLetter(ch)||ch=='.')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"IdentiferError\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\n\/*\u5f53\u51fa\u73b0\u7ed3\u675f\u7b26\u65f6\uff0c\u5c31\u6536\u5165\u4e3a\u5b9e\u6570\u5185*\/<br \/>\nelse<br \/>\n{<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"RealNumber\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>\/*\u5982\u679c\u662f\u5b57\u7b26,\u5219\u5224\u65ad\u4e3a\u6807\u8bc6\u9519\u8bef*\/<br \/>\nelse if(Char.IsDigit(ch))<br \/>\n{<br \/>\nwhile(Char.IsDigit(ch)||Char.IsDigit(ch)||ch=='.')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"IdentiferError\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\n\/*\u5982\u679c\u662f\u5355\u8bcd\u6bb5\u7ed3\u675f\u7b26\u65f6\uff0c\u5c31\u5224\u65ad\u4e3a\u5e38\u6570*\/<br \/>\nelse<br \/>\n{<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Interger\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\n}<br \/>\nelse if(ch=='(')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Parenleft\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch==')')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Parenright\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='[')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Bracketlef\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch==']')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Bracketright\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='-')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch=='-')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"AutoMinusOperator\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if (ch=='&gt;')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"PointerOperator\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"NegativeOperator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='.')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"DotOperator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='&amp;')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"BitAnd\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='!')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch=='=')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"UnequalComparator\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"NotOperator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='~')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Tilde\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='*')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"MutiplyOperator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='%')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"ModOperator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='\/')<br \/>\n{<\/p>\n<p>\/\/String<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch!='\/'&amp;&amp;ch!='*')<br \/>\n{<br \/>\ntoken='';<br \/>\ncount++;<br \/>\nthis.FormatPrint(\"DivOperator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='\/')<br \/>\n{<br \/>\n\/\/\u5ffd\u7565\u884c\u6ce8\u89c6<br \/>\nthis.inputReader.ReadLine();<br \/>\nthis.LineNO++;<br \/>\ncontinue;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\n\/\/\u5ffd\u7565\/**\/\u6ce8\u91ca<br \/>\nwhile(ch!='*'&amp;&amp;ch!=EOF)<br \/>\n{<br \/>\nif(ch=='\\n')<br \/>\nthis.LineNO++;<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\nwhile(ch!='\/'&amp;&amp;ch!=EOF)<br \/>\n{<br \/>\nif(ch=='\\n')<br \/>\nthis.LineNO++;<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ncontinue;<br \/>\n}<br \/>\n}<br \/>\nelse if(ch=='&lt;')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch=='=')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"LessEqual\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\nif(ch=='&lt;')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"LeftShift\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Lessthan\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='&gt;')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch=='=')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Greaterthan\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\nif(ch=='&gt;')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"RightShift\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Greaterthan\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='=')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch=='=')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Equals\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Evaluator\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch==',')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Comma\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch==';')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Semicolon\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='{')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Braceleft\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='}')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Braceright\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='+')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nif(ch=='+')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"PlusPlus\",count,token,i);<br \/>\nch=getchar();<br \/>\ncontinue;<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"Plus\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse if(ch=='\\'')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nwhile(ch!='\\''&amp;&amp;ch!=EOF)<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\nif(ch=='\\'')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;<br \/>\nthis.FormatPrint(\"Char\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nwhile(ch!=EOF)<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.SaveError(\"Char Error:\",this.LineNO);<br \/>\n}<br \/>\n}<br \/>\nelse if(ch=='\"')<br \/>\n{ \/\/String<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\nwhile(ch!='\"'&amp;&amp;ch!=EOF)<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\nif(ch=='\"')<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\ntoken='';<br \/>\ncount++;this.FormatPrint(\"String\",count,token,i);<br \/>\ncontinue;<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nwhile(ch!=EOF)<br \/>\n{<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;this.SaveError(\"String Error:\",this.LineNO);<br \/>\n}<br \/>\n}<br \/>\nelse<br \/>\n{<br \/>\nwhile(!(ch==' '||ch=='\\t'||ch=='\\n'||ch==EOF))<br \/>\n{<br \/>\ncount++;<br \/>\nif(!(System.Convert.ToInt16(ch)==10||System.Convert.ToInt16(ch)==13))<br \/>\nthis.SaveError(\"Unknown Symbol:\",this.LineNO);<br \/>\ntoken[i++]=ch;<br \/>\nch=getchar();<br \/>\n}<br \/>\ntoken='';<br \/>\ncount++;<br \/>\nif(!(System.Convert.ToInt16(ch)==10||System.Convert.ToInt16(ch)==13))<br \/>\nthis.SaveError(\"Unknown Error:\",this.LineNO);<br \/>\ncontinue;<br \/>\n}<br \/>\n}<br \/>\n#endregion<br \/>\n}<br \/>\ncatch(System.Exception expc)<br \/>\n{<br \/>\nString errormsg=expc.ToString();<br \/>\nthis.SaveError(errormsg,-1);<br \/>\nErrorReport();\/\/\u62a5\u544a\u8bcd\u6cd5\u5206\u6790\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684\u4efb\u4f55\u53ef\u80fd\u9519\u8bef<br \/>\nthis.inputReader.Close();<br \/>\nthis.outputWriter.Close();<br \/>\nreturn 1;<br \/>\n}<br \/>\nErrorReport();<br \/>\nthis.inputReader.Close();<br \/>\nthis.outputWriter.Close();<br \/>\nreturn 0;<br \/>\n}<br \/>\n\/\/\/ &lt;summary&gt;<br \/>\n\/\/\/ \u5224\u65ad\u662f\u4e0d\u662fC\u7684\u4fdd\u7559\u5b57<br \/>\n\/\/\/ &lt;\/summary&gt;<br \/>\n\/\/\/ &lt;param name=\"token\"&gt;&lt;\/param&gt;<br \/>\n\/\/\/ &lt;param name=\"lenth\"&gt;&lt;\/param&gt;<br \/>\n\/\/\/ &lt;returns&gt;<br \/>\n\/\/\/\u00a0\u00a01:\u5219\u662f\u6807\u8bc6\u7b26<br \/>\n\/\/\/\u00a0\u00a00:\u5219\u662f\u5173\u952e\u5b57<br \/>\n\/\/\/\u00a0\u00a02:\u5219\u662f\u8fd0\u7b97\u7b26--sizeof<br \/>\n\/\/\/\u00a0\u00a0&lt;\/returns&gt;<br \/>\n\/**************************************************************<br \/>\n*\u00a0\u00a0\u5224\u65ad\u662f\u4e0d\u662f\u5173\u952e\u5b57:1,\u5219\u662f\u6807\u8bc6\u7b26 0,\u5219\u662f\u5173\u952e\u5b57 2,\u5219\u662f\u8fd0\u7b97\u7b26<br \/>\n**************************************************************\/<br \/>\nprivate int IsReserver(char[] token,int lenth)<br \/>\n{<br \/>\nSystem.String str = new string(token,0,lenth);<br \/>\nif(System.String.Compare(str,\"sizeof\")==0)\u00a0\u00a0return 2;<br \/>\nif(this.KeyWords.Contains(str)==true) return 0;<br \/>\nreturn 1;<br \/>\n}<\/p>\n<p>}<br \/>\n}<\/p><\/blockquote>\n<p>\u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u6069,\u6b22\u8fce\u6b22\u8fce,\u5982\u679c\u613f\u610f\u7684\u8bdd,\u628a\u7a0b\u5e8f\u53d1\u7ed9\u6211,\u6211\u7ed9\u4f60\u4f20\u4e0a\u53bb,\u4f9b\u5927\u5bb6\u5206\u4eab.\u6211\u7684\u90ae\u7bb1\u662fivan@panshi.org<\/p>\n<p>\u828b\u5934(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-10-16 21:31:34<\/p>\n<p>\u611f\u8c22\u554a...\u6211\u4e5f\u662f\u54c8\u5c14\u6ee8\u7684.\u4e0d\u8fc7\u662f\u9ed1\u5927\u4e86......<br \/>\n\u73b0\u5728\u6b63\u5728\u5f04\u7f16\u8bd1\u5927\u4f5c\u4e1a,\u4e00\u5934\u96fe\u6c34,\u5b9e\u5728\u4e0d\u4f1a\u554a......\u8c22\u8c22\u4f60\u7684\u7a0b\u5e8f....\u7b80\u76f4\u662f\u5927\u597d\u4eba\u554a........\u6211\u4e0b\u4e86\u56de\u53bb\u597d\u597d\u5b66\u5b66....<\/p>\n<p>hukuna(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-10-14 21:01:37<\/p>\n<p>\u7b2c\u4e00\u6b21\u5230\u4f60\u8fd9\u4e2ablog\u6765\uff0c\u662f\u641c\u5230\u7684<br \/>\n\u6211\u8981\u505a\u7f16\u8bd1\u8bfe\u8bbe\uff0c\u4f46\u662f\u6211\u5b66\u5f97\u5f88\u5dee\u52b2\uff0c\u4ee5\u81f3\u4e8e\u9898\u76ee\u90fd\u770b\u4e0d\u61c2\uff08\u5bd2\uff09\uff0c\u4f60\u80fd\u4e0d\u80fd\u5e2e\u6211\u5206\u6790\u4e00\u4e0b\uff0c\u6211\u81ea\u5df1\u5199\u5c31\u597d\u4e86\u3002<br \/>\n\u9898\u76ee\u662f\u8fd9\u6837\u7684\uff1a1.\u5b9e\u73b0\u9002\u5408\u4e8ec-\u7684\u4e00\u4e2a\u7b26\u53f7\u8868\uff0c\u8981\u6c42\u8868\u7ed3\u6784\u63a5\u5408\u4f5c\u7528\u57df\u4fe1\u606f\uff0c\u7528\u4e8e\u5f53\u5404\u4e2a\u72ec\u7acb\u7684\u8868\u8fde\u63a5\u5230\u4e00\u6c14\uff0c\u6216\u8005\u6709\u4e00\u4e2a\u5220\u9664\u673a\u5236\uff0c\u7528\u4e8e\u57fa\u4e8e\u6808\u65b9\u5f0f\u7684\u64cd\u4f5c\u3002<br \/>\n2.\u5b9e\u73b0\u4e00\u4e2ac-\u626b\u63cf\u5668\uff0c\u6216\u8005\u8c61DFA\u7528\u624b\u5de5\u8fdb\u884c\uff0c\u6216\u8005\u4f7f\u7528LEX<br \/>\n3.\u8bbe\u8ba1\u4e00\u4e2aC-\u8bed\u6cd5\u6811\u7ed3\u6784\uff0c\u9002\u5408\u4e8e\u7528\u5206\u6790\u5668\u4ea7\u751f<br \/>\n4.\u5b9e\u73b0\u4e00\u4e2aC-\u5206\u6790\u5668\uff08\u8fd9\u9700\u8981\u4e00\u4e2aC-\u626b\u63cf\u5668\uff09\uff0c\u6216\u8005\u4f7f\u7528\u9012\u5f52\u4e0b\u964d\u7528\u6536\u5de5\u8fdb\u884c\uff0c\u6216\u8005\u4f7f\u7528YACC\uff0c\u5206\u6790\u5668\u8981\u4ea7\u751f\u5408\u9002\u7684\u8bed\u6cd5\u6811\u3002<br \/>\n\u7b2c\u4e00\u4e2a\u8981\u6c42\u5076\u4e0d\u592a\u61c2\uff0c\u7b26\u53f7\u8868\u63a5\u5408\u4f5c\u7528\u57df\u4fe1\u606f\u7528\u4e8e\u5404\u4e2a\u72ec\u7acb\u7684\u8868\u94fe\u63a5\u5230\u4e00\u8d77\uff0c\u4ec0\u4e48\u610f\u601d\u5462\uff1f<br \/>\n\u7136\u540e\u662f\u7b2c\u4e09\u4e2a\uff0c\u8bbe\u8ba1\u8bed\u6cd5\u6811\u7ed3\u6784\u662f\u4ec0\u4e48\u610f\u601d\uff1f<br \/>\n\u4f60\u4f1a\u4e0d\u4f1a\u5728\u554a\uff0c\u6709\u7a7a\u56de\u7b54\u4e00\u4e0b\uff0c\u8c22\u8c22\u4e86\u3002<br \/>\n\u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u8bf4\u5b9e\u5728\u7684,\u73b0\u5728\u6b63\u5728\u51c6\u5907\u8003\u7814,\u628a\u4e0d\u76f8\u5173\u7684\u4e1c\u897f\u90fd\u5fd8\u7684\u5dee\u4e0d\u591a\u4e86,\u7f16\u8bd1\u539f\u7406\u7684\u5370\u8c61\u4e5f\u4e0d\u662f\u5f88\u6e05\u6670\u5566<br \/>\n\u7136\u540e\u8bf4\u4f60\u7684\u95ee\u9898:\u5982\u679c\u5b8c\u5168\u6309\u7167\u8fd9\u4e2a\u8981\u6c42\u505a,\u592a\u96be\u4e86,\u6216\u8005\u662f\u4e0d\u592a\u53ef\u80fd\u505a\u51fa\u6765\u7684,\u5982\u679c\u5728\u672c\u79d1\u9636\u6bb5\u80fd\u72ec\u7acb\u7684\u505a\u51fa\u4e00\u4e2aC\u7f16\u8bd1\u5668,\u90a3\u771f\u7684\u662f\u5f88\u725b\u554a,\u6240\u4ee5\u5efa\u8bae\u4f60\u628a\u8981\u6c42\u4e2d\u6240\u6709\u7684C\u6539\u4e3a\u7c7bC.\u81f3\u4e8e\u4f60\u8bf4\u7684\u7b2c\u4e00\u6761,\u6211\u4e5f\u5f04\u4e0d\u660e\u767d,\u56e0\u4e3a\u6211\u65ad\u53e5\u90fd\u4e0d\u77e5\u9053\u600e\u4e48\u65ad.\u7b2c\u4e09\u6761\u5176\u5b9e\u662f\u548c\u5199\u7a0b\u5e8f\u65e0\u5173\u7684,\u53ea\u662f\u7f16\u8bd1\u539f\u7406\u7684\u601d\u60f3,\u4f60\u53ef\u4ee5\u628a\u5b83\u753b\u5728\u8349\u56fe\u4e0a;\u8bed\u6cd5\u5206\u6790\u7684\u8fc7\u7a0b,\u5c31\u662f\u4e00\u4e2a\u5efa\u7acb\u4e00\u4e2a\u8bed\u6cd5\u6811\u7684\u8fc7\u7a0b,\u5982\u679c\u626b\u63cf\u7684\u6700\u540e\u80fd\u6210\u4e3a\u4e00\u68f5\u6811,\u5219\u8bc1\u660e\u6e90\u7a0b\u5e8f\u8bed\u6cd5\u662f\u6ca1\u6709\u95ee\u9898\u7684,\u5426\u5219\u8bed\u6cd5\u5206\u6790\u9636\u6bb5\u5c31\u8981\u62a5\u9519.\u6240\u8c13\u7684\u81ea\u4e0a\u800c\u4e0b,\u81ea\u4e0b\u800c\u4e0a\u5c31\u662f\u5bf9\u4e8e\u6811\u6765\u8bf4\u7684,\u4f46\u4ece\u7a0b\u5e8f\u4e0a\u770b,\u6ca1\u6709\u4efb\u4f55\u6570\u636e\u7ed3\u6784\u91cc\"\u6811\"\u7684\u610f\u601d.\u800c\u8bed\u4e49\u5206\u6790\u9636\u6bb5\u4f60\u4f1a\u53d1\u73b0\u662f\u548c\u8bed\u6cd5\u5206\u6790\u540c\u65f6\u8fdb\u884c\u7684.\u6240\u4ee5\u7b2c\u4e09\u6761\u7684\u8981\u6c42\u4e0d\u662f\u53eb\u4f60\u7528\u6811\u7684\u7ed3\u6784\u6765\u505a,\u800c\u662f\u63d0\u9192\u4f60\u8fd9\u79cd\u601d\u60f3,\u5b83\u4e0d\u8bf4\u4f60\u4e5f\u8981\u7528\u7684.\u4e0d\u77e5\u9053\u89e3\u91ca\u7684\u662f\u5426\u6e05\u695a.\u770b\u770b\u4e66\u5427,\u80fd\u7406\u89e3\u7684\u66f4\u900f\u5f7b\u7684.<\/p>\n<p>wxrsun(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-8-22 15:40:19<\/p>\n<p>\u4f60\u4e5f\u662f\u54c8\u5de5\u5927\u7684\u554a\uff0c\u6211\u4e5f\u662f\uff0c\u53ef\u60dc\u662f\u5728\u5a01\u6d77 \u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u5475\u5475\uff0c\u6821\u53cb\u597d\u554a<\/p>\n<p>\u98de\u98de(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-6-22 12:50:36<\/p>\n<p>\u80fd\u4e0d\u80fd\u518d\u5e2e\u6211\u505a\u4e00\u4e2a\u554a\uff1f\u8981\u6c42\u4e0d\u592a\u4e00\u6837\u7684\u54e6 \u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u73b0\u5728\u6b63\u5904\u4e8e\u8003\u8bd5\u65f6\u95f4,\u521a\u521a\u628a\u7f16\u8bd1\u539f\u7406\u8bed\u4e49\u7684\u90e8\u5206\u5b8c\u6210,\u4e5f\u5c31\u662f\u8fd9\u4e2a\u5b66\u671f\u7684\u5927\u4f5c\u4e1a(\u8bcd\u6cd5,\u8bed\u6cd5,\u8bed\u4e49)\u5168\u90e8\u5b8c\u5de5\u4e86.\u4f46\u662f\u62a5\u544a\u8fd8\u5f97\u518d\u627e\u65f6\u95f4\u53bb\u505a,\u6211\u73b0\u5728\u53ea\u80fd\u5e16\u51fa\u6765\u8ba9\u5927\u5bb6\u53c2\u8003,\u5982\u679c\u80fd\u6709\u65f6\u95f4\u5e2e\u5927\u5bb6\u505a\u66f4\u591a\u7684\u4e8b,\u4e5f\u53ea\u80fd\u662f\u5728\u8003\u8bd5\u5b8c\u4e4b\u540e\u4e86.<br \/>\n\u6574\u4e2a\u7b80\u5355\u7f16\u8bd1\u5668\u7684\u524d\u7aef,\u5230\u4ea7\u751f\u4e2d\u95f4\u4ee3\u7801,\u6211\u4f1a\u5728\u62a5\u544a\u5b8c\u5168\u5199\u597d\u4e4b\u540e\u4f20\u4e0a\u6765,\u4f30\u8ba1\u662f\u4e0b\u5468,\u5475\u5475<\/p>\n<p>\u8fd8\u6709\u5462(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-6-21 8:23:13<br \/>\n\u600e\u4e48\u5c31\u8fd9\u4e48\u4e00\u70b9\u5440~<br \/>\n\u4ee5\u4e0b\u4e3ablog\u4e3b\u4eba\u7684\u56de\u590d\uff1a<br \/>\n\u8fd9\u91cc\u663e\u793a\u7684\u53ea\u662f\u7a0b\u5e8f\u7684\u5f88\u5c11\u4e00\u6bb5\u4ee3\u7801,\u53ef\u4ee5\u70b9\u51fb\u4e0a\u9762\u7684\"\u8bf7\u70b9\u51fb\u8fd9\u91cc\u4e0b\u8f7d\u201c\u8bcd\u6cd5\u5206\u6790\u5668\u201d\u6e90\u7a0b\u5e8f\"\u6765\u4e0b\u8f7d<\/p>\n<p>\u4f69\u670d(\u6e38\u5ba2)\u53d1\u8868\u8bc4\u8bba\u4e8e2005-5-31 19:08:18<\/p>\n<p>\u5f3a\u4eba\u554a \uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u70b9\u51fb\u8fd9\u91cc\u4e0b\u8f7d\u201c\u8bcd\u6cd5\u5206\u6790\u5668\u201d\u6e90\u7a0b\u5e8f #include&lt;cstdio&gt; #include&lt;io...<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28325],"tags":[],"class_list":["post-619","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=619"}],"version-history":[{"count":5,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":656,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions\/656"}],"wp:attachment":[{"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lnmp.ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}