[antlr-interest] Strange bug in ANTLR under .Net

Micheal J open.zone at virgin.net
Mon Oct 17 17:27:11 PDT 2005


This sounds like .NET assembly loading behaviour (I think).
 
1. Make sure your program references the ANTLR dll
2. Load/instantiate a type from the ANTLR dll before your app uses ANTLR,
this ensure the assembled is loaded.
 

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of johnny_job at rambler.ru
Sent: 17 October 2005 14:25
To: antlr-interest at antlr.org
Subject: [antlr-interest] Strange bug in ANTLR under .Net



Hello all!

            I have found strange problem with ANTLR for .Net. I have .Net
application that uses ANTLR (this application works under IIS, more exactly
- under Sharepoint Portal Server 2003). And sometimes ANTLR fails with the
following error message:

Unable to load AST Node Type: 'antlr.CommonAST'

  at antlr.ASTFactory.loadNodeTypeObject(String nodeTypeName) in
d:\temp\cvstemp\utils\src\antlr\src\antlr\astfactory.cs:line 582

            I found quick workaround for this problem - seems that sometimes
assembly antlr.runtime.dll doesn't belong to collection returned by
AppDomain.CurrentDomain.GetAssemblies() method. So my quickfix consist in
adding this assembly (AppDomain.Current.GetExecutingAssembly()) to this
collection.

But I changed source code of ANTLR (method loadNodeTypeObject() in the
ASTFactory class), so I want to know: is it a bug of ANTLR or not? If it is,
ANTLR should be changed to implement fix for this bug.

 

Ivan A. Gusev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20051018/b54776ee/attachment.html


More information about the antlr-interest mailing list