⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 4.10.0.1.htm

📁 建立《编译原理网络课程》的目的不仅使学生掌握构造编译程序的原理和技术
💻 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>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class="content">
<a name="4.10"></a>
4.10 文法G[S],其产生式如下<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;S→(L)|a 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;L→L,S|S <br>
&nbsp;&nbsp;&nbsp;&nbsp;文法G[S]的算符优先关系由下表给出。建立与下表相应的算符优先函数并用算符优先分析法分析句子(a,(a,a))<br>
&nbsp;&nbsp;&nbsp;&nbsp;文法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>
&nbsp;&nbsp;&nbsp;&nbsp;(a)S→Sab|bR <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;(b)S→aSAB|BA <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A→aA|B <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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 + -