Boost logo

Boost :

Subject: Re: [boost] compile time parser generator
From: Eric Niebler (eric_at_[hidden])
Date: 2012-01-07 23:04:14


On 1/7/2012 7:06 PM, Dave Abrahams wrote:
> The desire of "modern language theorists" is to enable language
> extension without losing interoperability with the rest of the language,
> and I think what you can do with constexpr, while very cool, still falls
> far short of that.

While I agree with all of this, I still think there is a place for a
constexpr string-based regex library. One of the shortcomings of
xpressive is the need to learn a new syntax to use it.

I anticipate that compile time will be a big problem with string-based
constexpr metaprogramming. For a string of length N, you'll need to
instantiate /at least/ O(N) templates just to get the parse tree. And
that's only the first step. With expression templates, you get the parse
tree for free, and even so compile times have been a bottleneck.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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