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

[REBOL] Re: Parse versus Regular Expressions

From: brett:codeconscious at: 3-Apr-2003 18:34

Silent stack limit? y: [ [ (?? y) [y | (print "Didn't match Y")] #"a"] | #"b"] parse "ba" y Regards, Brett. Ladislav wrote: --------------- ..... The result of the equation is known, it is: Y = ba* , i.e. in PARSE notation: y: [#"b" any #"a"] Noticeably, the "dumb" approach to the equation rewriting: y: [[y #"a"] | #"b"] didn't "fire" any error, stack overflow, or any unusual exception. Nevertheless, it didn't work: parse "b" y ; == true parse "ba" y ; == false Any ideas? Regards -L