The characteristic grammar of a deterministic pushdown automaton #
This file fixes the construction used in the DPDA-to-LR(1) direction.
First, DPDA.firstFinal marks an epsilon phase after it has left a final
state. The standard final-state-to-empty-stack conversion is then applied,
followed by the standard PDA characteristic grammar. Finally, rules which
are not fully productive are removed. Removing those rules is essential for
the LR argument: the target states guessed by the characteristic grammar must
actually be realizable by a computation.
noncomputable def
DPDA_to_LR.rawCharacteristicGrammar
{Q T S : Type}
[Fintype Q]
[Fintype T]
[Fintype S]
(M : DPDA Q T S)
:
The same characteristic grammar in Langlib's CF_grammar representation.