Parsing bug?
[1/4] from: fmarcia:marcopoly at: 7-Oct-2002 9:48
Hi all,
Is that a bug or is there something I don't understand?
>> text: {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
== {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
>> parse/all text "|"
== ["The" {quick "brown"} "fox" " jumps" {over "the" lazy} "dog"]
Look at the field which contains {"fox" jumps}!
How can I get ["The" {quick "brown"} {"fox" jumps} {over "the" lazy}
dog
]?
Franck.
[2/4] from: lmecir:mbox:vol:cz at: 7-Oct-2002 12:52
Hi Franck,
you can do:
parse/all text [
(result: copy [])
start:
any [
#"|" end: (append result copy/part start back end) start: |
skip
]
(append result copy start)
]
result
----- Original Message -----
From: "Franck MARCIA"
Hi all,
Is that a bug or is there something I don't understand?
>> text: {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
== {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
>> parse/all text "|"
== ["The" {quick "brown"} "fox" " jumps" {over "the" lazy} "dog"]
Look at the field which contains {"fox" jumps}!
How can I get ["The" {quick "brown"} {"fox" jumps} {over "the" lazy}
dog
]?
Franck.
[3/4] from: fmarcia:marcopoly at: 7-Oct-2002 15:03
Thanks Ladislav.
Franck.
-----Message d'origine-----
De=A0: Ladislav Mecir [mailto:[lmecir--mbox--vol--cz]]
Envoy=E9=A0: lundi 7 octobre 2002 12:53
=C0=A0: [rebol-list--rebol--com]
Objet=A0: [REBOL] Re: Parsing bug?
Hi Franck,
you can do:
parse/all text [
(result: copy [])
start:
any [
#"|" end: (append result copy/part start back end) start: |
skip
]
(append result copy start)
]
result
----- Original Message -----
From: "Franck MARCIA"
Hi all,
Is that a bug or is there something I don't understand?
>> text: {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
== {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
>> parse/all text "|"
== ["The" {quick "brown"} "fox" " jumps" {over "the" lazy} "dog"]
Look at the field which contains {"fox" jumps}!
How can I get ["The" {quick "brown"} {"fox" jumps} {over "the" lazy}
dog
]?
Franck.
[4/4] from: fmarcia::marcopoly::com at: 7-Oct-2002 15:04
Thanks Andrew.
Franck.
-----Message d'origine-----
De=A0: Andrew Martin [mailto:[Al--Bri--xtra--co--nz]]
Envoy=E9=A0: lundi 7 octobre 2002 10:47
=C0=A0: [rebol-list--rebol--com]
Objet=A0: [REBOL] Re: Parsing bug?
It looks like you've discovered a 'parse bug.
I've forwarded this to feedback.
Andrew Martin
ICQ: 26227169 http://valley.150m.com/
-><-
----- Original Message -----
From: "Franck MARCIA" <[fmarcia--marcopoly--com]>
To: <[rebol-list--rebol--com]>
Sent: Monday, October 07, 2002 8:48 PM
Subject: [REBOL] Parsing bug?
Hi all,
Is that a bug or is there something I don't understand?
>> text: {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
== {The|quick "brown"|"fox" jumps|over "the" lazy|dog}
>> parse/all text "|"
== ["The" {quick "brown"} "fox" " jumps" {over "the" lazy} "dog"]
Look at the field which contains {"fox" jumps}!
How can I get ["The" {quick "brown"} {"fox" jumps} {over "the" lazy}
dog
]?
Franck.