Pascal generator and test - implementation part.