Hi, 

I am having a problem with ANTLR. I will be grateful to you if you can help me 
in this regard.

Following is a  rule at my tree grammar:

booleanexpression returns[boolean result] 
:  ^(AND op1 = booleanexpression op2 = booleanexpression) {if(op1&&op2) result 
= 
true; else result =false;}
;

My question:
I want to stop walking once I found op1 as false. In that case, I don't need to 
evaluate op2 anymore, the result is false anyway.
 
Is there any way to implement this?

Thanks in advance.
Porosh


      

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