Buffered canonical LR machine #
This file is the concrete finite-control compilation of the canonical LR
table. Its input alphabet is Option T: some a encodes an ordinary terminal
and none is a consumed right endmarker. The machine keeps a positive fixed
lookahead buffer in its control, so EOF-only reductions never need to test raw
input exhaustion.
Finite cursor used while popping the right-hand side of a reduction.
Equations
Instances For
Instances For
Instances For
Equations
- CF_grammar.LRk.Buffered.fullCursor G r = ⟨r, ⟨(CF_grammar.LRk.ruleAt G.augment r).2.length, ⋯⟩⟩
Instances For
Instances For
Finite control of the marked-input LR machine.
- load {T : Type} [Fintype T] {G : CF_grammar T} {k : ℕ} (count : Fin (k + 1)) (buffer : Lookahead T k) : Control G k
- parse {T : Type} [Fintype T] {G : CF_grammar T} {k : ℕ} (kernel : KernelState G k) (buffer : Lookahead T k) : Control G k
- refill {T : Type} [Fintype T] {G : CF_grammar T} {k : ℕ} (kernel : KernelState G k) (buffer : Lookahead T k) : Control G k
- pop {T : Type} [Fintype T] {G : CF_grammar T} {k : ℕ} (cursor : ReductionCursor G) (buffer : Lookahead T k) : Control G k
- accept {T : Type} [Fintype T] {G : CF_grammar T} {k : ℕ} : Control G k
- reject {T : Type} [Fintype T] {G : CF_grammar T} {k : ℕ} : Control G k
Instances For
Equations
- One or more equations did not get rendered due to their size.
Stack symbols are saved raw canonical kernels; none is the permanent
bottom marker.
Equations
Instances For
Equations
Kernel represented by a stack top, interpreting the bottom marker as the initial kernel.
Equations
Instances For
Initial buffered control. The positive-lookahead machine starts with an all-EOF scratch buffer and overwrites it from left to right.
Equations
Instances For
Input-reading transitions. Only preload and refill controls read the marked input; all parser operations are epsilon moves over already buffered symbols.
Equations
- One or more equations did not get rendered due to their size.
- CF_grammar.LRk.Buffered.inputTransition G k hk q x Z = none
Instances For
Epsilon transitions implementing table actions and finite reduction pops.
Equations
- One or more equations did not get rendered due to their size.
- CF_grammar.LRk.Buffered.epsilonTransition G k hk q Z = none
Instances For
The concrete DPDA recognizing the explicitly endmarked canonical parser language.
Equations
- One or more equations did not get rendered due to their size.