2

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!

3
  • Post the class your working with because the errors you are getting is because you didn't add the reference to the solution. Commented Sep 30, 2011 at 20:03
  • Which class are you referring to? I added references to the project in step 2, and added the .g and both .cs files to the project in steps 6 and 10. I edited nothing.
    – Tizz
    Commented Sep 30, 2011 at 20:56
  • you may also try another parser-system. i prefer the GOLD-Parser-System. its easier to learn, comes with a better IDE, does not cause many problems when integrating it, runs faster and there are more than 1 engine for C#/.NET available: devincook.com/goldparser
    – 0xDEADBEEF
    Commented Oct 4, 2011 at 17:44

2 Answers 2

0

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.

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.