Boost logo

Boost :

From: dg_at_[hidden]
Date: 2001-05-31 08:36:13


--- In boost_at_y..., "joel de guzman" <isis-tech_at_m...> wrote:

>
> Also, based on user feedback (including novices), people find the
prefix
> kleene star (*) and the prefix positive iterator (+) simple to
comprehend.

I think that many people would find prefix Kleene closure operations
confusing. Still with the limited C++ operator overloading, you have
to make some sacrifices. May I suggest a different sacrifice based
loosely on the syntax of XFST
(www.xrce.xerox.com/research/mltt/fst/fssyntax.html). In XFST, the
syntax a^n means n repetitions of a. Just reinterpret this to mean "at
least n repetitions of a". Then a^0 is Kleene star of 'a' and a^1 is
Kleene plus of 'a'. At least ^0 and ^1 look almost like postfix
operators.

-- Dale Gerdemann


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk