摘要
利用正规文法对词法分析器建模的核心是用正规文法建立词法模型。以PL/0语言为例描述了用正规文法建立词法模型及以正规文法形式的词法模型为基础构造词法分析器的过程,并通过实例分析了用这种方法产生的词法分析器的工作过程。以正规文法形式的词法模型为基础构造词法分析器的方法比其它词法分析器的构造方法更为简洁、高效。
The core of making model for lexical analyzer by rule grammar is making lexical model by rule grammar. The process of making lexical model by rule grammar and constructing lexical analyzer based on the lexical model is described with PL/O. The working process of the lexical analyzer made by this method is analyzed with an example. The method of making lexical analyzer based on the lexical model is easier and efficient.
出处
《电脑与电信》
2011年第12期52-53,共2页
Computer & Telecommunication