📄 4.10.0.1.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.10.0b.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.10.0.1b.htm'"></img></td>
</tr>
</table>
<br><br>
<font class="title2"><b>练习</b></font>
<table><tr><td> </td>
<td class="content">
<a name="4.10"></a>
4.10 文法G[S],其产生式如下<br>
S→(L)|a
<br>
L→L,S|S <br>
文法G[S]的算符优先关系由下表给出。建立与下表相应的算符优先函数并用算符优先分析法分析句子(a,(a,a))<br>
文法G[S]的算符优先关系表:
<center><img src="images/ex4.101.gif"></center><br>
<br>
<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('4.10.10.htm','','left=100,top=100,scrollbars=yes,resizable=yes,toolbar=no,width=610,height=500,scrolling=yes')"></img>
</td></tr>
</table>
<a name="4.11"></a>
<hr size=2 align=center color=red><br>
4.11 下列文法是否为SLR(1)文法?若是,请构造相应的分析表。若不是,请说明理由。<br>
(a)S→Sab|bR <br>
R→S|a <br>
<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('4.10.11(a).htm','','left=100,top=100,scrollbars=yes,resizable=yes,toolbar=no,width=510,height=500,scrolling=yes')"></img>
</td></tr>
</table>
(b)S→aSAB|BA <br>
A→aA|B <br>
B→b <br>
<table align=center width=70%>
<tr><td align=right>
<img src="../images/key.gif" onmouseover="javascript:style.cursor='hand'" onclick="javascript:window.open('4.10.11(b).htm','','left=100,top=100,scrollbars=yes,resizable=yes,toolbar=no,width=610,height=500,scrolling=yes')"></img>
</td></tr>
</table>
<hr size=2 align=center color=red><br>
</td></tr></table>
<br>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.10.0b.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.10.0.1b.htm'"></img></td>
</tr>
</table>
</BODY>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -