《递归下降分析 (32).ppt》由会员分享,可在线阅读,更多相关《递归下降分析 (32).ppt(2页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
CompilerS1Problems with Recursive-Descent1.It may be difficult to convert a grammar into EBNF.2.It may be difficult to distinguish two or more grammar rule options A|,if both and begin with nonterminals.(First set)3.A .It may be necessary to know what token can come after the nonterminal A.(Follow set)CompilerS2Homeworko4.2 Given the grammar A (A)A|,write pseudocode to parse this grammar by recursive-descent.o4.3 Given the grammaroWrite pseudocode to parse this grammar by recursive-descent.statement assign-stmt|call-stmt|otherassign-stmt identifier:=expcall-stmt identifier(exp-list)