haozixu / my-minidecaf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MiniDecaf Python 框架

依赖

  • Python >= 3.9
  • requirements.txt 里的 python 库,包括 ply 和 argparse。
  • RISC-V 运行环境(参见实验指导书)

运行

python3 main.py --input <testcase.c> [--riscv/--tac/--parse]

各参数意义如下:

参数 含义
input 输入的 Minidecaf 代码位置
riscv 输出 RISC-V 汇编
tac 输出三地址码
parse 输出抽象语法树

代码结构

About


Languages

Language:Python 100.0%Language:Shell 0.0%