|
Boost : |
Subject: Re: [boost] [msm] Review
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-12-03 21:22:52
On Thu, Dec 3, 2009 at 6:18 PM, David Bergman
<David.Bergman_at_[hidden]> wrote:
> On Dec 3, 2009, at 6:27 PM, Andreas Huber wrote:
>
>>> We do not have this much overlap in any other library w.r.t.
>>> features and interface.
>>
>> What about Regex and Xpressive? I know neither of these libraries well, but doesn't Xpressive offer what Regex offers and more?
>
> Actually, I meant to include the triplet Regex, Spirit and Xpressive in my discussion about the closest case to the Statechart/MSM situation.
>
> Since Xpressive - conceptually - solves the problems of both Regex and Spirit, one could argue that it would be the only one needed in this triplet. BUT, the interface to regular expressions (and regular languages) is quite different between Xpressive and Regex and the latter conforms more to the Perl+GNU-style API's of dealing with regular expressions.
>
> If I were king of the world (...), I would standardize on Xpressive and deprecate both Spirit and Regex, *with regards to* interface and features (and not implementation.) Regex is obviously easier to wrap around a proven and efficient implementation such as PCRE, and is easier to inject in C++0x...
>
> It is no coincidence that Xpressive came after Spirit and Regex.
>
> In fact, I have had to explain - and justify - this triplet to new Boosters in my teams. But, we here have different interfaces and different problems (or languages to parse): regular vs context-free vs both. For less DSLish developers, Regex is the clear choice for regular expressions. But, I have managed to convert a few people to become DSL:ers, and am planning to open their eyes to Proto; once they get hooked on DSL, they love Spirit and Xpressive.
Actually Spirit and Xpressive have different domains. Xpressive is a
regex parser, suited for regex stuff, *not* suited for parsing a
language. Spirit is a PEG parser, suited for parsing complex things,
not always suited for regex stuff, they actually have little overlap.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk