Added some interfaces for the lexer and parser to make testing possible.