def output(s, include_position=True, schema_name="<STR_LIT>"):
p = Parser()<EOL>m = MapfileToDict(include_position=include_position)<EOL>ast = p.parse(s)<EOL>logging.debug(ast.pretty())<EOL>d = m.transform(ast)<EOL>logging.debug(json.dumps(d, indent=<NUM_LIT:4>))<EOL>v = Validator()<EOL>errors = v.validate(d, schema_name=schema_name)<EOL>logging.error(errors)<EOL>pp = PrettyPrinter(indent=<NUM_LIT:0>, newlinechar="<STR_LIT:U+0020>", quote="<STR_LIT:'>")<EOL>s = pp.pprint(d)<EOL>logging.debug(s)<EOL>assert(len(errors) == <NUM_LIT:0>)<EOL>return s<EOL>
Parse, transform, validate, and pretty print
the result