Next: Parsing
Up: Contextfree grammars
Previous: Elimination of left recursion
Left factoring is another useful grammar transformation used in parsing.
The general ideal is to replace the productions
where
 A, A' are nonterminals,

,,...,
are strings of symbols with
,
 represents all alternatives for Aproductions that do not start with .
Example 13
Let us consider the following grammar:
By left factoring we obtain
Next: Parsing
Up: Contextfree grammars
Previous: Elimination of left recursion
Marc Moreno Maza
20041202