[antlr-interest] C# .NET 2.0 'antlr.ASTPair' does not contain a definition for 'GetInstance' and PutInstance

Micheal J open.zone at virgin.net
Tue Feb 21 07:15:30 PST 2006


Vladimir,
 
> I am having some issue compiling the C# parser generated by antrl in 
> Visual Studio 2005.
> I have build the antlr.runtime.dll successfully and 
> referenced it in my 
> project, but for some reason I get the
> 'antlr.ASTPair' does not contain a definition for 'GetInstance' and 
> antlr.ASTPair' does not contain a definition for 'PutInstance' error.

ASTPair contained those methods in ANTLR 2.7.5. You need to process your
grammar files with the ANTLR tool in version 2.7.6 to regenerate your C#
source code files. Then reference the runtime assembly dlls from 2.7.6 in
your project.

> I have tried this with every C# examples provided. The 
> ASTPair.GetInstance() and ASTPair.PutInstance() do not seem 
> to exist in 
> the antlr.runtime.dll

That is right. They no longer exist in ANTLR 2.7.6. It's documented in the
changelog.

You seem to have an enviroment that mixes ANTLR 2.7.5 and ANTLR 2.7.6. That
won't work as you've found out.


Cheers,

Micheal


PS	What are you using ANTLR/C# for?



More information about the antlr-interest mailing list