Vous êtes sur la page 1sur 2

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

Q2. Remove left recursion from following grammar.

I. A ABCD B C D

B BC a b c

D Da d

Q2. Remove left recursion and left factoring from following grammar.

II. S SeS SeSSe t