
We will use BNF (Backus-Naur Form) notation in the description of CFG ’s.

The syntax of a programming is described by a context-free grammar (CFG). This syntactic structure is mostly a parse tree. Syntax Analyzer gets a stream of tokens from lexical analyzer and creates the syntactic structure of the given source program. The Role of the Parser Syntax Analyzer is also known as parser. THE ROLE OF THE PARSER Lexical Analyzer Parser source program token get next token parse tree Symbol table MODULE II Role of the Parser Context Free Grammars Top down Parsing Bottom Up Parsing Operator Precedence Parsing LR Parsers SLR Canonical LR LALR Parser Generator

CS 04 605 COMPILER DESIGN Text book: Compilers,principles,techniques,and tools by Alfred V Aho,Ravi Sethi,Jeffrey D Ullman
