文件名称:ward
介绍说明--下载内容均来自于网络,请自行研究使用
词法分析
1 试验目的
设计,编制并调试一个此法分析程序,加深对此法分原理的理解.
2 试验要求
1)待分析的简单语言的词法
* 关键字:
begin if then while do end
所有关键字都是小写.
2)运算符和界符:
: = + * - / < <= <> > >= = ( ) #
3)其他单词是标识符(ID)和整数型常数(NUM),通过一下正规式定义:
ID=letter (letter|digit)*
NUM=digit digit*
4)空格由空白,制表符和换行符组成,空格一般用来分隔ID,NUM,运算符,界符和关键字,此法分析阶段通常被忽略.
3 各种单词符号对应的种别码如表所示
-Lexical Analysis 1 trial design, establishment and debug an analysis of this process, to deepen this understanding of law principles .2 test requirements 1) to be analyzed in simple language lexical* keyword: begin if then while do end all keywords are all lowercase. 2) operator and the community at:: =+*-/<<= <>>> = = ()# 3) in other words is the identifier (ID) and integer-type constants (NUM), through some formal definition: ID = letter (letter | digit)* NUM = digit digit* 4) by the blank spaces, tabs and line breaks composition, separated by spaces are generally used ID, NUM, operator, Fu sector and keywords, this analysis phase is often neglected .3 symbols corresponding to various kinds of words do not code as shown in the table
1 试验目的
设计,编制并调试一个此法分析程序,加深对此法分原理的理解.
2 试验要求
1)待分析的简单语言的词法
* 关键字:
begin if then while do end
所有关键字都是小写.
2)运算符和界符:
: = + * - / < <= <> > >= = ( ) #
3)其他单词是标识符(ID)和整数型常数(NUM),通过一下正规式定义:
ID=letter (letter|digit)*
NUM=digit digit*
4)空格由空白,制表符和换行符组成,空格一般用来分隔ID,NUM,运算符,界符和关键字,此法分析阶段通常被忽略.
3 各种单词符号对应的种别码如表所示
-Lexical Analysis 1 trial design, establishment and debug an analysis of this process, to deepen this understanding of law principles .2 test requirements 1) to be analyzed in simple language lexical* keyword: begin if then while do end all keywords are all lowercase. 2) operator and the community at:: =+*-/<<= <>>> = = ()# 3) in other words is the identifier (ID) and integer-type constants (NUM), through some formal definition: ID = letter (letter | digit)* NUM = digit digit* 4) by the blank spaces, tabs and line breaks composition, separated by spaces are generally used ID, NUM, operator, Fu sector and keywords, this analysis phase is often neglected .3 symbols corresponding to various kinds of words do not code as shown in the table
(系统自动生成,下载前可以参看下载内容)
下载文件列表
test.c
word.c
word.exe
word.c
word.exe