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

[REBOL] Re: Strange parse "bug"/behavior?

From: petr:krenzelok:trz:cz at: 17-Mar-2007 16:44

Peter, thanks for the input, but I already found out, why or why my case did not work: rule: [any [copy char skip 1 (prin char)]] ... simply means, that 0 or more times 1 char is copied into 'char word. What does 1 mean here is - perform 1-time what follows = (print char). Let's verify it: rule: [any [copy char skip 5 (prin char)]] parse/all "this is a test string" rule results in: ttttthhhhhiiiiisssss iiiiisssss aaaaa ttttteeeeesssssttttt ssssstttttrrrrriiiiinnnnnggggg== true Simply the rule will perform paren (rebol code) given number of times, which is 5 times here. I did not expect it being possible, as I did not consider paren being a typical part of parse dialect .... But thanks for the input. Petr