[REBOL] Re: PARSE question
From: petr:krenzelok:trz:cz at: 30-Mar-2001 20:32
----- Original Message -----
From: "David Vydra" <[dvydra2--yahoo--com]>
Sent: Friday, March 30, 2001 7:56 PM
Subject: [REBOL] PARSE question
> We are parsing large files as blocks. If there is an
> error somewhere, how can we find out where the error
> was? Can we get a count of items parsed correctly?
I am not sure I correctly understand what you are actually asking for, but
you can always "mark" your input to some word .... which is available in
context out of parse block too ... e.g.
parse something [some [pos1: some-stuff | pos2: other-stuff] exit: to end]
print [index? pos1 index? pos2 index? exit]
So I think that if error occures, then by printing your marking words you
can find out, where in the string you got lost ...