parse(io)

This isn't the most sophisticated implementation in the world, but I've found it handy.