[property_tree] Assign and Lua parser

In my use of Boost Property Tree library I have coded some extensions, which are in a GitHub repository (http://github.com/renatoGarcia/boost-extensions). I would like to know if there are any interest in make any of then part of Boost Property Tree itself, probably after a suggest improvement. The more useful in my view is a Boost Assign Property Tree alike. Code: http://github.com/renatoGarcia/boost-extensions/blob/master/property_tree/in... For instance, to build in C++ code a ptree like: key1 value1 key2 { key3 12345 { key4 "value4 with spaces" } key5 value5 "" 10 "" 11 "" 12 } Instead the current: ptree pt; pt.add("key1", "value1"); ptree tmpPt1; tmpPt1.add("key3", 12345); ptree tmpPt2; tmpPt2.add("key4", "value4 with spaces"); tmpPt1.push_back(std::make_pair("", tmpPt2)); tmpPt1.add("key5", "value5"); ptree tmpPt3; tmpPt3.put_value(10); tmpPt1.push_back(std::make_pair("", tmpPt3)); ptree tmpPt4; tmpPt4.put_value(11); tmpPt1.push_back(std::make_pair("", tmpPt4)); ptree tmpPt5; tmpPt5.put_value(12); tmpPt1.push_back(std::make_pair("", tmpPt5)); pt.add_child("key2", tmpPt1); Would be a code like: ptree pt = tree() ("key1", "value1") ("key2", tree() ("key3", 12345) (tree() ("key4", "value4 with spaces")) ("key5", "value5") (10)(11)(12)); Another extension is a Lua parser, like the XML or JSON. But in this case I don't think that is desirable include it in the Boost, because of the needed of Lua libraries (at least not in a mandatory way). Code: http://github.com/renatoGarcia/boost-extensions/blob/master/property_tree/in... Regards, Renato Garcia

I'm not a boost dev, but a lua parser for property tree would be really interesting to a lot of game developers (me included). Lua is used in a lot of contexts in combination with C++, mostly in embedded softwares, a lot in games. Property tree allows easy manipulation of tree data and being able to simply read or write lua "simple" objects with property_tree seems very very interesting to me. I'm already thinking about some use. The proposed new syntax would be interesting too but I don't feel qualified enough to spot the potential problems with such kind of grammar. Joël Lamotte
participants (2)
-
Klaim - Joël Lamotte
-
Renato Florentino Garcia