|
Boost : |
From: joel de guzman (isis-tech_at_[hidden])
Date: 2001-05-31 05:15:02
From: "joel de guzman" :
> Hi,
>
> I posted the initial release of Spirit with iterators as
> proposed here. The Kleene star (*, zero or more)
> and the positive operator (+, one or more) remain
> as is. In addition, the new iterator syntax generalizes
> repetitions. We have:
>
> a.Repeat(8); // repeat a 8 times
> a.Repeat(8, 20); // repeat a 8 to 20 times
> a.Repeat(8, more); // repeat a 8 or more times
>
> And shorthands:
>
> a(8); // repeat a 8 times
> a(8, 20); // repeat a 8 to 20 times
> a(8, more); // repeat a 8 or more times
>
I could throw in:
a.Optional(); // a is optional
a.Repeat(); // repeat a 0 or more times
for free.... Comments?
Joel de Guzman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk