Terminal Restriction for CFGs #
This file replaces long mixed right-hand sides by rules that isolate terminals in preparation for Chomsky normal form.
Main declarations #
Intuitive embedding of symbols of the original grammar into symbols of the new grammar's type
Equations
Instances For
Intuitive embedding of strings of the original grammar into strings of the new grammar's type
Equations
Instances For
Embedding of symbols of the original grammar into nonterminals of the new grammar
Equations
Instances For
Embedding of strings of the original grammar into nonterminal (symbol) strings of the new grammar
Equations
Instances For
Projection from symbols of the new grammars type into symbols of the original grammar
Equations
Instances For
Projection from strings of the new grammars type into strings of the original grammar
Equations
Instances For
Computes rules r' : T -> t, for all terminals t occuring in r.output
Equations
- One or more equations did not get rendered due to their size.
Instances For
If r.output is a single terminal, we lift the rule to the new grammar, otherwise add new rules
for each terminal symbol in r.output and right-lift the rule, i.e., replace all terminals with
nonterminals
Equations
- One or more equations did not get rendered due to their size.
Instances For
Compute all lifted rules
Equations
Instances For
Construct new grammar, using the lifted rules. Each rule's output is either a single terminal or only nonterminals