naive hand-made lexer implemented