Removal of Lambda Productions

The removal of lambda productions involves two steps:

  1. Finding variables that derive lambda
  2. Modifying the grammar to remove the lambdas

Each step must be done in order. Below is a picture of the lambda production removal window:

NOTE: In the grammar listboxes, lambda is represented as the character "Ø"

Step 1: Finding variables that derive lambda
The variables that derive lambda are the variables that have lambda on the right side of their productions. Input these variables into the input field separated by commas or spaces. Then, press "Check" to verify that it is correct. If you want to see the correct answer press "Show".

Step 2: Modifying the grammar to remove the lambdas
Modifying the grammar involves removing and adding new productions. In the left pane, the grammar that is being modified is shown. In the right pane, the initial grammar is provided for refrence. Four operations can be performed when modifying a grammar:

Removing lambda productions involves removing the productions that derive lambda, then adding new productions that exclude the productions that produce lambda. For example, if a grammar contained the rules:

A->Ø
B->cAd

Then you would remove A->Ø and add B->cd.

Step 3: Continuing
To continue on to the next transformation press the "Next Transformation" button. If you want to parse the grammar to see the derivation of an acceptance string then press the "Parse" button.