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

Parse Reverse

 [1/6] from: rondon:andrade:uol at: 5-Nov-2001 9:19


Hi! Is there any way to make a parse from the left to right ? From the end of data to the beginning? It should be cool if we could have a refinement in parse, such as parse/all/reverse. Is it very hard to be implemented ? Thanks in advance. Rondon

 [2/6] from: brett:codeconscious at: 5-Nov-2001 23:31


Only this. parse head reverse data-to-parse Brett.

 [3/6] from: rondon:andrade:uol at: 5-Nov-2001 12:46


I'm gonna try it ok. Thanks Brett!

 [4/6] from: nitsch-lists:netcologne at: 6-Nov-2001 4:02


RE: [REBOL] Parse Reverse [rondon--andrade--uol--com--br] wrote:
> Hi! > > Is there any way to make a parse from the left to right ? From the end of > data to the beginning? >
ugly, but
>> parse probe head reverse "hello world" [copy txt to "olleh" to end]
dlrow olleh == true
>> head reverse txt
== " world" also there is find/reverse, but no real parse..
> It should be cool if we could have a refinement in parse, such as > parse/all/reverse. Is it very hard to be implemented ? >
would like a real parse/reverse a lot too. -Volker

 [5/6] from: ammonjohnson:ya:hoo at: 6-Nov-2001 16:32


I am not a parse guru by any means, but ----- Original Message ----- From: <[nitsch-lists--netcologne--de]> To: <[rebol-list--rebol--com]> Sent: Monday, November 05, 2001 8:02 PM Subject: [REBOL] Re: Parse Reverse
> RE: [REBOL] Parse Reverse > > [rondon--andrade--uol--com--br] wrote: > > > > Hi! > > > > Is there any way to make a parse from the left to right ? From the end
of
> > data to the beginning? > > > > ugly, but > > >> parse probe head reverse "hello world" [copy txt to "olleh" to end]
I would think something like:
>> parse probe head reverse "hello world" [copy txt to reverse "hello" to
end] would be easier to understand, & easier to code, albeit does take more resources. My 2¢ Ammon

 [6/6] from: nitsch-lists:netcologne at: 7-Nov-2001 0:02


RE: [REBOL] Re: Parse Reverse [ammonjohnson--yahoo--com] wrote:
> I am not a parse guru by any means, but > ----- Original Message -----
<<quoted lines omitted: 6>>
> >> parse probe head reverse "hello world" [copy txt to reverse "hello" to > end]
except it does not work :( ** Script Error: Invalid argument: ?native? words in parse are meant to be other blocks for sub-parserules. so [reverse[hello"]] is invalid. usually one could try to use compose before, but then the compose-marking brackets are also used by parse itself. so composing parse-expressions is difficult. -Volker

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted