如何使 ANTLR 3 在 VS 2010 中工作?
有人可以逐步指导我如何在 VS2010 中安装 ANTLR 3,然后将语法添加到项目中,以便每次更改项目时它都会生成词法分析器和解析器吗?
Can someone instruct me step by step how to install ANTLR 3 in VS2010, then add grammar to a project so it will generate lexer and parser every time I make a change to a project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是别人推荐的VS插件,但我使用的是Visual Studio 11,所以我自己没有尝试,
http://visualstudiogallery.msdn.microsoft.com/25b991db-befd-441b-b23b-bb5f8d07ee9f
我在开源项目中使用的方法(http://code.google.com/p/sharpsnmplib/source/detail?r=aab9a1e314a3e9044047f9bee663c2e89952c142)正在使用MSBuild目标文件,(如果您熟悉MSBuild,则可以使用这个)。
http://www.antlr.org/pipermail/antlr- interest/2009-November/036594.html
更新:我个人写了一些关于如何在 C#/.NET 上使用 ANTLR 的文章,
https://docs.lextudio.com/blog/tags/antlr/
这可以帮助你很快就能上手。
This is a recommended VS addon by others, but I am using Visual Studio 11, so I did not try it out myself,
http://visualstudiogallery.msdn.microsoft.com/25b991db-befd-441b-b23b-bb5f8d07ee9f
The approach I used for my open source project (http://code.google.com/p/sharpsnmplib/source/detail?r=aab9a1e314a3e9044047f9bee663c2e89952c142) is using the MSBuild target file, (if you are familiar with MSBuild, you can use this).
http://www.antlr.org/pipermail/antlr-interest/2009-November/036594.html
Update: I personally wrote some posts about how to use ANTLR on C#/.NET,
https://docs.lextudio.com/blog/tags/antlr/
which can help you get started quickly.