📄 4.7.3.2.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.3.1b.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.7.3.2b.htm'"></img></td>
</tr>
</table>
<br><br>
<table><tr><td>    </td>
<td class="content">
<p>
例如,例4.18的拓广文法G'的产生式为:<br>
(0)S'→S <br>
(1)S→CC <br>
(2)C→cC (4. 18)<br>
(3)C→d <br>
</p>
<p>这个文法的LR(1)项目集规范族和转移函数go可表示作如图4.23所示的确定的有限自动机。在图中我们把表示LR(1)项目的方括号省略。
</p>
<p>
图4.23中形如[A→α·β,a/b]的项目是表示[A→α·β,a ] 和[A→α·β,b]的缩写。注意到I3与I<sub>6</sub>, I4与I<sub>7</sub>, I<sub>8</sub>与I<sub>9</sub>除了向前搜索符号不同外,它们的核心部分是两两相同的。当我们为这个文法构造LR(0)项目集规范族时,它们是合二为一的。现在只是加上了搜索符号后便被一分为二了。 </p>
</td></tr></table>
<p>
<center><img src="images/4.23.gif" ></center><br>
<center class="content">图4.23 对于文法(4.18)的转移函数go的图</center></p>
<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.3.1b.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.7.3.2b.htm'"></img></td>
</tr>
</table>
</BODY>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -