pegtool:通过解析表达式语法生成解析器和AST的实用程序

时间:2021-03-18 07:16:20
【文件属性】:
文件名称:pegtool:通过解析表达式语法生成解析器和AST的实用程序
文件大小:19KB
文件格式:ZIP
更新时间:2021-03-18 07:16:20
C++ 钉工具 注意:该项目正在进行中,尚无法使用。 用于C ++的PEG解析器生成器。 显着特点: 线性,高效内存的解析树 运行时生成的解析器VM API用法 const char grammarSpec[] = R"( Example <- 'foo' )" ; peg::Grammar grammar; grammar.parse(grammarSpec); peg::Module module; // <- Stores code for the VM to execute. module.load(grammar); // <- Converts the grammar to bytecode. peg::ParseTree parseTree = module.exec( " foo bar " , sizeof ( " foo bar " ) - 1 ); // <- Invoke
【文件预览】:
pegtool-main
----pegtool_test.cpp(5KB)
----tests()
--------missing_right_arrow()
--------invalid_def_name()
--------literal_expr()
--------missing_expr_after_right_arrow()
----.clang-format(4KB)
----pegtool.h(7KB)
----.gitignore(6B)
----CMakeLists.txt(931B)
----README.md(669B)
----pegtool.cpp(32KB)

网友评论