一种改进的词法分析程序及其类C语言实现  

Improved Lexical Analysis and Its Implementation in C-like Language

在线阅读下载全文

作  者:杨超[1] 王一宾[1] 

机构地区:[1]安庆师范学院计算机与信息学院,安徽安庆246133

出  处:《安庆师范学院学报(自然科学版)》2009年第4期36-38,42,共4页Journal of Anqing Teachers College(Natural Science Edition)

摘  要:本文提出一种改进的词法分析程序设计思想,并进行了实现。首先定义四类字符集,构造状态转换矩阵。然后通过对给定文法的分析,化简变换状态转换矩阵使之成为程序可直接使用的二维数组Status。最后利用二维数组Status给出了核心函数get Word()的类C描述。In this paper,the design thought of an improved lexical analysis is proposed and realized.First of all,the definition of four types of character sets and construction of a state transition matrix are achieved.Secondly,through analysis of a given grammar,the state transition matrix can be transformed into a two-dimensional array in which the lexical analysis can directly use.Finally,the description of core function getWord(),which takes advantage of the matrix above,is given in C-like language.

关 键 词:词法分析 字符集 状态转换矩阵 

分 类 号:TP314[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象