Reduction and shift candidates in canonical item states #
Complete valid items give semantic reduction candidates. A valid item whose dot precedes a terminal gives a genuine later handle whenever the remainder of its production can derive a terminal word. The latter proof follows that rightmost derivation to its final step; this is what turns an ordinary shift item into exactly the second handle required by Knuth's semantic LR(k) condition.
A complete valid item is a semantic reduction candidate.
Semantic data attached to a shift item. z is the terminal yield of the
production suffix after the shifted terminal; consequently a :: z, followed
by the item's own lookahead, is the current input lookahead.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A semantic shift item supplies a later handle in the precise form consumed
by CoreIsLRk.not_reductionCandidate_and_laterHandleCandidate.
A reduction exposed by a canonical item state.
Equations
- CF_grammar.LRk.StateReduction G k gamma u r = ∃ i ∈ CF_grammar.LRk.itemState G k gamma, i.Complete ∧ i.lookahead = u ∧ CF_grammar.LRk.ruleAt G.augment i.rule = r
Instances For
A terminal shift exposed by a canonical item state, filtered by productive
continuation and the complete k-symbol input buffer.
Equations
- One or more equations did not get rendered due to their size.
Instances For
At a canonical state and fixed lookahead, an LR(k) augmented grammar cannot both reduce and shift.
Reductions exposed by a canonical LR(k) state are unique.