--------------------------------------------------------------------------- \brief Add a user defined operator. \post Will reset the Parser to string parsing mode. \param [in] a_sName operator Identifier \param [in] a_pFun Operator callback function \param [in] a_iPrec Operator Precedence (default=prSIGN) \param [in] a_bAllowOpt True if operator is volatile (default=false) \sa EPre
| 553 | \sa EPrec |
| 554 | */ |
| 555 | void ParserBase::DefineInfixOprt(const string_type& a_sName, fun_type1 a_pFun, int a_iPrec, bool a_bAllowOpt) |
| 556 | { |
| 557 | if (a_sName.length() > MaxLenIdentifier) |
| 558 | Error(ecIDENTIFIER_TOO_LONG); |
| 559 | |
| 560 | AddCallback(a_sName, ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, cmOPRT_INFIX), m_InfixOprtDef, ValidInfixOprtChars()); |
| 561 | } |
| 562 | |
| 563 | |
| 564 | //--------------------------------------------------------------------------- |