Parse off and tests

Is there a source where this pseudocode came from?