Hi,
I try to get the "tree rewriting with patterns" working in ANTLR 3.3.1.7705
(target language: CSharp 3).
I used the following code, which is a little-modified version of an example
from
http://www.antlr.org/wiki/display/~admin/2008/11/30/Example+tree+rewriting+w
ith+patterns.
tree grammar TreeWalker;
options {
tokenVocab=Grammar;
language=CSharp3;
output=AST;
ASTLabelType=CommonTree;
filter=true; <--- this seems to be the
problematic part!
}
topdown
: ^(BLOCK .*) -> ^(BLOCK)
;
bottomup
: ^(BLOCK .*) -> ^(BLOCK)
;
Codegeneration worked, but I get the compile error " The non-generic type
'Antlr.Runtime.Tree.TreeRewriter' cannot be used with type arguments" which
points to the following line:
public partial class TreeWalker: Antlr.Runtime.Tree.TreeRewriter<CommonTree>
So the compiler (and me, too) was unable to find a generic version of
TreeRewriter in the current Antlr3.Runtime.dll.
Any ideas?
Thanks,
Tobias
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.