📄
字号:
<o:r id="V:Rule149" type="connector" idref="#_x0000_s1269"> <o:proxy start="" idref="#_x0000_s1263" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1265" connectloc="0"/> </o:r> <o:r id="V:Rule150" type="connector" idref="#_x0000_s1270"> <o:proxy start="" idref="#_x0000_s1266" connectloc="3"/> <o:proxy end="" idref="#_x0000_s1264" connectloc="0"/> </o:r> <o:r id="V:Rule153" type="connector" idref="#_x0000_s1287"> <o:proxy start="" idref="#_x0000_s1277" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1278" connectloc="0"/> </o:r> <o:r id="V:Rule155" type="connector" idref="#_x0000_s1288"> <o:proxy start="" idref="#_x0000_s1278" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1279" connectloc="0"/> </o:r> <o:r id="V:Rule157" type="connector" idref="#_x0000_s1289"> <o:proxy start="" idref="#_x0000_s1279" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1281" connectloc="0"/> </o:r> <o:r id="V:Rule159" type="connector" idref="#_x0000_s1290"> <o:proxy start="" idref="#_x0000_s1281" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1282" connectloc="0"/> </o:r> <o:r id="V:Rule161" type="connector" idref="#_x0000_s1291"> <o:proxy start="" idref="#_x0000_s1282" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1280" connectloc="0"/> </o:r> <o:r id="V:Rule163" type="connector" idref="#_x0000_s1292"> <o:proxy start="" idref="#_x0000_s1280" connectloc="2"/> <o:proxy end="" idref="#_x0000_s1285" connectloc="0"/> </o:r> <o:r id="V:Rule165" type="connector" idref="#_x0000_s1293"> <o:proxy start="" idref="#_x0000_s1279" connectloc="1"/> <o:proxy end="" idref="#_x0000_s1284" connectloc="0"/> </o:r> <o:r id="V:Rule167" type="connector" idref="#_x0000_s1294"> <o:proxy start="" idref="#_x0000_s1280" connectloc="1"/> <o:proxy end="" idref="#_x0000_s1284" connectloc="0"/> </o:r> <o:r id="V:Rule169" type="connector" idref="#_x0000_s1295"> <o:proxy start="" idref="#_x0000_s1277" connectloc="3"/> <o:proxy end="" idref="#_x0000_s1283" connectloc="0"/> </o:r> <o:r id="V:Rule171" type="connector" idref="#_x0000_s1296"> <o:proxy start="" idref="#_x0000_s1278" connectloc="3"/> <o:proxy end="" idref="#_x0000_s1283" connectloc="0"/> </o:r> </o:rules> </o:shapelayout></xml><![endif]--></HEAD>
<BODY lang=ZH-CN style="TEXT-JUSTIFY-TRIM: punctuation; tab-interval: 21.0pt">
<DIV class=Section1 style="LAYOUT-GRID: 15.6pt none">
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">《编译原理》课程设计报告</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>1 </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">词法分析</SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 19.5pt; TEXT-INDENT: -19.5pt; mso-list: l0 level2 lfo1; tab-stops: list 19.5pt"><![if !supportLists]><SPAN
lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN
style="mso-list: Ignore">1.1<SPAN
style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><![endif]><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">试验目的</SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 19.5pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计,编制并调试一个词法分析程序,加深对词法分析原理的理解。</SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 19.5pt; TEXT-INDENT: -19.5pt; mso-list: l0 level2 lfo1; tab-stops: list 19.5pt"><![if !supportLists]><SPAN
lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN
style="mso-list: Ignore">1.2<SPAN
style="FONT: 7pt 'Times New Roman'"> </SPAN></SPAN></SPAN><![endif]><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">试验要求</SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 36pt; TEXT-INDENT: -36pt; mso-list: l0 level3 lfo1; tab-stops: list 36.0pt"><![if !supportLists]><SPAN
lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN
style="mso-list: Ignore">1.2.1<SPAN
style="FONT: 7pt 'Times New Roman'">
</SPAN></SPAN></SPAN><![endif]><SPAN class=GramE><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">待分析</SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN
lang=EN-US> C </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">语言子集的语法</SPAN></P>
<P class=MsoNormal
style="MARGIN-LEFT: 18pt; TEXT-INDENT: -18pt; mso-list: l2 level1 lfo2; tab-stops: list 18.0pt"><![if !supportLists]><SPAN
lang=EN-US style="mso-fareast-font-family: 'Times New Roman'"><SPAN
style="mso-list: Ignore">1)<SPAN
style="FONT: 7pt 'Times New Roman'">
</SPAN></SPAN></SPAN><![endif]><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">关键字</SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 18pt"><SPAN class=GramE><SPAN
lang=EN-US>main</SPAN></SPAN><SPAN lang=EN-US> if else <SPAN
class=SpellE>int</SPAN> return void while</SPAN></P>
<P class=MsoNormal style="MARGIN-LEFT: 18pt"><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">所有关键字均为小写</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>2) </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">专用符号</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">
</SPAN>= + - * / < <= > >= == != ; : , { } [ ] ( )</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>3) </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其他标记</SPAN><SPAN
lang=EN-US> ID </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN
lang=EN-US> NUM</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">
</SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">通过以下正规式定义其他标记:</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN
style="mso-spacerun: yes"> </SPAN>ID -> letter <SPAN
class=GramE>( letter</SPAN> | digit )</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>NUM -> digit <SPAN
class=SpellE>digit</SPAN>*</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN
style="mso-spacerun: yes"> </SPAN>letter -> a |
</SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">…</SPAN><SPAN
lang=EN-US> | z | A | </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">…</SPAN><SPAN
lang=EN-US> | Z</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN
style="mso-spacerun: yes"> </SPAN><SPAN
class=GramE>digit</SPAN> -> 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US>4) </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">空格由空白、制表符和换行符组成</SPAN></P>
<P class=MsoNormal><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">
</SPAN></SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">空格一般用来分割</SPAN><SPAN
lang=EN-US> ID</SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN
lang=EN-US>NUM</SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、专用符号和关键字,语法分析阶段常被忽略。</SPAN></P>
<P class=MsoNormal><st1:chsdate w:st="on" Year="1899" Month="12" Day="30"
IsLunarDate="False" IsROCDate="False"><SPAN
lang=EN-US>1.2.2</SPAN></st1:chsdate><SPAN lang=EN-US> </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">各种单词符号对应的种别码</SPAN></P>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">表</SPAN><SPAN
lang=EN-US>-1.1 </SPAN><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">各种单词符号的种别码</SPAN></P>
<DIV align=center>
<TABLE class=MsoNormalTable
style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN-LEFT: -21.6pt; BORDER-LEFT: medium none; WIDTH: 486pt; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext"
cellSpacing=0 cellPadding=0 width=648 border=1>
<TBODY>
<TR style="HEIGHT: 16.2pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes">
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.2pt; mso-border-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单词符号</SPAN></P></TD>
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.2pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种别码</SPAN></P></TD>
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.2pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">单词符号</SPAN></P></TD>
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.2pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">种别码</SPAN></P></TD></TR>
<TR style="HEIGHT: 16.05pt; mso-yfti-irow: 1">
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.05pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN lang=EN-US>main</SPAN></P></TD>
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN lang=EN-US>1</SPAN></P></TD>
<TD
style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 121.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 16.05pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt"
vAlign=top width=162>
<P class=MsoNormal><SPAN lang=EN-US>[</SPAN></P></TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -