构造直接编程的词法分析器

杨超, 郑志群, 何书前, 石春

电脑与电信 ›› 2018, Vol. 1 ›› Issue (1-2) : 1-4.

电脑与电信 ›› 2018, Vol. 1 ›› Issue (1-2) : 1-4.
基金项目

构造直接编程的词法分析器

  • 杨超,郑志群,何书前,石春
作者信息 +

Construction of the Lexical Analyzer by Direct Programming

  • YANG Chao, ZHENG Zhi-qun, HE Shu-qian, SHI Chun
Author information +
文章历史 +

摘要

本文主要对词法分析器直接编程构造方法进行了分析与研究,分别通过正则表达式、状态图与有穷自动机对词法分析器进行了描述。然后运用实例对词法分析器构造流程进行分析与说明。进一步分析构造直接编程的词法分析器过程的性能,研究发现直接编程的词法分析器分析速度更快,优于其他类型的词法分析器。

Abstract

The construction of the lexical analyzer by direct programming is analyzed and studied in this paper. The lexical analyzer is described by the regular expression, the state diagram and FA. Then an example is used to analyze and explain the structural process of the lexical analyzer. By further analyzing the performance of the lexical analyzer, we find that the lexical analyzer constructed by direct programming is faster than other types of lexical analyzer.

关键词

编译原理 / 词法分析器 / 有穷自动机 / 状态图 / 正则表达式

Key words

compiler principle / lexical analyzer / FA / state diagram / regular expression

引用本文

导出引用
杨超, 郑志群, 何书前, 石春. 构造直接编程的词法分析器[J]. 电脑与电信. 2018, 1(1-2): 1-4
YANG Chao, ZHENG Zhi-qun, HE Shu-qian, SHI Chun. Construction of the Lexical Analyzer by Direct Programming[J]. Computer & Telecommunication. 2018, 1(1-2): 1-4
中图分类号: TP313   

基金

国家自然科学基金项目,项目编号:No: 61362016;海南省自然科学基金项目,项目编号:No: 617121;海南省高等学校教育教学改革研究项目,项目编号:No: HNJG2014-33; 海南省教育科学规划,项目编号:No:QJY201710130,QJY13516015;中央电教馆全国信息技术课题,项目编号:No:166233260。

Accesses

Citation

Detail

段落导航
相关文章

/