[antlr-interest] How to do complex Tree Pattern Matching
Gerald Rosenberg
gerald at certiv.net
Sat Sep 12 15:18:27 PDT 2009
At 02:07 PM 9/12/2009, Terence Parr wrote:
>On Sep 12, 2009, at 12:06 AM, Gerald Rosenberg wrote:
>>Given an existing AST with the two paths:
>
>i'd recommend doing ^(m .*) match and a pred in front that says
>hasAncestor(a) or something
>Ter
OK, I completely missed BaseTree#hasAncestor
Regards the "or something," TreeParser#inContext would seem to be
it. However, that method seems to have gone missing from 3.1.3 (it
was in 3.1.2, but is still absent in 3.1.4). Is there a reason that
method got pulled?
Thanks.
More information about the antlr-interest
mailing list