14 #include <boost/regex.hpp>
25 namespace expression {
29 static boost::regex
const reVarName(
"(\\$\\.)|(\\(\\))");
31 return boost::regex_replace(iExpression,reVarName,variable);
38 if(iNewFormat.substr(0,iNewFormatIndex) ==
39 iOldFormat.substr(0,iNewFormatIndex)) {
40 return iNewFormatIndex;
42 assert(iNewFormat.size()< iOldFormat.size());
43 std::string::const_iterator itNew = iNewFormat.begin(), itOld = iOldFormat.begin(),
44 itNewEnd = iNewFormat.end();
46 itNew != itNewEnd && itNew-iNewFormat.begin() < iNewFormatIndex;
48 while(*itNew != *itOld) {
49 assert(itOld != iOldFormat.end());
53 return itOld - iOldFormat.begin();
long indexFromNewFormatToOldFormat(const std::string &iNewFormat, long iNewFormatIndex, const std::string &iOldFormat)
std::string oldToNewFormat(const std::string &iExpression)