Antlr4 C ++目标 [英] Antlr4 C++ target

查看:110
本文介绍了Antlr4 C ++目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在启动一个项目,我们将需要在C ++应用程序中解析python源文件.我曾经使用过Antlr2来生成一些编译器,但这是我第一次使用Antlr4.

We're starting a project where we will need to parse python source files in a C++ application. I've used Antlr2 a while back to generate a few compilers, but this is the first time I'm using Antlr4.

c ++ antlr4目标似乎在​​ https://github.com/antlr/antlr4上相当活跃-cpp

It looks like the c++ antlr4 target is fairly active at https://github.com/antlr/antlr4-cpp

所以,我的问题基本上是Antlr4 C ++目标的状态,准备开始使用了吗?要使用C ++目标,什么只是获取Antlr4源,然后将Antlr4-cpp复制到此树中并进行构建?

So, my question is basically what is the status of the Antlr4 C++ target, is it ready to start being used? To use the C++ target, what just grab the Antlr4 source, and copy the Antlr4-cpp into this tree and build?

请注意,我不需要绝对稳定且保证永不更改的东西,仅需基本稳定就可以开始使用的东西,如果将来有小/中度的API更改,那就很好了,我知道看起来还很早.

Note, I don't need something that's absolutely stable and guaranteed never to change, just something thats basically stable enough to start being used, if there are small/moderate API changes in the future, thats perfectly fine, I understand that it looks fairly early.

如果antlr4-c ++目标尚未真正准备好,您建议使用哪种解析器生成器生成C ++目标python解析器?

If the antlr4-c++ target is NOT really ready, what parser generator would you recommend for generating a C++ target python parser?

谢谢

推荐答案

现在可以使用ANTLR4 C ++目标:

The ANTLR4 C++ target is now ready for use: https://soft-gems.net/the-antlr4-c-target-is-here/. Only needs some minor organizational stuff and must be merged to main repo.

这篇关于Antlr4 C ++目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆