Interns a terminal in first-appearance order.
Adds one variable, preserving source identities and its introduction role.
Interns a production after checking every referenced index against this builder.
Copies one snapshot; later additions to the builder leave that snapshot unchanged.
Builds immutable grammar snapshots with interned terminals, right sides and productions.