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

[REBOL] Strange parse "bug"/behavior?

From: petr:krenzelok:trz:cz at: 17-Mar-2007 12:23

Hi, in my recent tries with REBOL parser, I mistakenly thought, that if I want to skip one char, I need to do "skip 1", instead of "1 skip" or skip . But follow following code: 1) rule: [any [copy char skip 1 (prin char)]] parse/all "this is a test string" rule result: this is a test string== true 2) rule: [any [copy char skip 1]] parse/all "this is a test string" rule result: ** Script Error: Invalid argument: ** Near: parse/all "this is a test string" rule And my question is - what is going on here? Should not case 1) fail too? How is that string is properly parsed, just because there is "(prin char)" added, if integer 1 contained in rule is not correct? Thanks, -pekr-