Hello everyone,

Is there an (easy) way to skip a subtree in a tree grammar? For
example in a conditional expression:

if bool_exp {
  // Whatever is here should be skipped
}

---
--- from the tree grammar:
---

bool_function_content[Boolean value]
        :       {value != null && value.booleanValue()}? => function_content*
        ;       
        catch [FailedPredicateException e] {
                BufferedTreeNodeStream commonInput = (BufferedTreeNodeStream) 
input;
                // This is what I had in mind, but how to skip the
current subtree?
        }

I found the link
http://www.antlr.org/wiki/display/ANTLR3/6.+Advanced+processing , but
unfortunately that is about parser grammars. The incoming Boolean
value in bool_function_content already contains what to do (true means
evaluate and execute function_content*, false is skip the content).

Thanks a lot for your time!

Martijn

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to