Parse the begin/end of each stage from the comments

See #55.