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

Micheal J open.zone at virgin.net
Sun Oct 23 07:26:45 PDT 2005


> 	Sure, my program references ANTLR dll. Also, the type 
> from ANTLR is instantiated correctly, but the error occurs 
> exactly in ANTLR library (when ANTLR uses reflection tecnique)!

Ok. Strange one there.

> 	I reproduced behavior without ANTLR, and I have a test 
> application demonstrating that GetExecutingAssembly() may not 
> always be within
> AppDomain.Current.GetAssemblies() collection.

Ok. I did think it might be [an anomaly in] .NET behaviour.

> 	I'll try to discuss this behavior in .Net forums, it 
> seems to be an error, but I still don't know:
> 	a) is it an error in .Net?
> 	b) .Net works correctly, and it is an error within 
> ANTLR (so ANTLR should be updated to fix it)? I've 
> implemented quick fix into my local copy of ANTLR.

ANTLR provide the IASTFactory interface (and a default implementation in
ASTFactory) if you decide to handle AST node creation directly yourself
without using reflection (recommended for performance reasons).

Send me some code that demonstrates the behaviour with ANTLR and I'll look
into this again.

> Ivan Gusev

Micheal



More information about the antlr-interest mailing list