📄 4.7.2.6b.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='4.7.2.6.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.7.3.0.htm'"></img></td>
</tr>
</table>
<br><br>
<table><tr><td>    </td>
<td class="content">
<p>考虑I<sub>2</sub>={S→L·=R,R→L·}。集合中第一个项目使 <br>
action[2,=]=shift 6<br>
第二个项目,由于FOLLOW(R)含有=(因为S=>L=R=>*R=R),将使 <br>
action[2,=]=reduce R→L </p>
<p>因此当状态2(在图4.21中是用I<sub>2</sub>表示的状态)面临当前输入符号为=号时,存在“移进-归约”冲突。因此文法(4.17)不是SLR文法。而文法(4.17)是无二义的。产生冲突的原因在于SLR分析表未包含足够多的展望信息, 以便当状态2面临输入符号为=号时,能用展望信息来决定移进和归约的取舍。下面我们将讨论更强的LR分析器。</p>
</td></tr></table>
<table align=left>
<td><font class="yanshi">    观看演示 </font></td>
<td>
<font color=blue onmouseover="javascript:style.cursor='hand';" onclick="javascript:open('applet/test4_7/test4_7.html','_blank','left=100,top=100,scrollbars=yes,resizable=yes,width=850,height=600')">LR(0)项目集规范族的构造过程</font>
</td>
<td><img src="../images/yanshi.gif"></img></td>
</table>
<br>
<br>
<br>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.7.2.6.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.7.3.0.htm'"></img></td>
</tr>
</table>
</BODY>
</html>
<html><script language="JavaScript">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -