15 #include <boost/regex.hpp>
26 namespace expression {
29 const std::string variable;
30 static boost::regex
const reVarName(
"(\\$\\.)|(\\(\\))");
32 return boost::regex_replace(iExpression,reVarName,variable);
37 const std::string& iOldFormat)
39 if(iNewFormat.substr(0,iNewFormatIndex) ==
40 iOldFormat.substr(0,iNewFormatIndex)) {
41 return iNewFormatIndex;
43 assert(iNewFormat.size()< iOldFormat.size());
44 std::string::const_iterator itNew = iNewFormat.begin(), itOld = iOldFormat.begin(),
45 itNewEnd = iNewFormat.end();
47 itNew != itNewEnd && itNew-iNewFormat.begin() < iNewFormatIndex;
49 while(*itNew != *itOld) {
50 assert(itOld != iOldFormat.end());
54 return itOld - iOldFormat.begin();
long indexFromNewFormatToOldFormat(const std::string &iNewFormat, long iNewFormatIndex, const std::string &iOldFormat)
std::string oldToNewFormat(const std::string &iExpression)