Lexer test framework