A customized partial parsing helper that falls eagerly back to a full parse as soon as the new token sequence would be different from the old one. This approach allows to benefit from partial parsing whenever a token content is edited (e.g. the content of a comment, identifier or string literal) while not producing bogus lookahead information.
Mostly copied and refactored from the default implementation.