Enhanced lexer identification