Terminal leaves in copy-on-write overlay mode #
A terminal leaf never consumes an inherited flag. Since a nonempty overlay exposes at least one visible flag, the overlay interface is vacuous for terminal parses.
theorem
IndexedGrammar.Aho.overlayScheduleRun_terminal_false
{T : Type}
{g : IndexedGrammar T}
[Fintype g.nt]
{A : g.nt}
{stack : List g.flag}
{a : T}
{r : IRule T g.nt g.flag}
(hr : r ∈ g.rules)
(hlhs : r.lhs = A)
(hc : r.consume = none)
(hrhs : r.rhs = [IRhsSymbol.terminal a])
:
OverlayScheduleRun (NFParse.terminal hr hlhs hc hrhs)
A terminal parse cannot be entered with a nonempty private overlay.