1 Mar 17:16
Re: Embedded objects
Niko Demmel <niko.demmel <at> gmx.de>
2008-03-01 16:16:42 GMT
2008-03-01 16:16:42 GMT
Now I see what you are trying to do. I don't think you can acheive this with the recursive call to readTest in your functor. What this does is parse the allready parsed sub-map again. You could use closures to handle the recursive occurances of mapEntryExpr. ( http://www.boost.org/libs/spirit/doc/closures.html ) The closure for your mapEntryExpr would have a member of type Map and the colsure for your assignExpr would have a member of type string (current the key). This way new assign expressions can be added to the correct map and the values to the current keys without those references in your functor. If what I said is unclear I can elaborate. (I'm certainly no spirit expert though) Also something compilable would help further explanation. Regards, Niko On 28/02/2008 08:26, Steffen Roeber wrote: > > Unfortunately, createSubMap is a functor that needs the parsed submap. > > Maybe my original code could give a better understanding of what I'm > doing. > > Maybe it is to simple.(Continue reading)
)
--------------------------------------------------------
#ifndef BASIC_HTTP_GRAMMAR_H_
#define BASIC_HTTP_GRAMMAR_H_
#include <boost/spirit/core.hpp>
#include <boost/spirit/actor/assign_actor.hpp>
#include <boost/spirit/actor/insert_at_actor.hpp>
using namespace boost::spirit;
RSS Feed