Description: 用SLR分析法实现的语法分析,先用初版.exe生成符号表和token字,然后进行分析,action表程序自动生成-SLR analysis method used to achieve the syntax analysis, use the first edition. Exe Generation symbol table and token characters, Then the analysis, action automatically generated table Platform: |
Size: 80948 |
Author:胡恩 |
Hits:
Description: 用SLR分析法实现的语法分析,先用初版.exe生成符号表和token字,然后进行分析,action表程序自动生成-SLR analysis method used to achieve the syntax analysis, use the first edition. Exe Generation symbol table and token characters, Then the analysis, action automatically generated table Platform: |
Size: 80896 |
Author:胡恩 |
Hits:
Description: 实现编译原理中 通过已知的文法来产生First集和FOLLOW集 以及SLR分析表-Compilation Principle realize through grammar known to generate First Set and FOLLOW sets, as well as SLR analysis table Platform: |
Size: 11264 |
Author:陈波 |
Hits:
Description: (1)构造文法G的LR(0)项目
(2)构造文法G的LR(0)项目集规范族及识别活前缀的DFA
(3)证明文法G不是LR(0)文法而是SLR(1)文法,并构造SLR(1)分析表
(4)设计LR语法分析程序,且能输出分析过程
(5)列举两个例子测试语法分析程序(识别失败一例,识别成功一例,后者推导步骤不得少于10步)
-(1) construct grammar G of the LR (0) item (2) construct grammar G of the LR (0) item sets standards and identification of family living prefix DFA (3) prove that the grammar G is not LR (0) grammar, but the SLR (1 ) grammar, and constructs SLR (1) analysis table (4) design LR parser, and can output analysis process (5) cited two examples of parsing test procedures (identification fails an example, identify the success of a case, the latter shall not be derived step Less than 10 steps) Platform: |
Size: 45056 |
Author:wolf |
Hits:
Description: SLR(1)分析表的构造,编译原理实验会用到-SLR (1) analysis table of the structure, principle of the experiment will be used to compile Platform: |
Size: 321536 |
Author:朱涛 |
Hits:
Description: SLR(1)分析表分析法,给出一个分析表含action和goto表,然后对给出的语句进行语法分析,规约判断!-SLR (1) analysis table analysis, give an analysis table with action and goto tables, and then parsing the statements given in the statute to judge! Platform: |
Size: 548864 |
Author:肖琴琴 |
Hits:
Description: 采用C#编写的编译器,只是原理性说明,采用SLR表分析,最终生成4元式和符号表
本编译器是语法无关的,即能够通过文本随时重新编辑语法-Written by C# compiler, only principle of explanation, using SLR table analysis, the final generation 4 yuan type and symbol table of the compiler is syntax independent, that is, at any time through the text re-edit grammar Platform: |
Size: 128000 |
Author:wxj |
Hits:
Description: 在VC下打开LRTrans1.dsp,阅读工程LRTrans1,LRTrans1为一个加、乘(适当扩充可为四则)运算表达式的SLR语法分析器,规定其文法如下:
文法3:
(0) S ->E
(1) E->E+E
(2) E->E*E
(3) E->(E)
(4) E->i
经分析其SLR(1)分析表如下(分析表按“操作符运算优先级和运算符的结合率”方法解决冲突——*优先集高于+,*和+的结合率均为左结合)
-In the VC to open LRTrans1.dsp, read the works LRTrans1, LRTrans1 as a plus, by (the appropriate expansion for 4) expression is the SLR parser, the provisions of the grammar as follows: Grammar 3: (0) S' -> E (1) E-> E+ E (2) E-> E* E (3) E-> (E) (4) E-> i by the analysis of the SLR (1) of the table as follows (of the table by " operation Fu operator precedence and operator binding rate " method of conflict resolution priority set higher than the+--*,* and+ binding rate for both left-associative) Platform: |
Size: 13312 |
Author:chivas |
Hits:
Description: (1)设计符号表
确定符号表的组织方式,一般应包括名字栏和信息栏,其中名字栏作为关键字。要考虑能够存储有关名字的信息,并可以高效地完成如下操作:
a.查找:根据给定的名字,在符号表中查找其信息。如果该名字在符号表中不存在,则将其加入到符号表中,否则返回指向该名字的指针;
b.删除:从符号表中删除给定名字的表项。
(2)设计词法分析器(也可以使用FLEX生成词法分析器)
设计各单词的状态转换图,并为不同的单词设计种别码。将词法分析器设计成供语法分析器调用的子程序。功能包括:
a. 能够拼出语言中的各个单词;
b. 将拼出的标识符填入符号表;
c. 返回(种别码, 属性值)。
(3)语法分析与中间代码产生器(也可以使用BISON生成语法分析程序)
要求用递归下降分析法、预测分析法或SLR分析法,实现对表达式、各种说明语句、控制语句进行语法分析。
若语法正确,则输出一棵语法树。
若语法错误,要求指出出错性质和出错位置(行号)。出错处理应设计成一个出错处理子程序。-(1) Design symbol table
Determine the symbol table of organization, the general should include the name bar and bar, where the name column as a keyword. To be considered capable of storing information about the name, and the following operations can be efficiently completed:
a find: Find its information according to the name given in the symbol table. If the name does not exist in the symbol table, then it is added to the symbol table, otherwise it returns a pointer to the name of the pointer
Delete: delete the given name from the symbol table entry.
(2) design of lexical analyzer (You can also use the FLEX generate the lexical analyzer)
The design of each word in the state transition diagram, and a word design for different kind as code. The lexical analyzer is designed for the parser calls the subroutine. Features include:
a. to spell out each word in the language
b. spell identifier fill in the symbol table
c. return (other code, attribute values).
(3) syntax analysis an Platform: |
Size: 2048 |
Author:夏帆 |
Hits:
Description: SLR分析器SLR语法分析器,能求出FIRST、FOLLOW 集和构造出SLR分析表,出入一个句子,能动态演示匹配过程。(-The the SLR parser SLR parser can be obtained FIRST and FOLLOW sets and construct the SLR analysis table, and out of a sentence, dynamic presentation of the matching process. ( Platform: |
Size: 609280 |
Author:杨程 |
Hits:
Description: ,熟悉分析过程,注意在构造表2时依据“操作符运算优先级和运算符的结合率”原则解决冲突。(2)思考:如要将程序改成SLR四则运算语法分析器,应如何修改文法3为文法4(文法4应还支持减除运算)。(3)思考:要将程序改成SLR四则运算语法分析器,应如何在该程序的基础上修改、增加代码。-Familiar with the process, analysis, pay attention to in the construction of Table 2 for "with the operator priority of operations and operator of rate" principle to solve conflict. (2) think: if the program should be changed to SLR four operations should be how to modify the grammar parser, 3 to 4 (4 grammar grammar should also support the subtraction operation). (3) think: the program should be changed to SLR four operations parser, should how to modify, add the code in the program is based on. Platform: |
Size: 9216 |
Author:发电 |
Hits: