[muparser] Remove \throw nothrow comments

Soon it will all be nothrow!
This commit is contained in:
ridiculousfish 2017-11-22 12:49:06 -08:00
parent 9649b132bd
commit f05b55c84c
6 changed files with 2 additions and 54 deletions

View file

@ -72,7 +72,6 @@ class ParserToken {
/** \brief Constructor (default).
Sets token to an neutral state of type cmUNKNOWN.
\throw nothrow
\sa ECmdCode
*/
ParserToken()
@ -89,7 +88,6 @@ class ParserToken {
/** \brief Create token from another one.
Implemented by calling Assign(...)
\throw nothrow
\post m_iType==cmUNKNOWN
\sa #Assign
*/
@ -100,7 +98,6 @@ class ParserToken {
Copy token state from another token and return this.
Implemented by calling Assign(...).
\throw nothrow
*/
ParserToken &operator=(const ParserToken &a_Tok) {
Assign(a_Tok);
@ -109,8 +106,6 @@ class ParserToken {
//------------------------------------------------------------------------------
/** \brief Copy token information from argument.
\throw nothrow
*/
void Assign(const ParserToken &a_Tok) {
m_iCode = a_Tok.m_iCode;
@ -170,7 +165,6 @@ class ParserToken {
/** \brief Make this token a value token.
Member variables not necessary for value tokens will be invalidated.
\throw nothrow
*/
ParserToken &SetVal(TBase a_fVal, const TString &a_strTok = TString()) {
m_iCode = cmVAL;
@ -189,7 +183,6 @@ class ParserToken {
/** \brief make this token a variable token.
Member variables not necessary for variable tokens will be invalidated.
\throw nothrow
*/
ParserToken &SetVar(TBase *a_pVar, const TString &a_strTok) {
m_iCode = cmVAR;
@ -205,7 +198,6 @@ class ParserToken {
/** \brief Make this token a variable token.
Member variables not necessary for variable tokens will be invalidated.
\throw nothrow
*/
ParserToken &SetString(const TString &a_strTok, std::size_t a_iSize) {
m_iCode = cmSTRING;
@ -249,7 +241,6 @@ class ParserToken {
/** \brief Return the token type.
\return #m_iType
\throw nothrow
*/
ECmdCode GetCode() const {
if (m_pCallback.get()) {
@ -353,7 +344,6 @@ class ParserToken {
If #m_iType is cmSTRING the token identifier is the value of the string argument
for a string function.
\return #m_strTok
\throw nothrow
\sa m_strTok
*/
const TString &GetAsString() const { return m_strTok; }

View file

@ -122,7 +122,6 @@ ParserBase::~ParserBase() {}
Implemented by calling Assign(a_Parser). Self assignment is suppressed.
\param a_Parser Object to copy to this.
\return *this
\throw nothrow
*/
ParserBase &ParserBase::operator=(const ParserBase &a_Parser) {
Assign(a_Parser);
@ -211,7 +210,6 @@ void ParserBase::ResetLocale() {
constant and variable definitions.
\post m_pTokenReader.get()!=0
\throw nothrow
*/
void ParserBase::InitTokenReader() { m_pTokenReader.reset(new token_reader_type(this)); }
@ -219,7 +217,6 @@ void ParserBase::InitTokenReader() { m_pTokenReader.reset(new token_reader_type(
/** \brief Reset parser to string parsing mode and clear internal buffers.
Clear bytecode, reset the token reader.
\throw nothrow
*/
void ParserBase::ReInit() const {
m_pParseFormula = &ParserBase::ParseString;
@ -646,7 +643,6 @@ const valmap_type &ParserBase::GetConst() const { return m_ConstDef; }
/** \brief Return prototypes of all parser functions.
\return #m_FunDef
\sa FunProt
\throw nothrow
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
@ -1347,7 +1343,6 @@ void ParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const string_type &a_sTo
//------------------------------------------------------------------------------
/** \brief Clear all user defined variables.
\throw nothrow
Resets the parser to string parsing mode by calling #ReInit.
*/
@ -1358,7 +1353,6 @@ void ParserBase::ClearVar() {
//------------------------------------------------------------------------------
/** \brief Remove a variable from internal storage.
\throw nothrow
Removes a variable if it exists. If the Variable does not exist nothing will be done.
*/
@ -1373,7 +1367,6 @@ void ParserBase::RemoveVar(const string_type &a_strVarName) {
//------------------------------------------------------------------------------
/** \brief Clear all functions.
\post Resets the parser to string parsing mode.
\throw nothrow
*/
void ParserBase::ClearFun() {
m_FunDef.clear();
@ -1385,7 +1378,6 @@ void ParserBase::ClearFun() {
Both numeric and string constants will be removed from the internal storage.
\post Resets the parser to string parsing mode.
\throw nothrow
*/
void ParserBase::ClearConst() {
m_ConstDef.clear();
@ -1396,7 +1388,6 @@ void ParserBase::ClearConst() {
//------------------------------------------------------------------------------
/** \brief Clear all user defined postfix operators.
\post Resets the parser to string parsing mode.
\throw nothrow
*/
void ParserBase::ClearPostfixOprt() {
m_PostOprtDef.clear();
@ -1406,7 +1397,6 @@ void ParserBase::ClearPostfixOprt() {
//------------------------------------------------------------------------------
/** \brief Clear all user defined binary operators.
\post Resets the parser to string parsing mode.
\throw nothrow
*/
void ParserBase::ClearOprt() {
m_OprtDef.clear();
@ -1416,7 +1406,6 @@ void ParserBase::ClearOprt() {
//------------------------------------------------------------------------------
/** \brief Clear the user defined Prefix operators.
\post Resets the parser to string parser mode.
\throw nothrow
*/
void ParserBase::ClearInfixOprt() {
m_InfixOprtDef.clear();
@ -1437,7 +1426,6 @@ void ParserBase::EnableDebugDump(bool bDumpCmd, bool bDumpStack) {
//------------------------------------------------------------------------------
/** \brief Enable or disable the built in binary operators.
\throw nothrow
\sa m_bBuiltInOp, ReInit()
If you disable the built in binary operators there will be no binary operators
@ -1453,7 +1441,6 @@ void ParserBase::EnableBuiltInOprt(bool a_bIsOn) {
//------------------------------------------------------------------------------
/** \brief Query status of built in variables.
\return #m_bBuiltInOp; true if built in operators are enabled.
\throw nothrow
*/
bool ParserBase::HasBuiltInOprt() const { return m_bBuiltInOp; }

View file

@ -76,7 +76,6 @@ void ParserByteCode::Assign(const ParserByteCode &a_ByteCode) {
//---------------------------------------------------------------------------
/** \brief Add a Variable pointer to bytecode.
\param a_pVar Pointer to be added.
\throw nothrow
*/
void ParserByteCode::AddVar(value_type *a_pVar) {
++m_iStackPos;
@ -102,7 +101,6 @@ void ParserByteCode::AddVar(value_type *a_pVar) {
</ul>
\param a_pVal Value to be added.
\throw nothrow
*/
void ParserByteCode::AddVal(value_type a_fVal) {
++m_iStackPos;
@ -255,7 +253,6 @@ void ParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc) {
//---------------------------------------------------------------------------
/** \brief Add String function entry to the parser bytecode.
\throw nothrow
A string function entry consists of the stack position of the return value,
followed by a cmSTRFUNC code, the function pointer and an index into the
@ -276,8 +273,6 @@ void ParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx)
//---------------------------------------------------------------------------
/** \brief Add end marker to bytecode.
\throw nothrow
*/
void ParserByteCode::Finalize() {
SToken tok;
@ -327,8 +322,6 @@ std::size_t ParserByteCode::GetSize() const { return m_vRPN.size(); }
//---------------------------------------------------------------------------
/** \brief Delete the bytecode.
\throw nothrow
The name of this function is a violation of my own coding guidelines
but this way it's more in line with the STL functions thus more
intuitive.

View file

@ -52,7 +52,6 @@ ParserCallback::ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec,
//---------------------------------------------------------------------------
/** \brief Constructor for constructing function callbacks taking two arguments.
\throw nothrow
*/
ParserCallback::ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti)
: m_pFun((void*)a_pFun),
@ -69,7 +68,6 @@ ParserCallback::ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti)
\param a_bAllowOpti A flag indicating this function can be optimized
\param a_iPrec The operator precedence
\param a_eOprtAsct The operators associativity
\throw nothrow
*/
ParserCallback::ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti, int a_iPrec,
EOprtAssociativity a_eOprtAsct)
@ -203,7 +201,6 @@ ParserCallback::ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti)
//---------------------------------------------------------------------------
/** \brief Default constructor.
\throw nothrow
*/
ParserCallback::ParserCallback()
: m_pFun(0),
@ -216,7 +213,6 @@ ParserCallback::ParserCallback()
//---------------------------------------------------------------------------
/** \brief Copy constructor.
\throw nothrow
*/
ParserCallback::ParserCallback(const ParserCallback& ref) {
m_pFun = ref.m_pFun;
@ -236,7 +232,6 @@ ParserCallback* ParserCallback::Clone() const { return new ParserCallback(*this)
/** \brief Return tru if the function is conservative.
Conservative functions return always the same result for the same argument.
\throw nothrow
*/
bool ParserCallback::IsOptimizable() const { return m_bAllowOpti; }
@ -245,8 +240,6 @@ bool ParserCallback::IsOptimizable() const { return m_bAllowOpti; }
The type of the address is void. It needs to be recasted according to the
argument number to the right type.
\throw nothrow
\return #pFun
*/
void* ParserCallback::GetAddr() const { return m_pFun; }
@ -259,16 +252,14 @@ ECmdCode ParserCallback::GetCode() const { return m_iCode; }
ETypeCode ParserCallback::GetType() const { return m_iType; }
//---------------------------------------------------------------------------
/** \brief Return the operator precedence.
\throw nothrown
/** \brief Return the operator precedence.n
Only valid if the callback token is an operator token (binary or infix).
*/
int ParserCallback::GetPri() const { return m_iPri; }
//---------------------------------------------------------------------------
/** \brief Return the operators associativity.
\throw nothrown
/** \brief Return the operators associativity.n
Only valid if the callback token is a binary operator token.
*/

View file

@ -532,7 +532,6 @@ API_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser) {
\param a_iVar [in] The index of the variable to return.
\param a_szName [out] Pointer to the variable name.
\param a_pVar [out] Pointer to the variable.
\throw nothrow
Prior to calling this function call mupGetExprVarNum in order to get the
number of variables in the expression. If the parameter a_iVar is greater
@ -612,7 +611,6 @@ API_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser) {
\param a_iVar [in] The index of the variable to return.
\param a_szName [out] Pointer to the variable name.
\param a_pVar [out] Pointer to the variable.
\throw nothrow
*/
API_EXPORT(void)
mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_szName,

View file

@ -45,7 +45,6 @@ class ParserBase;
/** \brief Copy constructor.
\sa Assign
\throw nothrow
*/
ParserTokenReader::ParserTokenReader(const ParserTokenReader &a_Reader) { Assign(a_Reader); }
@ -55,7 +54,6 @@ ParserTokenReader::ParserTokenReader(const ParserTokenReader &a_Reader) { Assign
Self assignment will be suppressed otherwise #Assign is called.
\param a_Reader Object to copy to this token reader.
\throw nothrow
*/
ParserTokenReader &ParserTokenReader::operator=(const ParserTokenReader &a_Reader) {
if (&a_Reader != this) Assign(a_Reader);
@ -67,7 +65,6 @@ ParserTokenReader &ParserTokenReader::operator=(const ParserTokenReader &a_Reade
/** \brief Assign state of a token reader to this token reader.
\param a_Reader Object from which the state should be copied.
\throw nothrow
*/
void ParserTokenReader::Assign(const ParserTokenReader &a_Reader) {
m_pParser = a_Reader.m_pParser;
@ -134,7 +131,6 @@ ParserTokenReader::ParserTokenReader(ParserBase *a_pParent)
This is a factory method the calling function must take care of the object destruction.
\return A new ParserTokenReader object.
\throw nothrow
*/
ParserTokenReader *ParserTokenReader::Clone(ParserBase *a_pParent) const {
std::auto_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));
@ -169,7 +165,6 @@ void ParserTokenReader::SetVarCreator(facfun_type a_pFactory, void *pUserData) {
/** \brief Return the current position of the token reader in the formula string.
\return #m_iPos
\throw nothrow
*/
int ParserTokenReader::GetPos() const { return m_iPos; }
@ -177,7 +172,6 @@ int ParserTokenReader::GetPos() const { return m_iPos; }
/** \brief Return a reference to the formula.
\return #m_strFormula
\throw nothrow
*/
const string_type &ParserTokenReader::GetExpr() const { return m_strFormula; }
@ -214,7 +208,6 @@ void ParserTokenReader::IgnoreUndefVar(bool bIgnore) { m_bIgnoreUndefVar = bIgno
The syntax flags will be reset to a value appropriate for the
start of a formula.
\post #m_iPos==0, #m_iSynFlags = noOPT | noBC | noPOSTOP | noSTR
\throw nothrow
\sa ESynCodes
*/
void ParserTokenReader::ReInit() {
@ -288,7 +281,6 @@ void ParserTokenReader::SetParent(ParserBase *a_pParent) {
\param a_strTok [out] The string that consists entirely of characters listed in a_szCharSet.
\param a_iPos [in] Position in the string from where to start reading.
\return The Position of the first character not listed in a_szCharSet.
\throw nothrow
*/
int ParserTokenReader::ExtractToken(const char_type *a_szCharSet, string_type &a_sTok,
int a_iPos) const {
@ -454,7 +446,6 @@ bool ParserTokenReader::IsArgSep(token_type &a_Tok) {
\return true if an end of formula is found false otherwise.
\param a_Tok [out] If an eof is found the corresponding token will be stored there.
\throw nothrow
\sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsString, IsInfixOpTok, IsPostOpTok
*/
bool ParserTokenReader::IsEOF(token_type &a_Tok) {
@ -746,7 +737,6 @@ bool ParserTokenReader::IsStrVarTok(token_type &a_Tok) {
\param a_Tok [out] If a variable tom_pParser->m_vStringBufken has been found it will be placed
here.
\return true if a variable token has been found.
\throw nothrow
*/
bool ParserTokenReader::IsUndefVarTok(token_type &a_Tok) {
string_type strTok;
@ -791,7 +781,6 @@ bool ParserTokenReader::IsUndefVarTok(token_type &a_Tok) {
\param a_Tok [out] If a variable token has been found it will be placed here.
\return true if a string token has been found.
\sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsEOF, IsInfixOpTok, IsPostOpTok
\throw nothrow
*/
bool ParserTokenReader::IsString(token_type &a_Tok) {
if (m_strFormula[m_iPos] != '"') return false;