[REBOL] Re: How to Parse a Nested Block
From: sterling:rebol at: 17-Sep-2001 15:39
I heavily suggest that you parse the block as a block and not a
string. In most cases this make the best sense. For instance, what
I think you want is this:
data: [some stuff that is not a block [text[string!] size[integer!]]]
; you want the parse to return: [text[string!] size[integer!]] right?
rule: [to block! copy block-contents block! (probe block-contents/1)]
parse data rule
If there is a necessity for having it be in string form it is still
possible. The problem you would be trying to solve there is of
matching brackets which has been done before and maybe somebody on
this list will post it in response.
But, why not make use of the fact that REBOL understands REBOL?