Given a port or a string, the parse procedure parses the given text, and returns a list of mini-ML module definitions.