/*************************************** Auteur : Pierre Aubert Mail : aubertp7@gmail.com Licence : CeCILL-C ****************************************/ // To get the generated parser #include "PTestOperatorParserFull.h" using namespace std; ///Test the conversion of and add expression into a string /** @return true on success, false otherwise */ bool testExprAddToString(){ PExpr varA = PExpr_default(); PExpr_setType(varA, PExprType::VAR); PExpr_setVarName(varA, "a"); PExpr varB = PExpr_default(); PExpr_setType(varB, PExprType::VAR); PExpr_setVarName(varB, "b"); PExpr exprAdd = PExpr_default(); PExpr_setType(exprAdd, PExprType::ADD); PExpr_getVecOperand(exprAdd).push_back(varA); PExpr_getVecOperand(exprAdd).push_back(varB); std::string exprStr = gExprVarName(exprAdd); std::cout << "testExprAddToString : exprAdd = '"<