![]() |
1
2
恐怕没有这样的语法。之前有过几次尝试。Pegged示例中的PEG语法可能与您想要的最接近,但已有五年没有更新,因此可能不再完全准确: https://github.com/PhilippeSigaud/Pegged/blob/master/pegged/examples/dgrammar.d
D-Grammar是最新的:
您还可以查看一些解析器: https://github.com/dlang-community/D-Scanner/ https://github.com/aBothe/D_Parser/tree/master/DParser2/Parser https://github.com/SDC-Developers/SDC/tree/master/src/d/parser https://github.com/D-Programming-Language/dmd/blob/master/src/parse.c
DDT也有一个,但我不知道在哪个源文件中:
|
![]() |
Divyat · D语言的BNF语法形式[闭口] 7 年前 |
![]() |
hiropon · 有没有办法用Dlang同时分配多个变量? 7 年前 |
![]() |
Jonathan Wilbur · 从D中的抽象类运行单元测试? 7 年前 |
![]() |
thinwybk · 如何使用D访问linux字符设备? 7 年前 |
![]() |
user3069488 · 震波。D-未定义标识符(Dlang) 8 年前 |
![]() |
Dmitry Bubnenkov · 错误:实例化模板实例时出错 8 年前 |
![]() |
Matt Smith · 正在转义对局部变量的引用 9 年前 |
![]() |
StillLearningToCode · 将字符串解析为D中的标记 10 年前 |
![]() |
Suliman · D?的TUI(文本用户界面)? 10 年前 |