antlr c# errors when integrating into VS2008

心已入冬 提交于 2019-12-12 18:23:38

问题


I am following the tutorial at: http://www.antlr.org/wiki/pages/viewpage.action?pageId=557075

When I get to step 11, compile with VS I am getting the following:

Error The type or namespace name 'AstParserRuleReturnScope' could not be found
Error The type or namespace name 'GrammarRule' could not be found
Error The type or namespace name 'GrammarRuleAttribute' could not be found
etc.

Any tips from anyone? There is little to no documentation to help me here.

Thanks!


回答1:


Use ANTLRWorks 1.4 to generate the code if you are using the compiled runtime dlls. Otherwise, if you use the latest version of ANTLRWorks I believe you need to get the latest version of the runtime and compile it.




回答2:


You most likely just need a more recent version of the ANTLR .NET runtime. The latest version can be found at: http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases

ANTLR version 3.4.1 has been working for me with ANTLRWorks 1.4.3 parsers & lexers; before upgrading the runtime, I was getting the same errors as you.



来源:https://stackoverflow.com/questions/7614953/antlr-c-sharp-errors-when-integrating-into-vs2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!