diff --git a/wrap/Qualified.h b/wrap/Qualified.h index 000d749ec..6a1db1055 100644 --- a/wrap/Qualified.h +++ b/wrap/Qualified.h @@ -222,25 +222,26 @@ struct TypeListGrammar: public classic::grammar > { typedef std::vector TypeList; TypeList& result_; ///< successful parse will be placed in here - mutable wrap::Qualified type; // temporary type for use during parsing - TypeGrammar type_g; - /// Construct type grammar and specify where result is placed TypeListGrammar(TypeList& result) : - result_(result), type_g(type) { + result_(result) { } /// Definition of type grammar template struct definition { + mutable wrap::Qualified type; ///< temporary for use during parsing + TypeGrammar type_g; ///< Individual Type grammars + classic::rule type_p, typeList_p; - definition(TypeListGrammar const& self) { + definition(TypeListGrammar const& self) : + type_g(type) { using namespace classic; - type_p = self.type_g // - [push_back_a(self.result_, self.type)] // - [clear_a(self.type)]; + + type_p = type_g[push_back_a(self.result_, type)][clear_a(type)]; + typeList_p = OPEN >> !type_p >> *(',' >> type_p) >> CLOSE; }