Define and use a custom exception (ParseError)
Add tests for the current handling of end markers
Handle arbitrarily nested input
Don't allow extra __end__ markers
sign the agreement
Cherry-pick contributor signature from 570f351.