working extremely simple implementation of the lexer