06-03-recursive-descent-parsing-annotated

06-03-recursive-descent-parsing-annotated

ID:39713735

大小:556.58 KB

页数:16页

时间:2019-07-09

06-03-recursive-descent-parsing-annotated_第1页
06-03-recursive-descent-parsing-annotated_第2页
06-03-recursive-descent-parsing-annotated_第3页
06-03-recursive-descent-parsing-annotated_第4页
06-03-recursive-descent-parsing-annotated_第5页
资源描述:

《06-03-recursive-descent-parsing-annotated》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、CompilersRecursiveDescentParsingAlexAikenRecursiveDescent•Theparsetreeisconstructed–Fromthetop1–Fromlefttorightt3t2947•Terminalsareseeninorderofappearanceinthetokenstream:ttt568t2t5t6t8t9AlexAikenRecursiveDescent•ConsiderthegrammarET

2、T+ETint

3、int*T

4、(E)•Tokenstreamis:(int5)•Start

5、withtop-levelnon-terminalE–TrytherulesforEinorderAlexAikenRecursiveDescentET

6、T+ETint

7、int*T

8、(E)E(int)5AlexAikenRecursiveDescentET

9、T+ETint

10、int*T

11、(E)ET(int)5AlexAikenRecursiveDescentET

12、T+ETint

13、int*T

14、(E)ETMismatch:intdoesnotmatch(intBacktrack…(int)5AlexAikenRecursiveDescentET

15、

16、T+ETint

17、int*T

18、(E)ET(int)5AlexAikenRecursiveDescentET

19、T+ETint

20、int*T

21、(E)ETMismatch:intdoesnotmatch(int*TBacktrack…(int)5AlexAikenRecursiveDescentET

22、T+ETint

23、int*T

24、(E)ET(int)5AlexAikenRecursiveDescentET

25、T+ETint

26、int*T

27、(E)ETMatch!Advanceinput.(E)(int)5AlexAikenRecursiveDescentE

28、T

29、T+ETint

30、int*T

31、(E)ET(E)(int)5AlexAikenRecursiveDescentET

32、T+ETint

33、int*T

34、(E)ET(E)T(int)5AlexAikenRecursiveDescentET

35、T+ETint

36、int*T

37、(E)ETMatch!Advanceinput.(E)T(int)5intAlexAikenRecursiveDescentET

38、T+ETint

39、int*T

40、(E)ETMatch!Advanceinput.(E)T(int)5intAlexAikenRecursiveDescentET

41、

42、T+ETint

43、int*T

44、(E)ETEndofinput,accept.(E)T(int)5intAlexAikenChoosethederivationthatisavalidrecursivedescentERecursiveDescentparseforthestringid+idinthegivengrammar.MovesE’thatarefollowedbybacktrackingaregiveninred.-E’EE’

45、E’+EidE(E)E’-E’

46、id

47、(E)E’E’+EE’+E-E’+Eid+Eid+Eid+E’Eid+E’

48、id+idE’id+-E’idid+idE’+EEid+EE’+Eid+E’id+Eid+idid+E’id+id

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
相关文章
更多
相关标签