a attempt of writing a simple parser