grammar -> (repo, pinned_commit) from the verified-upstream table.
()
| 121 | |
| 122 | |
| 123 | def parse_manifest(): |
| 124 | """grammar -> (repo, pinned_commit) from the verified-upstream table.""" |
| 125 | out = {} |
| 126 | with open(os.path.join(GRAMMARS, "MANIFEST.md"), encoding="utf-8") as fh: |
| 127 | for line in fh: |
| 128 | m = re.match( |
| 129 | r"^\| (\w[\w.+-]*) \| \d+ \| ([\w.-]+/[\w.-]+) \| `([^`]+)` \|", line) |
| 130 | if m: |
| 131 | out[m.group(1)] = (m.group(2), m.group(3)) |
| 132 | return out |
| 133 | |
| 134 | |
| 135 | def main(): |