Lines Matching defs:parser

106 parser = argparse.ArgumentParser(
108 parser.add_argument('version', metavar='VERSION',
110 parser.add_argument('cparser_tar', metavar='CPARSER_RELEASE',
111 type=str, help='Tarball to the C parser release.')
112 parser.add_argument('isabelle_tar', metavar='ISABELLE_TARBALL',
114 parser.add_argument('-b', '--browse', action='store_true',
116 parser.add_argument('-o', '--output', metavar='FILENAME',
118 parser.add_argument('--dry-run', action='store_true',
120 parser.add_argument('-t', '--test', action='store_true', default=False,
122 parser.add_argument('--no-cleanup', action='store_true',
124 parser.add_argument('-r', '--repository', metavar='REPO',
126 parser.add_argument('--archs', metavar='ARCH,...',
129 args = parser.parse_args()
143 parser.error("Could not determine repository location.")
153 # Ensure C-parser exists, and looks like a tarball.
155 parser.error("Expected a path to the C parser release tarball.")
160 parser.error("Expected a path to the official Isabelle release.")
298 # Extract the C parser
299 print("Extracting C parser...")
300 # We want to mix the C parser directory structure around a little.
304 # The C parser uses mllex and mlyacc to generate its grammar. We build
306 print("Generating C parser grammar files...")
307 subprocess.check_call(['make', 'c-parser-deps'],
308 cwd=os.path.join(c_parser_working_dir, "src", "c-parser"))
309 shutil.move(os.path.join(c_parser_working_dir, "src", "c-parser"),
310 os.path.join(target_dir, "c-parser"))
312 os.path.join(target_dir, "c-parser", "README.md"))
314 os.path.join(target_dir, "c-parser", "doc", "ctranslation.pdf"))