Invert the save/restore logic within the state combinator.
Invert the save/restore logic within the state combinator.

The state combinator, given state<S,G>, currently copies the 'S'
state object, passing all the other states to its constructor,
and then passes this copy to grammar G. While this avoids
manipulating the list of states at compile time, it makes all
the other states inaccessible to G. This patch instead passes the
unmodified set of states to G, and initiates a rollback of S if
the match fails. This means state combinators can be introduced
high up in the grammar without changing custom rules further down.

nlyan/PEGTL