feat: 多轮运行 + GCOV 合并 + JSON 出力 + DesignDataGenerator

This commit is contained in:
hangshuo652
2026-07-12 21:04:58 +08:00
parent af37e33b98
commit f3be17e5eb
40 changed files with 4397 additions and 198 deletions
+4 -4
View File
@@ -653,12 +653,12 @@ def parse_file_section(source: str) -> dict:
def scan_open_statements(source: str) -> dict:
"""?? OPEN ????? {?????: 'INPUT'|'OUTPUT'|'I-O'}"""
"""Parse OPEN statements, returns {file_name: 'INPUT'|'OUTPUT'|'I-O'}.
Handles multi-line OPEN (e.g. OPEN INPUT X\\n OUTPUT Y.)."""
dirs = {}
for m in re.finditer(
r'OPEN\s+((?:INPUT|OUTPUT|I-O)\s+[\w\s-]+'
r'(?:\s+(?:INPUT|OUTPUT|I-O)\s+[\w\s-]+)*)',
source, re.IGNORECASE
r'OPEN\s+((?:INPUT|OUTPUT|I-O)\s+[\w\s-]+?)\.',
source, re.IGNORECASE | re.DOTALL
):
full = m.group(1)
full = re.sub(r'\s+', ' ', full)