defined by
From the first step of the construction in Theorem 6.3, we find that the nullable
variables are A, B, C. Then, following the second step of the construction, we get
Removing Unit-Productions
As we have seen in Theorem 5.2, productions in which both sides are a single
variable are at times undesirable.
Definition 6.3
Any production of a context-free grammar of the form
A → B,
where A, B ∈ V, is called a unit-production.
To remove unit-productions, we use the substitution rule discussed in
Theorem 6.1. As the construction in the next theorem shows, this can be done if
we proceed with some care.
From the first step of the construction in Theorem 6.3, we find that the nullable
variables are A, B, C. Then, following the second step of the construction, we get
Removing Unit-Productions
As we have seen in Theorem 5.2, productions in which both sides are a single
variable are at times undesirable.
Definition 6.3
Any production of a context-free grammar of the form
A → B,
where A, B ∈ V, is called a unit-production.
To remove unit-productions, we use the substitution rule discussed in
Theorem 6.1. As the construction in the next theorem shows, this can be done if
we proceed with some care.
