S -> a S b | a b.
A symbol is a non-terminal iff it appears on some left-hand side;
the first rule's left-hand side is the start symbol.
Empty right-hand side (or eps / ε) is ε.
Grammophone files paste in directly.
Start from “• S”, take the closure, then form new sets by moving the dot
Each item set is a state; “moving the dot” over a symbol is a transition (and a stack push)
Shift on A → β • c γ · reduce A → β • on FOLLOW(A) · goto on A → β • B γ · accept on S •
Push state 0; look up ACTION(top, next input) until accept or error; on reduce, pop |β| states and push GOTO