implementing lexer generator