committing what i think is the final version of the lexer(probably wrong)