Hi Rudolf,
Yes, I think you need a stack.
I used a stack with parse some time ago.
To cause a fail, we use the rule:
end skip
which can never succeed.
So put that after the alternative you want to fail.
Regards,
Anton.
> I noticed from the
> output that the way block parsing works is that all alternatives
> are tried until the first one is found that succeeds, and this
> recursively depth first. How then can we know during the visit
> of an alternative that this will end up being successful?
> It looks like we need a stack of our own to keep track.
> Any experiences? I have seen posts on string parsing, but I
> think this is still different.
>
> Furthermore, in order to add some semantic analysis to the parsing,
> I would like to be able to tell the parse function that a certain
> alternative should NOT succeed. Is there any way of communicating
> TO the parser while it goes on?
>
> Thanks for any insights and experience.
>
> Rudolf Meijer
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.