left factoring in Compiler design

It is factoring out prefixes which are commom in two productions .
It is simillar to left recursion but here a factor of string is considered rather than single term.
S-iES/iESpq/a
E-b
After left factoring
S-iES'/a
S'-pq/episilion
E-b

No comments:

Post a Comment