Commit Graph

25 Commits

Author SHA1 Message Date
d09460edfe feat: 完善编译器命令行功能 (#43)
Reviewed-on: PostGuard/Canon#43
2024-04-20 22:23:29 +08:00
0fdfef8854 misc: 删除冗余的代码 (#41)
Reviewed-on: PostGuard/Canon#41
2024-04-20 11:48:05 +08:00
Ichirinko
dbbab1c761 feat-visualization (#33)
尽管里面有点粪,但还是生成了漂亮的树,就当给树施肥了
剩下一个小问题:未考虑节点的宽度(因为名称不一样长),但目前未发现对图生成的明显影响

Co-authored-by: jackfiled <xcrenchangjun@outlook.com>
Reviewed-on: PostGuard/Canon#33
Co-authored-by: Ichirinko <1621543655@qq.com>
Co-committed-by: Ichirinko <1621543655@qq.com>
2024-04-19 14:59:45 +08:00
4b6635796c refeat: ILexer接口适配 (#38)
Co-authored-by: Huaps <1183155719@qq.com>
Co-authored-by: duqoo <92306417+duqoo@users.noreply.github.com>
Reviewed-on: PostGuard/Canon#38
2024-04-18 16:34:32 +08:00
d631a28703 test: 针对string的ISourceReader (#37)
Reviewed-on: PostGuard/Canon#37
2024-04-15 18:02:11 +08:00
792c1d44f1 fix: 求解FirstSet中没有考虑空产生式 (#36)
Reviewed-on: PostGuard/Canon#36
2024-04-13 12:37:17 +08:00
67deb0aa2c refact: 将编译中各个阶段接口化 (#35)
Reviewed-on: PostGuard/Canon#35
2024-04-12 19:01:37 +08:00
f1c569ee0e fix: 删除语法中关于单引号的定义 (#34)
Reviewed-on: PostGuard/Canon#34
2024-04-11 22:41:43 +08:00
1690187c0a feat: 将LR分析表生成到代码中 (#27)
Reviewed-on: PostGuard/Canon#27
2024-04-08 19:46:24 +08:00
5e3ea6303e refact: syntax-node (#23)
重构语法树的部分,使用单独的类来抽象不同的非终结符节点。
**同时**,将`Pascal`语法的定义从测试项目中移动到核心项目中,在项目中只维护一份对于`Pascal`语法的定义。

Reviewed-on: PostGuard/Canon#23
2024-04-07 16:47:28 +08:00
c0a8e25d45 refact: 重构类型和符号表部分 (#25)
Reviewed-on: PostGuard/Canon#25
2024-04-07 16:10:34 +08:00
Huaps
c4189fd1b2 lexical-parser (#15)
add: 词法分析器剩下数字、标识符的细节处理以及错误处理

Co-authored-by: duqoo <92306417+duqoo@users.noreply.github.com>
Reviewed-on: PostGuard/Canon#15
Co-authored-by: Huaps <1183155719@qq.com>
Co-committed-by: Huaps <1183155719@qq.com>
2024-04-04 21:25:11 +08:00
Huaps
fe35288cb5 feat: 词法分析器的基本功能(#12)
Co-authored-by: jackfiled <xcrenchangjun@outlook.com>
Reviewed-on: PostGuard/Canon#12
Co-authored-by: Huaps <1183155719@qq.com>
Co-committed-by: Huaps <1183155719@qq.com>
2024-03-15 12:00:47 +08:00
99fdd6438b add: 这就是完全的Pascal (#11)
5!8!4!个状态堂堂登场!

Co-authored-by: Ichirinko <1621543655@qq.com>
Reviewed-on: PostGuard/Canon#11
2024-03-13 23:58:06 +08:00
duqoo
c391abed48 Merge branch 'master' into ParserTest 2024-03-13 22:20:44 +08:00
duqoo
62b97aa3b6 fix:测试 2024-03-13 17:05:07 +08:00
bd3db1b7b7 feat: 添加语法分析基类抽象 (#8)
增加语法分析基类和状态转换接口抽象,为直接生成语法分析器做准备,同时也提前释放一些大对象,降低内存消耗。

Reviewed-on: PostGuard/Canon#8
2024-03-13 16:41:44 +08:00
duqoo
7ea97ea97e 添加了对部分类型的测试样例,修改添加了NumberSemanticToken 2024-03-13 16:19:07 +08:00
35aec34a8e fix: 正确处理含有空产生式的语法 (#6)
Reviewed-on: PostGuard/Canon#6
2024-03-12 14:52:42 +08:00
Ichirinko
7de5ce8f28 add:增加了包含空产生式的测试用例 (#2)
增加了包含空产生式的测试用例

Co-authored-by: jackfiled <xcrenchangjun@outlook.com>
Reviewed-on: PostGuard/Canon#2
Co-authored-by: Ichirinko <1621543655@qq.com>
Co-committed-by: Ichirinko <1621543655@qq.com>
2024-03-11 22:22:53 +08:00
315deaabf2 add: 抽象语法树节点 (#5)
fix:
- Expression格式化过程中如果Pos在最右边就不显示
- Expression中不考虑Pos

Reviewed-on: PostGuard/Canon#5
2024-03-11 21:57:47 +08:00
9930dbc42c feat: 对输入的记号流进行分析 (#4)
添加了语法分析中各个重要状态类的`ToString`方法,方便调试

Reviewed-on: PostGuard/Canon#4
2024-03-11 19:33:02 +08:00
ff0b183f4f add: Grammar builder test with a simple gramma. 2024-03-10 19:05:28 +08:00
58da63e41a add: Terminator Tests 2024-03-10 12:06:27 +08:00
e92b02a208 add: DelimiterSemanticToken and tests 2024-03-09 21:44:37 +08:00