关键词:词法分析;原词;编译原理;记号
Business rules engine Lexical Analysis
Abstract
Compiler runs through the work started from the source input to output targets procedures of the whole process is very complex. Generally, the whole process can be divided into five phases: lexical analysis, grammar analysis, intermediate code generation, optimization and target code generation.
This is the lexical analysis of the design stage. Lexical analysis stage is to build the first phase of the process. This phase of the mission is scanned from left to right source of the string, in accordance with the rules of morphology (Regular Grammar rules) to identify the correct one word, and converted into the corresponding dual-word (category codes, property values ) To the analysis of the use of grammar. Therefore, the lexical analysis is compiled based. Lexical analysis of the implementation of the procedure known as the lexical analyzer.
Lexical analysis is imported from the source, identify each has an independent significance of the word, namely, the basic reservations about the word (keywords), the identifier, constant, the operator, separators top-five, remove spaces and escape, And the words were out of the internal code words and symbols its own value.