[antlr-interest] Bug in C# template for code generation?
Johannes Luber
jaluber at gmx.de
Tue Jun 26 06:50:40 PDT 2007
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ANTLR3ToRelaxNG.g
Url: http://www.antlr.org/pipermail/antlr-interest/attachments/20070626/451c736d/attachment.pl
More information about the antlr-interest
mailing list