Table-driven lexer for Erlang