A simple buffer stack parser