📄 7.6.2_2d.htm
字号:
<html>
<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>
<body>
<table align="right" width="300">
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'"
onclick="vbscript:window.location.href='7.6.2_2c.htm'" ></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'"
onclick="vbscript:window.location.href='7.6.3.htm'" ></td>
</tr>
</table>
<p><br>
<br>
</p>
<table>
<tr>
<td class="content">
<p>(j)然后进入while-do语句的分析,我们不再一一叙述。要注意的是,当while一do语句归约为S后,再用产生式(8)进行归约时的一个相应的语义动作:
</p>
<p>{backpatch(L<sub>1</sub>.nextlist,M.quad)<br>
将把M·quad之值127回填到编号为116的四元式的目标标号部分。于是,作为前一个if-then-
else语句的翻译就是完整的了。经过整理的全部四元式代码如下。 </p>
<br> 100: if a<b goto 106
<br> 101: goto l02
<br> 102: if c<d goto l04
<br> 1O3: goto ll7
<br> 104: if e<f goto l06
<br> 105: goto 117
<br> 106:
<div align="right"><table border="0" width="100%">
<TBODY>
<tr>
<td width="18%"> .</td>
<td width="82%"></td>
</tr>
<tr>
<td width="18%"> .</td>
<td width="82%">关于A<sub>1</sub>的四元式 } 共10条</td>
</tr>
<tr>
<td width="18%"> .</td>
<td width="82%"></td>
</tr>
</TBODY>
</table>
</div><br> 115:
<br> 116: goto 127
<br> 117:
<div align="right"><table border="0" width="100%">
<TBODY>
<tr>
<td width="18%"> .</td>
<td width="82%"></td>
</tr>
<tr>
<td width="18%"> .</td>
<td width="82%">关于A<sub>2</sub>的四元式 } 共10条</td>
</tr>
<tr>
<td width="18%"> .</td>
<td width="82%"></td>
</tr>
</TBODY>
</table>
</div><br> 126:
<br> 127:以下是关于while-do语句的代码</td>
</tr>
</table>
<table>
<tr>
<td><font class="yanshi"> 观看演示 </font></td>
<td><font color="blue" onmouseover="javascript:style.cursor='hand'"
onclick="javascript:open('applets/test7_8/Page1.htm','_blank','menu=no,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,left=100,top=100,width=950,height=650')">使用回填翻译控制流语句</font></td>
<td><img src="../images/yanshi.gif" width="36" height="35"></td>
</tr>
</table>
<p><br>
</p>
<table align="right" width="300">
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'"
onclick="vbscript:window.location.href='7.6.2_2c.htm'" ></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'"
onclick="vbscript:window.location.href='7.6.3.htm'" ></td>
</tr>
</table>
</body>
</html>
<html><script language="JavaScript">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -