You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

7 lines
664 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## lab2主要分为3个阶段
1. [sema](/To_do_list/Sema.md)。 检查语义约束。通过修改[sem文件夹](/src/sem/Sema.cpp)中的SemaVisitor实现。具体来说SemaVisitor继承自SysYBaseVisitor类。而antlr4依据SysY.g4生成的这个SysYBaseVisitor类里面已经对各种规则比如规则compUnit实现了visitor方法比如visitCompUnit。为了达到我们的目的即检查各种语义约束我们需要利用虚函数的多态重写这个方法。具体来说这一阶段需要实现的各种约束见[SysY语义约束](/To_do_list/Sema.md)。
2. [ir](/To_do_list/ir.md)。
3. [irgen](/To_do_list/irgen.md)。