Compiler Design 20mss003
Compiler Design 20mss003
Recursive descent
parsing
Subject:COMPILER DESIGN
ROLL NO:20MSS003
Top-Down Parsing
The grammar:
• S->cAd
• A->ab|a
Input Word (w)=cad.
Problems with Top-down Parsing
Ex:
Consider the grammar,
S->i C t S | i C t S e S | a
C ->b
Left-factoring this grammar will yield
S->i C t S S’ | a
S’->e S | ϵ
C ->b