Ejemplo n.º 1
0
def gen_quals(src,flags):
  bname = src[:-3]
  (fname,qname,hname) = (bname+".ml", bname+".quals", bname+".hquals")
  os.system("rm -f %s" % qname)
  files = []
  if os.path.exists(hname):
    files += [hname]
  if not "-bare" in flags:
    files += [d_pats]

  # TODO: Ensure that these files get deleted?
  (handle, tname) = tempfile.mkstemp()
  os.close(handle)
  (handle, tname2) = tempfile.mkstemp()
  os.close(handle)
  del handle

  common.cat_files(files, tname)
  gen  = ("%s %s -summarize" % (solve, flags)).split()
  succ = common.logged_sys_call(gen + [tname2, fname], False)
  if succ == 0:
    split= ("%s/depsplit %s %s %s" % (path, tname, tname2, qname)).split()
    common.logged_sys_call(split, True)
  return succ
Ejemplo n.º 2
0
Archivo: c2html.py Proyecto: 8l/csolve
def main(base):
  (vt, tt, et) = gen_annot_tables(base)
  gen_jscript(base, vt, tt, et)
  format_code(base, et)
  common.cat_files([template_html, base + prefix, base + suffix], base + ".out.html")