The finite canonical viable-prefix automaton #
Starting from the augmented kernel, scanKernel follows canonical goto edges
over a grammar-symbol prefix. Actions are taken from its epsilon closure. The
main theorem here is the soundness half of the viable-prefix theorem: every
item reached after scanning gamma is semantically valid at gamma.
Raw canonical kernel after scanning a grammar-symbol word. Closure is
performed by goto before every dot advancement, and once more when the state
is inspected.
Equations
Instances For
noncomputable def
CF_grammar.LRk.itemState
{T : Type}
[Fintype T]
(G : CF_grammar T)
(k : ℕ)
(gamma : List (symbol T G.augment.nt))
:
The closed canonical item state after scanning gamma.
Equations
- CF_grammar.LRk.itemState G k gamma = CF_grammar.LRk.closure G.augment k (CF_grammar.LRk.scanKernel G k gamma)
Instances For
@[simp]
@[simp]
theorem
CF_grammar.LRk.scanKernel_append
{T : Type}
[Fintype T]
(G : CF_grammar T)
(k : ℕ)
(gamma delta : List (symbol T G.augment.nt))
:
@[simp]