[REBOL] Re: [algo] Intervals and parsing
From: nitsch-lists:netcologne at: 12-Mar-2004 16:02
On Freitag, 12. M=E4rz 2004 14:07, Didec wrote:
> Re: [algo] Intervals and parsing
>
>
> FOR PARSE GURUS !
>
> How can I stop the parsing if I find the correct value (and considering the
> test is done in the code next to the rule, not by the rule himself) ?
That means
parse s[
copy something (if xy = something [i-want-to-break])
]
and now you don't know how to tell the parser to stop?
I use this trick:
parse s[
copy something (
break-or-not: either xy = something [ 'break ][ [] ]
) break-or-not
]
so setting a dummy-rule following the paren to 'break.
Looks ugly but works.
> DideC
-Volker