Boost::spirit how to parse and call c++ function-like expressions
I want to use boost spirit to parse an expression like function1(arg1, arg2, function2(arg1, arg2, arg3), function3(arg1,arg2)) and call corresponding c++ functions. What should be the grammar to parse above expression and call the corresponding c++ function by phoneix::bind()? I have 2 types of functions to call 1) string functions; wstring GetSubString(wstring stringToCut, int position, int length); wstring GetStringToken(wstring stringToTokenize, wstring seperators, int tokenNumber ); 2) Functions that return integer; int GetCount(); int GetId(wstring srcId, wstring srcType); Second Answer