Simple lexer and parser API