Description: 条件语句的语法分析及语义分析程序设计
利用 LL(1)法完成对语句 IF 〈布尔表达式〉 THEN 〈赋值语句〉 ELSE 〈赋值语句〉;的语法分析及语义分析。中间代码选用四元式表示。-Conditional statements syntax analysis and semantic analysis procedures for the design of the use of LL (1) method to complete the statement IF <Boolean expression> THEN <assignment> ELSE <assignment statement> syntax analysis and semantic analysis. Selection of intermediate code quaternion type that. Platform: |
Size: 405504 |
Author:苹果 |
Hits:
Description: 通过设计,编制,调试一个语法及语义分析程序,加深对语法及语义分析原理的理解。
IF 〈布尔表达式〉 THEN 〈赋值语句〉 ELSE 〈赋值语句〉
其中
(1)、可以选择递归下降法、LL(1)、算符优先分析法、LR法完成以上任务,中间代码选用四元式。
(2)、 写出符合分析方法要求的文法,给出分析方法的思想,完成分析程序设计。
(3)、 编制好分析程序后,设计若干用例,上机测试并通过所设计的分析程序。
目 录
一.系统需求分析
二.概念模型设计
三.逻辑模型设计
四.物理模型设计
五.实验结果分析
六.心得体会
七.源代码-By designing, developing, debugging a syntax and semantic analysis procedures, better understanding of the syntax and semantic analysis to understand the principle.
IF <Boolean expression> THEN <assignment> ELSE <assignment statement>
Which
(1), recursive descent method to choose, LL (1), priority analysis operator, LR Law on the above tasks, choice of intermediate code quaternion type.
(2), write in line with the requirements of analysis grammar, the idea of analytical methods are given to complete the analysis of program design.
(3), a good analysis of the preparation process, the design of a number of use cases, and through the test analysis program designed Platform: |
Size: 488448 |
Author:aden |
Hits: