[REBOL] Re: parse, again...
From: nitsch-lists:netcologne at: 6-Nov-2001 4:02
RE: [REBOL] Re: parse, again...
> > -----Original Message-----
> > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]On Behalf Of
> > [nitsch-lists--netcologne--de]
> > Sent: Sunday, November 04, 2001 1:14 AM
> > To: [rebol-list--rebol--com]
> > Subject: [REBOL] Re: parse, again...
> > difference is
> > >> parse "hello" [to end skip]
> > == false
> > [to end skip] will stop, but gives false.
> Hi, I just jump in maybe I miss the point but 'to end' goes beyond the last
> character and a following 'skip' tries to go even beyond this virtual end-tag.
> Of course parse returns false.
> > >> parse "hello" [skip to end]
> > == true> our "workarounds" gives true but are not so obvious.
> I think this is very obvious, this tells parse to 'skip to end' that's skip
> beyond the last consumable character.
> > i would like to get "stop" and "true", and somehow,
> > [thru end] would make sense to me (its what one thinks of first?)
> If we define 'end as the position behind the last consumable character it
> doesn't make sense to go thru the end. It's OK to go/skip to the end. Robert
thread started like
parse "this that something some others"[some[thru "something"|thru end]]
this was the way the thread-starter used it intuitively,
and wondered why 'parse said "not successfully parsed"
i replied untested
parse "this that something some others"[some[thru "something"|to end]]
but oops, this gives an infinite loop.
then solution was to make the [to end] part smarter with
[some skip] (Ladislav) or [skip to end] (me).
but because [thru "something"] means "all including this is parsed",
[thru end] could well mean "all including end is parsed" IMHO.
i would like it.