lexer_generator implementation for EncodingLexer