lexer implementation finish (not tested completly yet)