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

[REBOL] Using 'to in parse dialect

From: hallvard::ystad::oops-as::no at: 5-May-2005 2:04

Hello folks I have a parse problem again. Hope someone here can help (Brett?). Heres an example from codeconscious.com: ws: charset {^A^B^C^D^E^F^G^H^-^/^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^[^\^]^!^_ ^~ } input-string: "fox dog" parse/all input-string [ [any ws "fox"] [any ws "dog"] ] The last parse statement returns 'true. But now, what if we use the 'to: input-string: "let's make a new speciaes: a fox dog" parse/all input-string [ to [any ws "fox"] [any ws "fox"] [any ws "dog"] ] ** Script Error: Invalid argument: any ws fox ** Near: parse/all input-string [to [any ws "fox"] [any ws "fox"] [any ws "dog"]] What did I do wrong? It seems that 'to in the parse dialect is very restrictive as to what may follow. The same applies to 'thru. Please help me someone! HY (Going on holyday tomorrow, reading possible responses after the weekend.)