# Compiler **Repository Path**: yang_jielong/Compiler ## Basic Information - **Project Name**: Compiler - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2021-05-17 - **Last Updated**: 2021-06-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 这是一个简单SAMPLE语言的词法分析器。 首先定义了三个字符串数组,分别存放保留字、单界符和单词集(数组索引作为其种别码)。 读入代码时将其整体作为一个字符串存储,在词法分析过程中维护一个指针指向当前处理的字符, 并将识别出的单词按格式添加到一个字符串数组中作为结果集。 词法分析的主要过程是按照DFA对程序进行多重条件判断以识别其中的合法单词和界符。