Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Strange parsing behavior

From: robert:muench:robertmuench at: 3-Aug-2002 8:39

> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]] > On Behalf Of Tom Conlin > Sent: Saturday, August 03, 2002 6:02 AM > To: Rebollist > Subject: [REBOL] Re: Strange parsing behavior > maybe this is what you were after > > rule1: [start: copy string1 [ [to " - " (?? string1)] | to > newline] copy string2 to end] == [start: copy string1 [[to " > - " (?? string1)] | to newline] copy string2 to end] > >> string1 > == "this is a - "
Shouldn't this be "this is a"? IIRC to indicates parsing up to the pattern not thru it... I have the same effect here and IMO this is strange.
> notice the first optional matching pattern is in its own block.
I play around with this a bit to see if it helps but I don't thing so. Robert