# -*- coding: utf-8 -*- """ DSL → Modal 객체 간단 변환기 - 목적: 선언적 구조(의례/임계/스크롤)를 코드/파일로 현현화하는 흐름을 증명 - 배경: Flamehaven DSL 3.0 설계(디렉토리/파서/패널/CI) 개념의 축약 구현 """ import yaml, json, os def parse(yaml_path: str, out_json="modal.json"): with open(yaml_path, 'r', encoding='utf-8') as f: cfg = yaml.safe_load(f) with open(out_json, 'w', encoding='utf-8') as f: json.dump(cfg, f, ensure_ascii=False, indent=2) print(f"[DSL] parsed -> {out_json}") if __name__ == "__main__": os.makedirs("build", exist_ok=True) parse("dsl/modal_peicm.yaml", "build/modal.json")