Almost fully reentrant parser and lexer.