Switched to using a reentrant lexer and parser