Use mutable parser state

No longer pass around the current character. This greatly simplifies the code.