Posted By:
franz
Posted On:
Monday, June 18, 2012 11:21 AM
Hi All, I've a problem with labeling in tree matching. Please have a look at following example: ... element returns[x ElementClass]: ^('ELEMENT' ID a b c) {$x = ... ;} ; entity returns [e EntityClass]: ^('ENTITY' ID elem+=element+) {SomeUtilClass.processTheList($elem+)} ; ... $elem now returns java.util.List. Depending on output=[AST|template] it's a list of trees or templates. What i want to have is a list of returns values of type ElementClass. I've no clue how to achiev that. Can anybody help, please? Thanks in advance! Franz
More>>
Hi All,
I've a problem with labeling in tree matching. Please have a look at following example:
...
element returns[x ElementClass]:
^('ELEMENT' ID a b c) {$x = ... ;}
;
entity returns [e EntityClass]:
^('ENTITY' ID elem+=element+) {SomeUtilClass.processTheList($elem+)}
;
...
$elem now returns java.util.List. Depending on output=[AST|template] it's a list of trees or templates. What i want to have is a list of returns values of type ElementClass. I've no clue how to achiev that. Can anybody help, please?
Thanks in advance!
Franz
<<Less