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

[REBOL] Re: Help with parsing

From: lmecir::mbox::vol::cz at: 22-Feb-2002 11:42

Hi Richard, you can use my parse enhancing functions as follows: do http://www.sweb.cz/LMecir/parseen.r digit: charset [#"0" - #"9"] to-digit: to-rule [digit] parse "xx7xx9" [to-digit copy answer to end] answer Cheers L P.S. you can find it at my rebsite (sites/Ladislav) too <<From: "Richard Dixon">> I am learning Rebol Core. It is unclear to me why the following statements fail. Any help in understanding what is wrong with the following statements would be appreciated.
>> digits: [["0"] | ["1"] | ["2"] | ["3"] | ["4"] | ["5"] | ["6"] | ["7"] |
["8"] | ["9"] ] == [["0"] | ["1"] | ["2"] | ["3"] | ["4"] | ["5"] | ["6"] | ["7"] | ["8"] | ["9"]]
>> parse {xx7xx9} [to digits copy answer to end]
** Script Error: Invalid argument: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ** Where: halt-view ** Near: parse "xx7xx9" [to digits copy answer to end]