BottomUpParsingI教学教程幻灯片.pptx

Lecture 5Bottom-Up Parsing IBottoms Up!What is Bottom-Up Parsing?Idea: Apply productions in reverse to convert the users program to the start symbol.As with top-down, could be done with a DFS or BFS, though this is rarely done in practice.Well be exploring four directional, predictive bottom-up parsing techniques:Directional: Scan the input from left-to-right.Predictive: Guess which production should be inverted.One View of a Bottom-Up Parse EE →TE →T →T →E + Tint(E)TEEEETTTTint+(int+int+int)A Second View of a Bottom-Up ParseE →E →T →T →TE + Tint(E)???????????+ (int + int + int) (int + int + i

文档评论(0)

1亿VIP精品文档

相关文档