@@ -0,0 +1,998 @@
+#!/usr/bin/env/python%0A%0Aimport sys%0Aimport os.path%0Aimport subprocess%0A%0A%0A# Read in a pml file and save to an xml file%0Adef translate_pml_file(xml_file, pml_file):%0A%0A    pml_path = os.path.abspath(pml_file.name)%0A    xml_path = os.path.abspath(xml_file.name)%0A%0A    # Call XML generator%0A    return_code = subprocess.call(%22Pmlxml %25s %25s%22 %25 (xml_path, pml_path), shell=True)%0A    if return_code != 0:%0A        print %22Error occured reading PML file, exiting.%22%0A        sys.exit(1)%0A%0A%0Adef main():%0A    import argparse%0A    parser = argparse.ArgumentParser(description=%22Program to output the ast of a PML program in XML format%22)%0A    parser.add_argument('-x', '--xml', required=True, type=file, help=%22Output abstract syntax tree in XML format%22)%0A    parser.add_argument('-p', '--pml', required=True, type=file, help=%22Input PML file%22)%0A%0A    try:%0A        args = parser.parse_args()%0A        translate_pml_file(args.xml, args.pml)%0A    except IOError, msg:%0A        parser.error(str(msg))%0A%0A%0Aif __name__ == %22__main__%22:%0A    main()%0A

Add program to convert from PML to XML