Thanks Gabriele,

So to parse [1 2 3] one has to write ...

>> parse [1 2 3][1 1 1 1 1 2 1 1 3]
== true

Quite odd, isn't it ?

Regards
Patrick
----- Original Message ----- 
From: "Gabriele Santilli" <[EMAIL PROTECTED]>
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 5:20 PM
Subject: [REBOL] Re: Coffee break problem anyone?


> 
> Hi Patrick,
> 
> On Tuesday, November 4, 2003, 4:46:23 PM, you wrote:
> 
> ppln> But could you (or some parse guru) explain a bit.
> ppln> I don't understand the second part of the any rule (1 1 value).
> 
> If  you  want  to match an given integer (like for example 2) in a
> block, you can't just use:
> 
>    parse [2] [2]
> 
> because  the  integer  in the rule is interpreted as a repetition,
> like in:
> 
>    parse "aa" [2 "a"]
> 
> so you have to use:
> 
>    parse [2] [1 1 2]
> 
> So 1 1 value matches the integer referred to by 'value.
> 
> Regards,
>    Gabriele.
> -- 
> Gabriele Santilli <[EMAIL PROTECTED]>  --  REBOL Programmer
> Amiga Group Italia sez. L'Aquila  ---   SOON: http://www.rebol.it/
> 
> -- 
> To unsubscribe from this list, just send an email to
> [EMAIL PROTECTED] with unsubscribe as the subject.
> 

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to