A Better Way to Model GrammarReframing grammar as a system of references and invariants rather than a collection of rules and labels.