<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta name="generator" content="pdf2htmlEX">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css">
<link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css">
<link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/628191d73b39c07824fa49cb/raw.css">
<script src="https://static.pudn.com/base/js/compatibility.min.js"></script>
<script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script>
<script>
try{
pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});
}catch(e){}
</script>
<title></title>
</head>
<body>
<div id="sidebar" style="display: none">
<div id="outline">
</div>
</div>
<div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/628191d73b39c07824fa49cb/bg1.jpg"><div class="c x0 y1 w2 h2"><div class="t m0 x1 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">《编译原理》实验指导书 计算机科学系</div><div class="t m0 x2 h4 y3 ff1 fs1 fc0 sc0 ls0 ws0">《编译原理》实验一</div><div class="t m0 x3 h5 y4 ff1 fs2 fc0 sc0 ls0 ws0">词法分析器</div><div class="t m0 x4 h5 y5 ff1 fs2 fc0 sc0 ls0 ws0">考虑如下<span class="_ _0"> </span><span class="ff2">C<span class="_ _0"> </span></span>语言子集</div><div class="t m0 x5 h5 y6 ff1 fs2 fc0 sc0 ls0 ws0">单词<span class="_ _1"> </span>类别编码<span class="_ _2"> </span>助记符<span class="_ _3"> </span>值<span class="_ _4"> </span>备注</div><div class="t m0 x6 h6 y7 ff2 fs2 fc0 sc0 ls0 ws0">break<span class="_ _5"> </span>1</div><div class="t m0 x7 h6 y8 ff2 fs2 fc0 sc0 ls0 ws0">BREAK</div><div class="t m0 x8 h6 y7 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x9 h6 y9 ff2 fs2 fc0 sc0 ls0 ws0">char<span class="_ _6"> </span>2</div><div class="t m0 xa h6 ya ff2 fs2 fc0 sc0 ls0 ws0">CHAR</div><div class="t m0 x8 h6 y9 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 xb h6 yb ff2 fs2 fc0 sc0 ls0 ws0">do<span class="_ _7"> </span>3</div><div class="t m0 xc h6 yc ff2 fs2 fc0 sc0 ls0 ws0">DO</div><div class="t m0 x8 h6 yb ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 xd h6 yd ff2 fs2 fc0 sc0 ls0 ws0">double<span class="_ _8"> </span>4</div><div class="t m0 xe h6 ye ff2 fs2 fc0 sc0 ls0 ws0">DOUBLE</div><div class="t m0 x8 h6 yd ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 xf h6 yf ff2 fs2 fc0 sc0 ls0 ws0">else<span class="_ _9"> </span>5</div><div class="t m0 x10 h6 y10 ff2 fs2 fc0 sc0 ls0 ws0">ELSE</div><div class="t m0 x8 h6 yf ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x11 h6 y11 ff2 fs2 fc0 sc0 ls0 ws0">if<span class="_ _a"> </span>6</div><div class="t m0 x12 h6 y12 ff2 fs2 fc0 sc0 ls0 ws0">IF</div><div class="t m0 x8 h6 y11 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 xb h6 y13 ff2 fs2 fc0 sc0 ls0 ws0">int<span class="_ _7"> </span>7</div><div class="t m0 x13 h6 y14 ff2 fs2 fc0 sc0 ls0 ws0">INT</div><div class="t m0 x8 h6 y13 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x14 h6 y15 ff2 fs2 fc0 sc0 ls0 ws0">return<span class="_ _b"> </span>8</div><div class="t m0 xe h6 y16 ff2 fs2 fc0 sc0 ls0 ws0">RETURN</div><div class="t m0 x8 h6 y15 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x9 h6 y17 ff2 fs2 fc0 sc0 ls0 ws0">void<span class="_ _c"> </span>9</div><div class="t m0 x10 h6 y18 ff2 fs2 fc0 sc0 ls0 ws0">VOID</div><div class="t m0 x8 h6 y17 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x6 h6 y19 ff2 fs2 fc0 sc0 ls0 ws0">while</div><div class="t m0 x15 h6 y1a ff2 fs2 fc0 sc0 ls0 ws0">10<span class="_ _d"> </span>WHILE</div><div class="t m0 x8 h6 y19 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x16 h5 y1b ff1 fs2 fc0 sc0 ls0 ws0">标识符</div><div class="t m0 x15 h6 y1c ff2 fs2 fc0 sc0 ls0 ws0">11</div><div class="t m0 x17 h6 y1d ff2 fs2 fc0 sc0 ls0 ws0">ID</div><div class="t m0 x18 h5 y1b ff1 fs2 fc0 sc0 ls0 ws0">构成标识符的字符串</div><div class="t m0 x5 h5 y1e ff1 fs2 fc0 sc0 ls0 ws0">常数</div><div class="t m0 x15 h6 y1f ff2 fs2 fc0 sc0 ls0 ws0">12</div><div class="t m0 x10 h6 y20 ff2 fs2 fc0 sc0 ls0 ws0">NUM</div><div class="t m0 x19 h5 y1e ff1 fs2 fc0 sc0 ls0 ws0">数值</div><div class="t m0 x16 h5 y21 ff1 fs2 fc0 sc0 ls0 ws0">字符串</div><div class="t m0 x15 h6 y22 ff2 fs2 fc0 sc0 ls0 ws0">13<span class="_ _e"> </span>STRING</div><div class="t m0 x1a h5 y21 ff1 fs2 fc0 sc0 ls0 ws0">字符串</div><div class="t m0 x11 h6 y23 ff2 fs2 fc0 sc0 ls0 ws0">+</div><div class="t m0 x15 h6 y24 ff2 fs2 fc0 sc0 ls0 ws0">14<span class="_ _f"> </span>ADD</div><div class="t m0 x8 h6 y23 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x1b h6 y25 ff2 fs2 fc0 sc0 ls0 ws0">–</div><div class="t m0 x15 h6 y26 ff2 fs2 fc0 sc0 ls0 ws0">15</div><div class="t m0 x1c h6 y25 ff2 fs2 fc0 sc0 ls0 ws0">SUB<span class="_ _10"> </span>_</div><div class="t m0 x1b h6 y27 ff2 fs2 fc0 sc0 ls0 ws0">*</div><div class="t m0 x15 h6 y28 ff2 fs2 fc0 sc0 ls0 ws0">16<span class="_ _8"> </span>MUL</div><div class="t m0 x8 h6 y27 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x1d h6 y29 ff2 fs2 fc0 sc0 ls0 ws0">/</div><div class="t m0 x15 h6 y2a ff2 fs2 fc0 sc0 ls0 ws0">17<span class="_ _11"> </span>DIV</div><div class="t m0 x8 h6 y29 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x11 h6 y2b ff2 fs2 fc0 sc0 ls0 ws0">></div><div class="t m0 x15 h6 y2c ff2 fs2 fc0 sc0 ls0 ws0">18<span class="_ _12"> </span>GT</div><div class="t m0 x8 h6 y2b ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x1e h6 y2d ff2 fs2 fc0 sc0 ls0 ws0">>=</div><div class="t m0 x15 h6 y2e ff2 fs2 fc0 sc0 ls0 ws0">19</div><div class="t m0 x1f h6 y2d ff2 fs2 fc0 sc0 ls0 ws0">GE<span class="_ _13"> </span>_</div><div class="t m0 x11 h6 y2f ff2 fs2 fc0 sc0 ls0 ws0"><</div><div class="t m0 x15 h6 y30 ff2 fs2 fc0 sc0 ls0 ws0">20</div><div class="t m0 x17 h6 y2f ff2 fs2 fc0 sc0 ls0 ws0">L<span class="_ _14"></span>T<span class="_ _15"> </span>_</div><div class="t m0 x1e h6 y31 ff2 fs2 fc0 sc0 ls0 ws0"><=</div><div class="t m0 x15 h6 y32 ff2 fs2 fc0 sc0 ls0 ws0">21</div><div class="t m0 x1f h6 y31 ff2 fs2 fc0 sc0 ls0 ws0">LE<span class="_ _16"> </span>_</div><div class="t m0 x1e h6 y33 ff2 fs2 fc0 sc0 ls0 ws0">==</div><div class="t m0 x15 h6 y34 ff2 fs2 fc0 sc0 ls0 ws0">22<span class="_ _12"> </span>EQ</div><div class="t m0 x8 h6 y33 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 xb h6 y35 ff2 fs2 fc0 sc0 ls0 ws0">!=</div><div class="t m0 x15 h6 y36 ff2 fs2 fc0 sc0 ls0 ws0">23<span class="_ _12"> </span>NE</div><div class="t m0 x8 h6 y35 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x11 h6 y37 ff2 fs2 fc0 sc0 ls0 ws0">=</div><div class="t m0 x15 h6 y38 ff2 fs2 fc0 sc0 ls0 ws0">24<span class="_ _e"> </span>ASSIGN</div><div class="t m0 x8 h6 y37 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x1b h6 y39 ff2 fs2 fc0 sc0 ls0 ws0">{</div><div class="t m0 x15 h6 y3a ff2 fs2 fc0 sc0 ls0 ws0">25<span class="_ _c"> </span>LB</div><div class="t m0 x8 h6 y39 ff2 fs2 fc0 sc0 ls0 ws0">_</div><div class="t m0 x20 h7 y3b ff1 fs3 fc0 sc0 ls0 ws0">第<span class="ff2"> 1 </span>页<span class="ff2"> </span>共<span class="ff2"> 4 </span>页</div></div></div><div class="pi" data-data='{"ctm":[1.611850,0.000000,0.000000,1.611850,0.000000,0.000000]}'></div></div>
</body>
</html>