feat: DB管线补全 + 新增orchestrator_db/program_schema/to_sql + 清理临时脚本

This commit is contained in:
hangshuo652
2026-07-11 14:55:52 +08:00
parent 40e8a50ab4
commit af37e33b98
32 changed files with 3232 additions and 255 deletions
+9 -2
View File
@@ -90,8 +90,15 @@ def _convert_node(node: BranchNode, parent: BrSeq):
if c.kind == "WHEN":
cond = (c.branch_names or [""])[0]
cond = cond[5:-1] if cond.startswith("WHEN(") and cond.endswith(")") else cond
# Strip trailing body text (everything after first COBOL verb)
cond = cond.split()[0] if cond.split() else cond
# Strip trailing body text at first COBOL verb
for verb in ('DISPLAY', 'MOVE', 'ADD', 'SUBTRACT', 'MULTIPLY', 'DIVIDE', 'COMPUTE',
'STRING', 'UNSTRING', 'SET', 'INSPECT', 'INITIALIZE', 'CONTINUE',
'PERFORM', 'CALL', 'EXIT', 'GOBACK', 'STOP',
'READ', 'WRITE', 'DELETE', 'REWRITE', 'ACCEPT', 'OPEN', 'CLOSE'):
idx = cond.upper().find(f' {verb} ')
if idx >= 0:
cond = cond[:idx].strip()
break
ws = BrSeq()
for wc in c.children: _convert_node(wc, ws)
if cond.upper() == "OTHER":