摘要
词法分析程序是数控程序编译器中不可缺少的部分,目前一般采用高级语言直接开发。本文介绍一种新的方法,它利用词法分析程序的自动构造工具LEX(lexical analyser)构造数控程序编译器的词法分析程序。作为一种专用的编译工具,LEX的源程序简单,编译后生成的词法分析程序效率高。在数控编译器的开发中,使用LEX简化了编程序过程,是一种高效的程序设计方法。
Lexical analysis is an indispensable part of NC program compiler. It is usually developed directly by advanced languages. This paper introduces a kind of new method. Applying LEX (lexical analyzer), an automatic constructor of lexical analysis, construct the lexical analyzer of NC program compiler. Being a special compile tool, the source program of LEX is simple. The compiled lexical analyzer constructed by LEX has high efficiency. During the development of NC compiler, LEX simplifies the programming progress. It is a high-efficiency method of program design.
出处
《机电工程技术》
2006年第2期28-30,共3页
Mechanical & Electrical Engineering Technology