You'd probably have been better off giving it a basic summary of OpenSCAD grammar and asking for a C or Python program to emit the code.