At 04:00 18/09/2009, David Marín Carreño wrote:
>^(IF condition ^(THEN statements)) |
>^(IFELSE condition ^(THEN then_s=statements) ^(ELSE
>else_s=statements))
>
>I don't know how to skip THEN statements when the condition is
>false. I am trying the following:
>
>conditionalifthen:
> ^(IF expression ( { $expression.value != 0 }? => ^(THEN
>statements) | .));
>
>conditionalifthenelse:
> ^(IFELSE expression
> ( { $expression.value != 0 }? => ^(THEN statements) . |
> . ^(ELSE statements) ));
>
>without success, until now.
Match the tree and skip the statements:
conditionalifthen:
^(IF expression ( { $expression.value != 0 }?
=> ^(THEN statements) | ^(THEN .*)));
conditionalifthenelse:
^(IFELSE expression
( { $expression.value != 0 }? => ^(THEN
statements) ^(ELSE .*) |
^(THEN .*)
^(ELSE statements) ));
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
-~----------~----~----~----~------~----~------~--~---