Hi folks
Having some trouble making ASTs using a custom node type. Before I ask any
stupid questions, what is the best place to look on how to do this ( I'm using
3.2 )? I'm finding bits and pieces, some of them contradictory. For example I
find this example
static class V extends CommonTree {
public int x,y,z;
public V(int ttype, int x, int y, int z) {
this.x=x; this.y=y; this.z=z; token=new CommonToken(ttype,"");
}
at http://www.antlr.org/wiki/display/ANTLR3/Tree+construction
When I try to define a constructor like this I'm forced to put a cast between
on CommonToken to Token, which causes a runtime can't cast error.
What I want is really quite simple. Need to add one extra field to my AST
nodes to carry DSL type information.
Any help appreciated. Thanks.
.bill
Bill Andersen
Highfleet, Inc. (www.highfleet.com)
3600 O'Donnell Street, Suite 600
Baltimore, MD 21224
Office: +1.410.675.1201
Cell: +1.443.858.6444
Fax: +1.410.675.1204
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.