2

I'm trying to build an application in C# that parses (using ANTLR) a C source file and returns me an AST with all the functions and stuff.

I did what was explained here : http://www.antlr.org/wiki/pages/viewpage.action?pageId=557075# But after doing all that when I try and compile I get the following errors: The type or namespace name 'GrammarRuleAttribute' could not be found (are you missing a using directive or an assembly reference?)

I have antlr-3.4 and antlrworks-1.4.3.jar I've used the dll that are in the \antlr-3.4\runtime\CSharp2\dist\DOT-NET-runtime-3.1.3.zip and just noticed now that they are supposed to be for ANTLR 3.1.3

What could cause my problem, I must say I'm a bit lost so many versions

Leo
  • 500
  • 5
  • 15
  • 1
    Posted here as well: http://antlr.markmail.org/message/uoe4ibquxrb7twtz – Bart Kiers Aug 11 '11 at 07:45
  • Duplicate of: http://stackoverflow.com/questions/11412684/antlr-3-4-c-sharp-the-type-or-namespace-name-grammarrule-could-not-be-found The answer given in thread Bart pointed out is of no use, I have VS Ultimate and it does not make any difference. It is not about extensions after all but simply compiling C# code. Anyway, same problem here. – greenoldman Nov 07 '12 at 20:55

1 Answers1

0

i had the same problem. using the runtime libs provided here and CSharp3 target with antlr 3.4 worked for me. the problem is that the runtime libs comming with antlr-3.4 for CSharp2 target are out of date. i did not try, but maybe building the runtime libs from source is another option that could help.