Hi,
I found I send this mail only to Patrick, but thought I send it to list too.

I still have question about <rule>? and result Match object.
Patrick do not answer, mb some one can say what I miss? or this is bug?

Forward:

Patrick,
I read you post in blog about Z, so if I understand right for do [0],
[1] and so one for iteration. So, in my example:

grammar G {
   token TOP { ^ <foo>+ $ };
   token foo { ':' <bar>?  };
   token bar { \w };
};

":a:b" ~~ G::TOP;

say ~$/<foo>[0]<bar>; # 1

my $tmp = $/<foo>[1];
say $tmp<bar>; # b

and If I remove '?' in foo token:

say ~$/<foo>[0]<bar>; # a

Ilya

Reply via email to