[antlr-interest] Re: Can't build antlr-2.7.2a4-CSharp

micheal_jor open.zone at virgin.net
Tue Dec 3 05:29:24 PST 2002


--- In antlr-interest at y..., Daniel Gackle <gackle at s...> wrote:
> I am trying to upgrade from the antlr-2.7.2a2 version of the C# 
codegen to
> antlr-2.7.2a4.  I can't get it to build.  I've tried with 5 
different
> releases of antlr-2.7.2.a2 through 2.7.2.a6.  The most common error 
seems to
> be:
> 
>   CSharpCodeGenerator.java:46: antlr.CSharpCodeGenerator
>   should be declared abstract; it does not define
> processActionForTreeSpecifiers
>   (java.lang.String,int,antlr.RuleBlock,antlr.ActionTransInfo) in
> antlr.CodeGenerator
> 
> Can anyone assist?

That is strange. I am aware of quite a few people/organizations using 
2.7.2a4/C# and they got it from the website. Could this be a case of 
mixing ANTLR versions?. ANTLR C# 2.7.2a4 is NOT compatible with 
earlier ANTLR versions. Your projects and grammar files should be 
fine however.

> What version of regular antlr is antlr-2.7.2a4 C#
> supposed to go with?

ANTLR 2.7.2a4. It proably would work for 2.7.2a5 and 2.7.2a6 as well 
but I haven't tested either scenario [ nor do I intend to  ;-) ]. An 
update to the latest ANTLR release is in the works....

> The reason I want to upgrade is because of the improved support for
> heterogeneous ASTs.  Can anyone (Michael? :) explain:
> 
>   * what these improvements actually were;

If you decide to use heterogeneous ASTs as described in the ANTLR ref 
manual, you will find that you are now able to. Previous versions of 
ANTLR/C# didn't support this capability.

[WARNING: TreeParsers and hetero ASTs do not play well together 
particulartly if you have set additional node pointers such as 
parentNode and previousNode (and maybe other pointers too). This is 
due to the semi-deep cloning semantics employed by ANTLR. You will 
need to wait until after your final TreeParser transformation before 
setting such node links.]

>   * what version they were added to?

You should be using the latest version - currently 2.7.2a4 for C#. 
Work is underway on a 2.7.2a6 release of ANTLR/C# too.

> I ask the latter because the version of antlr-2.7.2a2-CSharp.zip on 
the
> website is quite different from the one I downloaded several months 
ago, and
> most of the AST changes seem to be in it.  But I have only taken a
> superficial look.

Many of the AST changes are indeed in it. It was released as a 
service to exisiting 2.7.2a2 users because it 2.7.2a2 had been around 
for so long.

You should be looking at 2.7.2a4 now and 2.7.2a6 once it is released 
since no fixes are offered for older releases and support will 
probably begin with "Are you using the latest version with all the 
bug fixes, patches and cool features Daniel....."

Cheers!,

Micheal



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list