Add equivalents of Parsec setState and getState, enabling a user to thread bits of state through parsers. This is necessary in situations where someone might use Racket parameters, which aren't compatible with Parsack's use of lazy and force. As a convenience, also add withState syntax, which is the analog of parameterize.
Add equivalents of Parsec
setState
andgetState
, enabling a user to thread bits of state through parsers. This is necessary in situations where someone might use Racketparameter
s, which aren't compatible with Parsack's use oflazy
andforce
. As a convenience, also addwithState
syntax, which is the analog ofparameterize
.