updated lexer

getting a runtime error:
segmentation fault: 11