[antlr-interest] multiple StringTemplate for tree grammar
testn
test1 at doramail.com
Sun Dec 20 06:47:26 PST 2009
Hi,
I have a file like
class Person {
String name;
String lastName;
}
I already generates a tree grammar like
^(Person ^(Field String name) ^(Field String lastName))
from the tree grammar, I would like to transform it using Tree Grammar /
StringTemplate into
class Person {
String name;
String lastName;
public String Name {
get { return name; } set { name = value; }
}
public String LastName {
get { return lastName; } set { lastName = value; }
}
}
The only way I can do it is to rewrite the template again to generate a fake
Token for property. Is there a way I can do it in Tree Grammar with output
to template in one pass?
Thanks!
--
View this message in context: http://n2.nabble.com/multiple-StringTemplate-for-tree-grammar-tp4194792p4194792.html
Sent from the ANTLR mailing list archive at Nabble.com.
More information about the antlr-interest
mailing list