Antlr runtime

Posted 6 years ago by Avatar brent ridenour
Im having a problem with the antlr sytax highlighting. When I link my lexer and parser into the project, and then I reference the antlr.runtime.dll that I am using, and then I compile the app, with the actipro syntax editor, i get this error:

Could not load file or assembly 'Antlr3.Runtime, Version=, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Antlr3.Runtime, Version=, Culture=neutral, PublicKeyToken=3a9cab8f8d22bfb7"}

For one reason or another, the syntax editor is expecting a different version of the runtime. So I search my program files for this version. This version appears to exist in C:\Users\...\Documents\Actipro Software\WPFStudio\v11.1.0545\AntlrIntegration\ReferencedAssemblies

Ok, so I copy this version of the runtime to my project and build. but then my lexer and parser do not build. This version of the runtime is missing a number of classes. First error that I get: the type or namespace GrammarRuleAttribute cannot be found.....

This is apparently a problem noticed before :

(see last two entries .... ) The classes are in the source, but not in some of the distributed dll's. My problem is, for whatever reason, I cannot use my copy of the runtime, and your copy is missing these classes. How do I fix this?


Comments (3)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Brent,

In 2011.2 we updated from ANTLR 3.1.3 to 3.4.1. Perhaps try getting the latest SyntaxEditor and thus it will be linked to a newer ANTLR runtime version than before. Maybe that will solve your problems?

Actipro Software Support
Posted 6 years ago by brent ridenour
Yeah, I guess my only suspicion here is that I only bought your software like 4 months ago, so unless you have updated it since then....

The thing I dont get is why I cant link in a different assembly. Its almost as if your syntax editor is expecting a particular version. I can link in a different version and it compiles, it just fails when it hits your code.....

Do you have a copy of the antlr runtime that meets the required version and has all the appropriate classes in it?
Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Brent,

Yes, when 2011.2 was released (a month or two ago) we updated to the latest ANTLR runtime for that. There were numerous breaking changes in the ANTLR runtime from the earlier version too, which we had to make code updates on our end to accommodate.

I believe the ANTLR runtime we package with 2011.2 and reference is the latest available on their web site.

Actipro Software Support
Information The latest build of this product (2018.1 build 0671) was released 10 days ago, which was after the last post in this thread.

Add a Comment

Please log in to a validated account to post comments.