The research of applying regular grammar to making model for lexical analyzer
Haili Luo · 2013
Lexical analyzer is an important software. A lexical analyzer can be used to do lexical analyzing in many kinds of software such as language compiler and document editor. The traditional method of constructing lexical analyzer is very tedious. In this article, a new method of constructing lexical analyzer was proposed, the key point of which is making lexical model for lexical analyzer. The regular grammar can be used to make lexical model for lexical analyzer by which the lexical grammar of a language can be described properly. In order to make lexical analyzing, a control program should be constructed to process the lexical model. The lexical analyzer consists of the lexical model and the control program. By example, the method of constructing lexical analyzer was correct and effective.