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!

Tizz
  • 820
  • 1
  • 15
  • 31
  • Post the class your working with because the errors you are getting is because you didn't add the reference to the solution. – Security Hound Sep 30 '11 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 Sep 30 '11 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: http://www.devincook.com/goldparser/ – 0xDEADBEEF Oct 04 '11 at 17:44

2 Answers2

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.

Bernadette
  • 69
  • 4
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.

Todd Schiller
  • 476
  • 7
  • 17