Factorization
A
x
y1
A
x
yn
…
A
x
y1
x
yn
…
A’
A’
Example:
<stat> ® write id
<stat> ® write int
Illustration:
Idea: Replace rules of the form
A ® xy1,  A ® xy2 , … , A ® xyn with
A  ® xA’, A’ ® y1, A’ ® y2 , … , A’ ® yn,
where A’ is a new nonterminal
A
<stat>  ® write <item>
<item> ® id
<item> ® int
12/57