Lecture 4Top-Down ParsingWhere We AreSource Code Lexical Analysis Syntax AnalysisSemantic Analysis IR Generation IR OptimizationCode GenerationMachine CodeOptimizationReview from Last TimeGoal of syntax analysis: recover the intended structure of the program. Idea: Use a context-free grammar to describe the programming language.Given a sequence of tokens, look for a parse tree that generates those tokens.Recovering this syntax tree is called parsing.Different Types of ParsingTop-Down ParsingBeginning with the start symbol, try to guess the productions to apply to end up at the users program.Bo
原创力文档

文档评论(0)