文件名称:diguixiajiang
介绍说明--下载内容均来自于网络,请自行研究使用
递归下降的基本思想:
为每一个非终结符构造一个子程序,每一个子程序的过程体中按该产生式的候选项分情况展开,遇到终结符直接匹配,而遇到非终结符就调用相应非终结符的子程序。该分析从调用文法开始符号的子程序开始,直到所有非终结符都展开为终结符并得到匹配为止。若分析过程中达到这一步则表明分析成功,否则表明输入中有语法错误。递归下降分析对文法的限制是不能有公共左因子和左递归。由于文法是递归定义的,因此子程序也是递归的,被称为递归下降子程序。
-The basic idea of recursive descent:
For each non-terminal construct a subroutine, each subroutine of the process of the body produced by the sub-type of candidate to undertake encountered terminator direct match, while the case of non-terminal symbol on the call to the corresponding non-terminal symbol of the subroutine. The analysis from the grammar start symbol of the subroutine call to start until all the non-terminal and launched as a terminator and get matched up. If the analysis process to achieve this step indicates that the analysis of success, or else that there is a syntax error input. Recursive descent analysis of the grammar of the restrictions can not have public left factor and left recursion. As the grammar is a recursive definition, and therefore also a recursive subroutine, known as recursive descent subprogram.
为每一个非终结符构造一个子程序,每一个子程序的过程体中按该产生式的候选项分情况展开,遇到终结符直接匹配,而遇到非终结符就调用相应非终结符的子程序。该分析从调用文法开始符号的子程序开始,直到所有非终结符都展开为终结符并得到匹配为止。若分析过程中达到这一步则表明分析成功,否则表明输入中有语法错误。递归下降分析对文法的限制是不能有公共左因子和左递归。由于文法是递归定义的,因此子程序也是递归的,被称为递归下降子程序。
-The basic idea of recursive descent:
For each non-terminal construct a subroutine, each subroutine of the process of the body produced by the sub-type of candidate to undertake encountered terminator direct match, while the case of non-terminal symbol on the call to the corresponding non-terminal symbol of the subroutine. The analysis from the grammar start symbol of the subroutine call to start until all the non-terminal and launched as a terminator and get matched up. If the analysis process to achieve this step indicates that the analysis of success, or else that there is a syntax error input. Recursive descent analysis of the grammar of the restrictions can not have public left factor and left recursion. As the grammar is a recursive definition, and therefore also a recursive subroutine, known as recursive descent subprogram.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
新建文本文档.txt