[muparser] Remove additional unused functions

This commit is contained in:
ridiculousfish 2017-12-18 09:43:07 -08:00
parent ab95f94048
commit 3f21fb64de
4 changed files with 1 additions and 105 deletions

View file

@ -130,19 +130,13 @@ class ParserBase {
OptionalError DefineInfixOprt(const string_type &a_strName, fun_type1 a_pOprt,
int a_iPrec = prINFIX);
// Clear user defined variables, constants or functions
void ClearVar();
void ClearFun();
// Clear user defined constants or operators.
void ClearConst();
void ClearInfixOprt();
void ClearPostfixOprt();
void ClearOprt();
void RemoveVar(const string_type &a_strVarName);
const varmap_type &GetVar() const;
const string_type &GetExpr() const;
const funmap_type &GetFunDef() const;
string_type GetVersion(EParserVersionInfo eInfo = pviFULL) const;
const char_type **GetOprtDef() const;
void DefineNameChars(const char_type *a_szCharset);

View file

@ -172,9 +172,6 @@ enum ETypeCode {
tpVOID = 2 ///< Undefined type.
};
//------------------------------------------------------------------------------
enum EParserVersionInfo { pviBRIEF, pviFULL };
//------------------------------------------------------------------------------
/** \brief Parser operator precedence values. */
enum EOprtAssociativity { oaLEFT = 0, oaRIGHT = 1, oaNONE = 2 };

View file

@ -149,7 +149,6 @@ void Splash() {
<< _T(" | Y Y \\| | /| | / __ \\_| | \\/\\___ \\ \\ ___/ | | \\/ \n");
mu::console() << _T(" |__|_| /|____/ |____| (____ /|__| /____ > \\___ >|__| \n");
mu::console() << _T(" \\/ \\/ \\/ \\/ \n");
mu::console() << _T(" Version ") << Parser().GetVersion(pviFULL) << _T("\n");
mu::console() << _T(" (C) 2015 Ingo Berg\n");
}

View file

@ -148,51 +148,6 @@ void ParserBase::ReInit() const {
//---------------------------------------------------------------------------
void ParserBase::OnDetectVar(string_type * /*pExpr*/, int & /*nStart*/, int & /*nEnd*/) {}
//---------------------------------------------------------------------------
/** \brief Returns the version of muparser.
\param eInfo A flag indicating whether the full version info should be
returned or not.
Format is as follows: "MAJOR.MINOR (COMPILER_FLAGS)" The COMPILER_FLAGS
are returned only if eInfo==pviFULL.
*/
string_type ParserBase::GetVersion(EParserVersionInfo eInfo) const {
stringstream_type ss;
ss << MUP_VERSION;
if (eInfo == pviFULL) {
ss << _T(" (") << MUP_VERSION_DATE;
ss << std::dec << _T("; ") << sizeof(void *) * 8 << _T("BIT");
#ifdef _DEBUG
ss << _T("; DEBUG");
#else
ss << _T("; RELEASE");
#endif
#ifdef _UNICODE
ss << _T("; UNICODE");
#else
#ifdef _MBCS
ss << _T("; MBCS");
#else
ss << _T("; ASCII");
#endif
#endif
#if defined(MUP_MATH_EXCEPTIONS)
ss << _T("; MATHEXC");
//#else
// ss << _T("; NO_MATHEXC");
#endif
ss << _T(")");
}
return ss.str();
}
//---------------------------------------------------------------------------
/** \brief Add a value parsing function.
@ -542,18 +497,6 @@ EOprtAssociativity ParserBase::GetOprtAssociativity(const token_type &a_Tok) con
}
}
//---------------------------------------------------------------------------
/** \brief Return prototypes of all parser functions.
\return #m_FunDef
\sa FunProt
The return type is a map of the public type #funmap_type containing the prototype
definitions for all numerical parser functions. String functions are not part of
this map. The Prototype definition is encapsulated in objects of the class FunProt
one per parser function each associated with function names via a map construct.
*/
const funmap_type &ParserBase::GetFunDef() const { return m_FunDef; }
//---------------------------------------------------------------------------
/** \brief Retrieve the formula. */
const string_type &ParserBase::GetExpr() const { return m_pTokenReader->GetExpr(); }
@ -1240,16 +1183,6 @@ ParserError ParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const string_type
return ParserError(a_iErrc, a_sTok, m_pTokenReader->GetExpr(), a_iPos);
}
//------------------------------------------------------------------------------
/** \brief Clear all user defined variables.
Resets the parser to string parsing mode by calling #ReInit.
*/
void ParserBase::ClearVar() {
m_VarDef.clear();
ReInit();
}
//------------------------------------------------------------------------------
/** \brief Remove a variable from internal storage.
@ -1263,15 +1196,6 @@ void ParserBase::RemoveVar(const string_type &a_strVarName) {
}
}
//------------------------------------------------------------------------------
/** \brief Clear all functions.
\post Resets the parser to string parsing mode.
*/
void ParserBase::ClearFun() {
m_FunDef.clear();
ReInit();
}
//------------------------------------------------------------------------------
/** \brief Clear all user defined constants.
@ -1293,24 +1217,6 @@ void ParserBase::ClearPostfixOprt() {
ReInit();
}
//------------------------------------------------------------------------------
/** \brief Clear all user defined binary operators.
\post Resets the parser to string parsing mode.
*/
void ParserBase::ClearOprt() {
m_OprtDef.clear();
ReInit();
}
//------------------------------------------------------------------------------
/** \brief Clear the user defined Prefix operators.
\post Resets the parser to string parser mode.
*/
void ParserBase::ClearInfixOprt() {
m_InfixOprtDef.clear();
ReInit();
}
//---------------------------------------------------------------------------
/** \brief Enable the dumping of bytecode and stack content on the console.
\param bDumpCmd Flag to enable dumping of the current bytecode to the console.