26 #ifndef MU_PARSER_ERROR_H
27 #define MU_PARSER_ERROR_H
150 std::size_t
GetPos()
const;
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.
This file contains standard definitions used by the parser.
Namespace for mathematical applications.
string_type::value_type char_type
The character type used by the parser.
@ 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.