Pre-parse hook. The context-only form preserves the original Rust API;
WithInstance exposes the owning parser and caller metadata carried by
the canonical callback contract.
One unquoted-text modifier in declaration order. The value-only form is
convenient for pure serialized hooks; the imperative form exposes the
same live lexer/config state as the canonical ValModifier and also hands
Rust callers explicit rule/context references instead of hiding them on
the lexer object.
The largest options.rule.history a rule’s links honour. Every
replace and push copies up to history snapshots, so the bound is
the cost of each link: capped, a parse stays linear in its length
whatever the bound, where a bound as long as the sequence copied
1 + 2 + … + N snapshots. Sixteen is five times the deepest walk the
fleet reads (three hops), and the largest bound measured faster than
no bound at all: over 300,000 array items a release build took 2.2 s
at 16 and 2.8 s unbounded, 3.3 s at 32 and 6.2 s at 64
(doc/rule-history-bound.md). A grammar that asks for more is
refused; a larger value set on RuleOptions::history directly is
read as this, and Some(0) as 1.
Effect-based custom lexer matcher used by serialized options.lex.match
entries. The returned token must consume a non-empty prefix of the
remaining source.