文件名称:lex-and-yacc
介绍说明--下载内容均来自于网络,请自行研究使用
对输入的程序进行分析,将关键字,保留字与系统标识符分开,并对其属性进行说明。
建立数组,将单词读入,对单词的ASCII码进行判断,将在ASCII码值在一定区间进行区分(使用if语句来判断),分开来后,对其所在ASCII值区间的不同,给予以不同的属性(比如:系统保留字…),词法分析器完成后要能识别+,-,=等字符。
对输入的程序语句进行分析。对每个非终结点定义单个函数,定义了它的后继节点。然后用一个构造来的函数,使定义的后继节点符合语法,否则报错。
-Analysis of the input process, the keywords, reserved words separate with the system identifier, and its properties are described. Create an array, read the word, the word of the ASCII code to judge the value in the ASCII code to distinguish a certain interval (using the if statement to determine), separately, the ASCII value of their range where different, giving different attributes (such as: the system of reserved words ...) After the lexical analyzer must be able to identify the+,-,= other characters. The input of the program statements for analysis. Defined for each single function of non-end point, defined its successor nodes. Then use a constructor to the function, so that subsequent nodes meet the definition of the syntax, or an error.
建立数组,将单词读入,对单词的ASCII码进行判断,将在ASCII码值在一定区间进行区分(使用if语句来判断),分开来后,对其所在ASCII值区间的不同,给予以不同的属性(比如:系统保留字…),词法分析器完成后要能识别+,-,=等字符。
对输入的程序语句进行分析。对每个非终结点定义单个函数,定义了它的后继节点。然后用一个构造来的函数,使定义的后继节点符合语法,否则报错。
-Analysis of the input process, the keywords, reserved words separate with the system identifier, and its properties are described. Create an array, read the word, the word of the ASCII code to judge the value in the ASCII code to distinguish a certain interval (using the if statement to determine), separately, the ASCII value of their range where different, giving different attributes (such as: the system of reserved words ...) After the lexical analyzer must be able to identify the+,-,= other characters. The input of the program statements for analysis. Defined for each single function of non-end point, defined its successor nodes. Then use a constructor to the function, so that subsequent nodes meet the definition of the syntax, or an error.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
词法分析器 语法分析器\cifa.EXE
.....................\FUN.CPP
.....................\yufa.cpp
.....................\yufa.EXE
.....................\~$分析器、语法分析器试验报告.doc
.....................\cifa.cpp
.....................\编译原理课程设计报告.doc
词法分析器 语法分析器
.....................\FUN.CPP
.....................\yufa.cpp
.....................\yufa.EXE
.....................\~$分析器、语法分析器试验报告.doc
.....................\cifa.cpp
.....................\编译原理课程设计报告.doc
词法分析器 语法分析器