20110915_src

所属分类:编译器/解释器
开发工具:Perl
文件大小:37KB
下载次数:9
上传日期:2011-09-19 13:05:02
上 传 者godtsu
说明:  建立一个针对LL(1)文法编译器的自动生成器。要完成此编译器的生成器需对源文件进行两遍处理:第一遍词法分析,第二遍语法分析。语法分析程序用LL(1)语法分析方法。首先输入定义好的文法书写文件(所用的文法可以用LL(1)分析),然后建立词法分析器,包括词法分析主程序、扫描器部分、关键字表等。经词法分析后分别计算所输入的文法的每个非终结符号的FIRST集合,每个非终结符号的FOLLOW集合,以及每个规则的SELECT集合,并判断任意一个非终结符号的任意两个规则的SELECT集的交集是不是都为空,如果是则输入文法符合LL(1)文法则可以进行分析。
(For the establishment of a LL (1) grammar compiler automatic generator. To accomplish this compiler generator must deal with the source file twice: first pass lexical analysis, parsing the second time. Parser using LL (1) syntax analysis. First, write the input file defined grammar (grammar can be used in LL (1) analysis), and then create the lexical analyzer, including lexical analysis of the main program, scanner parts, keyword lists. The lexical analysis of the inputs were calculated for each non-terminal grammar symbol of the FIRST set of each non-terminal symbol FOLLOW set, and each set of the rule s SELECT and determine any non-terminal symbol of any two rules SELECT set intersection is not all empty, if it is in line with the input grammar LL (1) the text rule can be analyzed.)

文件列表:
settings.pl (1854, 2011-09-16)
rules_shift_jis.csv (1942, 2011-09-15)
regexps.pl (5421, 2011-08-04)
excellabels.csv (331, 2011-09-15)
excel.pl (27385, 2011-09-16)
checkVers.pl (15, 2011-05-23)
beastDecode.pl (16046, 2011-09-16)
beastB.pl (43886, 2011-09-16)
beast.pl (49354, 2011-09-16)

近期下载者

相关文件


收藏者