parse

所属分类:编译器/解释器
开发工具:Windows_Unix
文件大小:25KB
下载次数:2
上传日期:2008-05-22 21:09:32
上 传 者figure_hit
说明:  编译原理LL1语法分析的实验程序,根据文法生成分析程序。大部分代码用来实现LL1的算法。生成parse函数。
(Compilation Principle LL1 grammar analysis of the experimental procedures, analytical procedures to generate the basis of grammar. Most of the code used to realize LL1 algorithms. Generated parse function.)

文件列表:
parse.exe (37366, 2008-04-25)
print M[A,a].exe (33215, 2008-04-24)
str_o.c (332, 2008-04-23)
analysis.c (6561, 2008-04-24)
g.txt (183, 2008-04-23)
global.h (1117, 2008-04-24)
grammer_l.c (3245, 2008-04-24)
in.txt (6, 2008-04-24)
lexer.c (351, 2008-04-24)
parse.c (1591, 2008-04-25)

/*********************************************/ printM[A,a].exe是打印LL1分析表的程序。输入g.txt 输出为stdout 测试的文法来自《编译原理》龙书关于LL1的部分。 想接受其他文法除了编辑语法文件还要更改词法分析函数,然后从新编译。 在输入和输出可能有些问题。是由于打开文件的处理,输入 parse.exe g.txt in.txt,就对in.txt里的进行语法分析,输出为产生式。 /*****************************************************/对语法文件的说明 0和终结符最大值将作为保留,分别表示$和null,终结符最小值将作为start保留 语法文件的格式 终结符表 %% 非终结符表 %% 产生式表 %% 终结符表->终结符 token 终结符表; 非终结符表->非终结符 非终结符表; 产生式表->产生式,产生式表; 产生式->左元 产生的举止 !!(结束符号);

近期下载者

相关文件


收藏者