Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-08-12 02:04:22


From: "Geoff Leyland" <geoff.leyland_at_[hidden]>

> On Lundi, août 12, 2002, at 07:52 , "Dylan Cuthbert" <dylan_at_[hidden]>
> wrote:
>
> > We have a similar system implemented here, using map<string,any> as the
> > container for the variables and supporting nested structures in the
> > same way
> > you are.
>
> Oh hey,
>
> I'd kind of shut up about that, because no-one seemed that interested,
> *but*, if anyone is...
> I've got the same thing as you, with a few differences, and maybe a few
> additions (or maybe you just didn't mention them).
>
> Firstly, it doesn't use any (it should, I know, but I'm waiting for the
> next version of boost to see what the new version of any is like).
>
> Then, it also understands array syntax, so there's no only a
> whatever_map, also a whatever_vector, and you can go
>
> a["one.two[3].four"]
> (which is the same as a["one.two"].vector()[3]["four"])
>
> And finally, I tacked on a little lexer/parser so that it reads text
> files - this is really cool. Unfortunately, since there isn't a parser
> library in Boost (is Spirit coming?) and I'd normally do it in antlr,
> which has quite a big run-time, I wrote it by hand, which was probably a
> bit silly.

Wow, this is turning into a full-blown interpreter! Are you sure you guys
don't want to be using Python (www.python.org)? Boost has a very nice
library for interfacing Python with C++... <.003 wink>

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


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