📄 2.2.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='2.1.3b.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='2.2.1b.htm'"></img></td>
</tr>
</table>
<br><br>
<font class="title2"><b>2.2 文法和语言</b></font>
<table><tr><td>    </td>
<td class="content">
<p>
如前所述,语言是一个字母表∑上的一些符号串的集合,在这个集合中,每个符号串都符合这个语言的语法规则。在给出程序语言的文法和语言的形式定义之前,先考察自然语言中的情形。
</p>
</td></tr></table>
<hr size=2 color=red width=90%>
<font class="title2"><b>2.2.1 引子</b></font>
<table><tr><td>    </td>
<td class="content">
<p>
现在,我们分析一个具体的英语句子,从它出发,引进有关文法和语言的概念。请考虑英语句子“The grey wolf will eat the goat”。根据英语知识,知道这是一个英语句子,并且可以进行图解,如图2.1所示。这是一棵有序有向树(简称树)。这种图解把句子分解成它的各个组成部分。由图2.1可以看出,<句子>是由<主语>后随<谓语>组合而成的;<主语>又是由<冠词>后随<形容词>、再随<名词>构成的,等等。
</p>
<p>
<center><img src="IMG/2.1.gif" width="541" height="289"></center><br>
<center>图2.1 一棵树</center>
</p>
<p>
为了描述这种结构,在图2.1中我们使用了一些新的符号,即所谓语法单位(或称语法实体),如<句子>、<主语>、<冠词> 等等。图2.1中凡是用尖括号<和>括起来的都是语法单位。这样就把所用到的语法单位和语言中的基本字较为明显地区分开了。
</p>
</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='2.1.3b.htm'"></img></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='2.2.1b.htm'"></img></td>
</tr>
</table>
</BODY>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -