(path, subcmd, *args, filename=None, **kwargs)
| 23 | subprocess.run(("ucd-generate", subcmd, ucd) + args, check=True, **kwargs) |
| 24 | |
| 25 | def generate_file(path, subcmd, *args, filename=None, **kwargs): |
| 26 | if filename is None: |
| 27 | filename = subcmd.replace('-', '_') + ".rs" |
| 28 | eprint('-', filename) |
| 29 | with open(os.path.join(path, filename), "w") as f: |
| 30 | generate(subcmd, *args, stdout=f, **kwargs) |
| 31 | |
| 32 | eprint('generating regex-syntax tables') |
| 33 | path = os.path.join("regex-syntax", "src", "unicode_tables") |