Professional Documents
Culture Documents
Tutorial 2 Compiler Design: DATE-10/02/16 TIME:11:10
Tutorial 2 Compiler Design: DATE-10/02/16 TIME:11:10
TUTORIAL 2
COMPILER DESIGN
Q1. Calculate Follow_set and First_set of Following Grammar.
I. A BaBaCad
B Aac Ac
II. A BCD
B AC
III. A aEBC
B cd eCe
C Ab
IV. S iETeS
E eTTE
T abc
V. S ABae
A aAb c
B Sa a
VI. E TE
E + TE
T FT
T * FT
F id
I. A ABCD B C D
B BC a b c
D Da d
Q2. Remove left recursion and left factoring from following grammar.