[antlr-interest] Bug in C# template for code generation?

Micheal J open.zone at virgin.net
Tue Jun 26 09:57:45 PDT 2007


Johannes,

This has already been fixed.
http://fisheye2.cenqua.com/changelog/antlr/src/org/antlr/codegen/templates/C
Sharp?cs=3791

Perhaps a "daily build" is due again?

Micheal

-----------------------
The best way to contact me is via the list/forum. My time is very limited.

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org 
> [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Johannes Luber
> Sent: 26 June 2007 14:51
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] Bug in C# template for code generation?
> 
> 
> Hello!
> 
> When generating the attached grammar, the resulting 
> ANTLR3ToRelaxNGParser.cs has the following snippet in the
> element()-function:
> 
> object root_1 = (object)adaptor.GetNilNode();
> root_1 = (object)adaptor.BecomeRoot(stream_atom.nextNode(), root_1);
> 
> The compiler complains that 
> "'Antlr.Runtime.Tree.RewriteRuleSubtreeStream' does not 
> contain a definition for 'nextNode'". As I haven't touched 
> this particular code, it means either the C# template 
> contains a bug or the element rule
> 
> element // Simplified AST
>     :   id ('='|'+=') rulepart=(atom|block) ebnfSuffix?
>         -> ^($rulepart ebnfSuffix?)
>     |   atom ebnfSuffix? -> ^(atom ebnfSuffix?)
>     |	ebnf
>     |   ACTION ->
>     |   SEMPRED '=>'? ->
>     |   treeSpec ->
>     ;
> 
> contains an error. What is it?
> 
> Best regards,
> Johannes Luber
> 



More information about the antlr-interest mailing list