[antlr-interest] Match any node/subtree

Thomas Vial tvial at octo.com
Mon Jul 7 02:25:58 PDT 2008


Thanks, that made it!

Thomas



On Sat, Jul 5, 2008 at 5:13 PM, Johannes Luber <jaluber at gmx.de> wrote:

> Thomas Vial schrieb:
>
>> Hi,
>>
>> Is there a way to have a rule, in a tree grammar, match any node/subtree
>> whatever it is (like a wildcard)? Something like:
>>
>> rule:
>>   ^(NODE child) { doSomething($child); }   // child is any subtree, no
>> subrule to match it explicitely
>>
>>
>> Thanks,
>>
>> Thomas
>>
>
> rule:
>    ^(NODE child=.) { doSomething($child); };
>
> should work.
>
> Johannes
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080707/bd2cb37f/attachment.html 


More information about the antlr-interest mailing list