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

[REBOL] Re: Parsing for fun and profit

From: lmecir:mbox:vol:cz at: 25-Sep-2001 8:59

Hi, I wrote:
> If you prefer a "single parsing" solution, then it could be like: > > nonspace: complement charset " " > parse/all blob [ > (blobarray: copy []) > any [ > (row: copy []) > 5 [ > any " " copy string any nonspace (append row string) > ] (append/only blobarray row) > thru newline > ] > ]
, which was untested. A corrected version: nonspace: complement charset " ^/^(tab)" space: charset " ^(tab)" parse/all blob [ (blobarray: copy []) any [ (row: copy []) 5 [ any space copy string some nonspace (append row string) ] (append/only blobarray row) thru newline ] ]