Boost logo

Boost Users :

From: Lynn Allan (l_d_allan_at_[hidden])
Date: 2006-04-13 19:04:59


> I don't think re2c does backreferences, so it might not be usable
> for
> Lynn's purposes. It also means any comparison would be apples to
> oranges, since regex matching with backreferences is a much harder
> problem.

Some of this is simply curiousity on my part. (... and too much time
on my hands?)

Also, I've been quite impressed by the performance of xpressive and
regex (haven't looked much at spirit) ... my initial expectation was
that something general purpose and powerful would be worse than an
order of magnitude slower than "rolling your own" hand-tuned
recognizer.

I think it might be valuable for a person in the position of
evaluating whether to put in the time to learn boost::regex and/or
boost::xpressive could find information on the performance trade-offs
involved:
"So, how slow is it?"
(and then, "How bloated is it?" "How hard is it to learn?" "How hard
is it to build and integrate?")

Epecially that it probably won't be nearly as negative as a first
guess might be. (but of course, "it depends" applies to everything ).

BTW, my first impression is that re2c might be useful for some of the
things I work on .... it could get the code to the "area of interest",
where more elaborate replacements could be done. I don't think I
understand "backreferences" ... my mind hasn't absorbed past DFA's and
"greedy" always seems to be a liability.

Another BTW: my impression is that pcre doesn't do substitutions ....
based on an email from its author, Dr. Philip Hazel. Did I
misunderstand? I didn't see anything in its api to indicate
substitutions were possible.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net