Description: 否符合while语句的文法,或者能不能通过文法的开始符号推导出该语句。
(2) 该程序应该包括词法分析器,能对输入的语句进行词法分析,然后再对输出结果。词法分析器应能识别关键字,标示符,常量,操作符等。
(3) 该程序的语法分析器能对输入的语法进行分析,判断输入语句能否满足while循环语句的文法。通过简单优先的方法对语句进行分析,看能否能归约到文法的开始符号。
(4) 该程序的语义分析器就是对分析结果进行输出,要求输出结果是三地址形式的。-Compliance with the statement while the grammar, or to the beginning of grammar symbols can not be derived from the statement. (2) The program should include the lexical analyzer, the statement can be carried out input lexical analysis, and then output the results. Lexical analyzer should be able to identify the keywords, identifiers, constants, operators and so on. (3) parser of the program can analyze the syntax of input to determine whether the input statement to meet the loop while the grammar. Priorities through a simple statement of the method of analysis to see whether it can reduce to the beginning of grammar symbols. (4) the program analyzer is the semantic analysis of the results of the output requirements of the output is three-address form. Platform: |
Size: 60416 |
Author:李伟霞 |
Hits: