:m_strMsg(a_Obj.m_strMsg)
219,m_strFormula(a_Obj.m_strFormula)
220,m_strTok(a_Obj.m_strTok)
221,m_iPos(a_Obj.m_iPos)
222,m_iErrc(a_Obj.m_iErrc)
256string_type::size_type iPos(0), iNext(0);
260iNext = strSource.find(strFind, iPos);
261strResult.append(strSource, iPos, iNext-iPos);
263 if( iNext==string_type::npos )
266strResult.append(strReplaceWith);
267iPos = iNext + strFind.length();
270strSource.swap(strResult);
A class that handles the error messages.
ParserErrorMsg & operator=(const ParserErrorMsg &)
Assignement operator is deactivated.
static const self_type m_Instance
The instance pointer.
string_type operator[](unsigned a_iIdx) const
static const ParserErrorMsg & Instance()
std::vector< string_type > m_vErrMsg
A vector with the predefined error messages.
Error class of the parser.
EErrorCodes GetCode() const
Return the error code.
void SetFormula(const string_type &a_strFormula)
Set the expression related to this error.
std::size_t GetPos() const
Return the formula position related to the error.
string_type m_strMsg
The message string.
void ReplaceSubString(string_type &strSource, const string_type &strFind, const string_type &strReplaceWith)
Replace all ocuurences of a substring with another string.
const ParserErrorMsg & m_ErrMsg
string_type m_strTok
Token related with the error.
int m_iPos
Formula position related to the error.
string_type m_strFormula
Formula string.
EErrorCodes m_iErrc
Error code.
const string_type & GetMsg() const
Returns the message string for this error.
const string_type & GetExpr() const
gets the expression related tp this error.
const string_type & GetToken() const
Return string related with this token (if available).
ParserError()
Default constructor.
void Reset()
Reset the erro object.
ParserError & operator=(const ParserError &a_Obj)
Assignment operator.
unsigned int
A callback function used to compare two keys in a database.
This file defines the error class used by the parser.
Namespace for mathematical applications.
string_type::value_type char_type
The character type used by the parser.
std::basic_stringstream< char_type, std::char_traits< char_type >, std::allocator< char_type > > stringstream_type
Typedef for easily using stringstream that respect the parser stringtype.
@ ecINVALID_NAME
Invalid function, variable or constant name.
@ ecUNASSIGNABLE_TOKEN
Token cant be identified.
@ ecMISSING_PARENS
Missing parens. (Example: "3*sin(3")
@ ecBUILTIN_OVERLOAD
Trying to overload builtin operator.
@ ecUNEXPECTED_EOF
Unexpected end of formula. (Example: "2+sin(")
@ ecUNEXPECTED_VAR
An unexpected variable token has been found.
@ ecNAME_CONFLICT
Name conflict.
@ ecSTRING_EXPECTED
A string function has been called with a different type of argument.
@ ecTOO_MANY_PARAMS
Too many function parameters.
@ ecUNDEFINED
Undefined message, placeholder to detect unassigned error messages.
@ ecVAL_EXPECTED
A numerical function has been called with a non value type of argument.
@ ecUNEXPECTED_FUN
Unexpected function found. (Example: "sin(8)cos(9)")
@ ecSTR_RESULT
result is a string
@ ecUNEXPECTED_ARG
An unexpected argument has been found.
@ ecUNEXPECTED_OPERATOR
Unexpected binary operator found.
@ ecOPRT_TYPE_CONFLICT
binary operators may only be applied to value items of the same type
@ ecLOCALE
Conflict with current locale.
@ ecUNEXPECTED_STR
A string has been found at an inapropriate position.
@ ecUNEXPECTED_PARENS
Unexpected Parenthesis, opening or closing.
@ ecINTERNAL_ERROR
Internal error of any kind.
@ ecDOMAIN_ERROR
catch division by zero, sqrt(-1), log(0) (currently unused)
@ ecINVALID_VAR_PTR
Invalid variable pointer.
@ ecUNEXPECTED_ARG_SEP
An unexpected comma has been found. (Example: "1,23")
@ ecOPT_PRI
Invalid operator priority.
@ ecUNTERMINATED_STRING
unterminated string constant. (Example: "3*valueof("hello)")
@ ecINVALID_FUN_PTR
Invalid callback function pointer.
@ ecTOO_FEW_PARAMS
Too few function parameters. (Example: "ite(1<2,2)")
@ ecCOUNT
This is no error code, It just stores just the total number of error codes.
@ ecEMPTY_EXPRESSION
The Expression is empty.
@ ecGENERIC
Generic error.
@ ecUNEXPECTED_VAL
An unexpected value token has been found.
@ ecDIV_BY_ZERO
Division by zero (currently unused)
std::string string_type
The stringtype used by the parser.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4