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

📄 4.10.0.2b.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.0.2.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.10.0.3.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.19"></a>
4.19 判断题<br>
对下面的陈述,正确的在陈述后的括号内画"√";否则画"×"<br>
(1) 存在有左递归规则的文法是LL(1)的。&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;           (  )<br>
(2) 任何算符优先文法的句型中不会有两个相邻的非终结符号。&nbsp; &nbsp; (  )<br>
(3) 算符优先文法中任何两个相邻的终结符号之间至少满足三种<br>
&nbsp; &nbsp;&nbsp; &nbsp;关系(<·,·>,(<img src="images/equalpoint.gif" width="20" height="19">))之一。&nbsp; &nbsp; &nbsp; &nbsp;(  )<br>
(4) 任何LL(1)文法都是无二义性的。&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;(  )<br>
(5) 每一个SLR(1)文法也都是LR(1)文法。&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; (  )<br>
(6) 存在一种算法,能判定任何上下文无关文法是否是LL(1)的。&nbsp; &nbsp; (  )<br>
(7) 任何一个LL(1)文法都是一个LR(1)文法,反之亦然。&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; (  )<br>
(8) LR(1)分析中括号中的1是指,在选用产生式A→α进行分析,看当前读入符号是否在<b>FIRST</b>(α)中。&nbsp; &nbsp; &nbsp; &nbsp;(  )
<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.19.htm','','left=100,top=100,scrollbars=yes,resizable=yes,toolbar=no,width=500,height=500,scrolling=yes')"></img>
</td></tr>
</table>
<a name="4.20"></a>
<hr size=2 align=center color=red><br>    
4.20 选择题<br>
从供选择的答案中,选出应填入____内的正确答案。<br>
<p>在编译程序中,语法分析分为自顶向下分析和自底向上分析两类。__A__和LL(1)分析法属于自顶向下分析;__B__和LR分析法属于自底向上分析。自顶向下分析试图为输入符号串构造一个__C__;自底向上分析试图为输入符号串构造一个__D__。采用自顶向下分析方法时,要求文法中不含有__E__。</p><br>
供选择的答案:<br>
<table align=center width=450 class="content">
<tr><td>A、B:</td><td>①深度分析法</td><td>②宽度优先分析法</td></tr>   
<tr><td></td><td>③算符优先分析法</td><td>④递归子程序分析法</td></tr>   
<tr><td>C、D:</td><td>①语法树</td><td>②有向无环图</td></tr>   
<tr><td></td><td>③最左推导</td><td>④最右推导</td></tr>   
<tr><td>E:</td><td>①右递归</td><td>②左递归</td></tr>   
<tr><td></td><td>③直接右递归</td><td>④直接左递归</td></tr>   
</table><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.20.htm','','left=100,top=100,scrollbars=yes,resizable=yes,toolbar=no,width=500,height=500,scrolling=yes')"></img>
</td></tr>
</table>
<hr size=2 align=center color=red><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.10.0.2.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='4.10.0.3.htm'"></img></td>
</tr>
</table>

</BODY>
</html>



<html><script language="JavaScript">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -