On 09/15/2011 12:21 PM, Ackerman, Alan wrote:
> $IF selection_stage $OR selection_stage
> $THEN stages
> $ELSE stages
> $ENDIF

If you mean for this to be a single stage, there'd be a lot of parsing
work to do, but it could just build a simple ADDPIPE command the same
way IF does.  If you mean for it to be separate stages:

... | $IF selection_stage
    | $OR selection_stage
    | $THEN stages
    | $ELSE stages
    | $ENDIF
    | ...

they could all connect up using WARP, but to allow more than one set in
the same pipeline set it would take some pretty fancy footwork in
analyzing the pipeline to find which warps to use.

Except for the OR part, if you put aside your aversion to labels, this
could be handled pretty simply just by naming the streams.  OR (and any
other Boolean logic) could be handled in the argument:

... | if: $IF selection_stage
          $OR selection_stage
    | if:then | stages
    | if:else | stages
    | if:end  | ...

Stream 'then' would just be shorted through, and the others connected up
similarly to the way IF does.

¬R

Reply via email to