Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2003-11-18 14:08:18

Brock Peabody wrote:

> OK, I understand that we need to be able to do run-time REs because there
> are a lot of legacy applications that use them. In what situations would
> you recommend using static REs over static EBNF via Spirit?
> Brock

A) When you want exhaustive backtracking. An RE engine will try every
possibility to find a match. Spirit does not.

B) When you want you want to mix-n-match statically- and
dynamically-bound REs in the same expression. I know Spirit can embed
Boost.Regex, but ...

C) If you need the functionality of both Boost.Regex and Spirit in the
same application, and you'd like to include and learn only one library.

D) If you just happen to prefer regular expressions to EBNF.

Let me emphasize (D). I expect the barrier to entry to xpressive to be
lower than Spirit for those who are already familiar with regular
expression syntax (like me!). I expect to provide a little app for
automatically generating the static xpressions given a perl RE as input.
This will be a useful learnability tool. And it will be written using
xpressive, of course. :-)

I know there is some overlap with existing Boost libraries. I'm going to
build it because it interests me. Anybody else who is interested can
help or just stand around and watch. Whether it eventually is accepted
into Boost as its own library, gets absorbed by Boost.Spirit or is not
accepted at all is no matter to me. I want it. 'Nuf said.

And with Joel's help, I am going to work to make xpressive and Spirit
work so well together that the "xpressive or Spirit" question will be
moot. I hope.

Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at