flowchart TD
  A[GRL Parser] -->|语法错误| D[Diagnostic]
  B[Semantic Analyzer] -->|类型/单位/引用/IO/后处理错误| D
  C[KDL WASM] -->|IK/限位/奇异/轨迹错误| D
  E[Post Processor] -->|不支持或近似转换| D

  D --> F{severity}
  F -->|error| G[阻止编译或进入 alarm/hold]
  F -->|warning| H[允许继续但写入报告]
  F -->|info| I[写入 trace 或调试信息]

  D --> J[sourceMap]
  J --> J1[GRL file/line/column]
  J --> J2[pathId/pathPointId]
  J --> J3[operationId]
  J --> J4[brandSource]
