Method | Description | |
---|---|---|
CFGtoCNF ( |
||
Convert ( ) : |
Actually performs the conversion and returns a new CNF grammar based on the old grammar
|
|
GetFresh ( ) : |
||
GetProbability ( |
||
MergeProductions ( Production>.Dictionary |
||
Nullate ( |
From a production, derive a set of productions for each combination of skipping nullable nonterminals. E.g., for production S -> AbB and nullable {A, B}, we get productions S -> AbB | Ab | bB | b
|
|
RemoveExtraneousNulls ( List |
Remove <A> -> ε unless A is the start symbol
|
|
RemoveSelfLoops ( ISet |
||
RemoveUnits ( IEnumerable |
||
StepBin ( ISet |
Eliminate right-hand sides with more than 2 nonterminals
|
|
StepDel ( ISet |
Eliminate ε-rules
|
|
StepStart ( ISet |
Eliminate the start symbol from right-hand sides
|
|
StepTerm ( ISet |
Eliminate rules with nonsolitary terminals
|
|
StepUnit ( ISet |
Eliminate unit rules (e.g., <X> -> <Y>)
|
|
UnitReplacementProductions ( Production unitProduction, Dictionary |