muParserX
2.0.0
|
Namespace for mathematical applications. More...
Classes | |
class | BinValReader |
A class for reading binary values from an expression string. More... | |
class | BoolValReader |
A class for reading boolean values from an expression string. More... | |
class | DblValReader |
A class for reading floating point values from an expression string. More... | |
struct | ErrorContext |
Error context class. More... | |
class | FunAbs |
class | FunACos |
class | FunACosH |
class | FunASin |
class | FunASinH |
class | FunATan |
class | FunAtan2 |
class | FunATanH |
class | FunCbrt |
class | FunCmplxAbs |
class | FunCmplxArg |
Parser callback object for returning the phase angle (or angular component) of a complex number, expressed in radians. More... | |
class | FunCmplxConj |
Parser callback object for returning the complex conjugate of the complex number. More... | |
class | FunCmplxCos |
class | FunCmplxCosH |
class | FunCmplxExp |
class | FunCmplxImag |
Parser callback object for returning the imaginary part of a complex number. More... | |
class | FunCmplxLn |
class | FunCmplxLog |
class | FunCmplxLog10 |
class | FunCmplxLog2 |
class | FunCmplxNorm |
Parser callback object for returning the norm value of the complex number phase angle. More... | |
class | FunCmplxPow |
class | FunCmplxReal |
Parser callback object for returning the real part of a complex number. More... | |
class | FunCmplxSin |
class | FunCmplxSinH |
class | FunCmplxSqrt |
class | FunCmplxTan |
class | FunCmplxTanH |
class | FunCos |
class | FunCosH |
class | FunExp |
class | FunFmod |
class | FunHypot |
class | FunLn |
class | FunLog |
class | FunLog10 |
class | FunLog2 |
class | FunMatrixEye |
Parser callback object for creating unity matrices. More... | |
class | FunMatrixOnes |
Parser callback object for creating matrices consisting entirely of ones. More... | |
class | FunMatrixSize |
Determines the dimensions of a matrix. More... | |
class | FunMatrixZeros |
Parser callback object for creating matrices consisting entirely of zeros. More... | |
class | FunMax |
Determine maximal value from the parameter list. More... | |
class | FunMin |
Determine minimal value from the parameter list. More... | |
class | FunParserID |
Parser function callback for determining the size of an array. More... | |
class | FunPow |
class | FunRemainder |
class | FunSin |
class | FunSinH |
class | FunSizeOf |
Parser function callback for determining the size of an array. More... | |
class | FunSqrt |
class | FunStrLen |
Callback object for determining the length of a string. More... | |
class | FunStrToDbl |
Parse string to a floating point value. More... | |
class | FunStrToLower |
Convert a string to lower case letters. More... | |
class | FunStrToUpper |
Convert a string to upper case letters. More... | |
class | FunSum |
Parser callback for summing up all function arguments. More... | |
class | FunTan |
class | FunTanH |
class | GenericToken |
Default token implentation. More... | |
class | HexValReader |
A class for reading hex values from an expression string. More... | |
class | ICallback |
Interface for callback objects. More... | |
class | IOprtBin |
Interface for binary operators.All classes representing binary operator callbacks must be derived from this base class. More... | |
class | IOprtBinShortcut |
A class for encapsulation if-then-else tokens. More... | |
class | IOprtInfix |
Interface for unary infix operators. More... | |
class | IOprtPostfix |
Interface for unary postfix operators. More... | |
class | IPackage |
class | IPrecedence |
Interface for binary and ternary operators. More... | |
class | IToken |
Generic token interface for expression tokens. More... | |
class | IValue |
Interface to be implemented by all classes representing values. More... | |
class | IValueReader |
Interface for custom value reader objects.Value readers are objects used for identifying values in an expression. More... | |
class | OprtAdd |
Parser callback for implementing an addition of two noncomplex values. More... | |
class | OprtAddCmplx |
Parser callback for implementing an addition of two complex values. More... | |
class | OprtAnd |
Callback class for a logic and operator. More... | |
class | OprtAssign |
Assignement operator. More... | |
class | OprtAssignAdd |
Assignement operator. More... | |
class | OprtAssignDiv |
Assignement operator. More... | |
class | OprtAssignMul |
Assignement operator. More... | |
class | OprtAssignSub |
Assignement operator. More... | |
class | OprtCastToFloat |
Callback for an operator allowing to cast values to floating point values. More... | |
class | OprtCastToInt |
Callback for an operator allowing to cast values to integer values. More... | |
class | OprtColon |
class | OprtCreateArray |
On the fly array creation using the curly bracket operator. More... | |
class | OprtDiv |
Callback object for implementing the division of noncomplex values. More... | |
class | OprtDivCmplx |
Callback object for implementing the division of complex values. More... | |
class | OprtEQ |
Callback object for testing if two values are equal. More... | |
class | OprtFact |
Calculate factorial of a non-negative integer. More... | |
class | OprtGE |
Callback object class for the "Greater or or equal" operator. More... | |
class | OprtGiga |
class | OprtGT |
Callback object class for the "Greater than" operator. More... | |
class | OprtIndex |
Default implementation of a multidimensional index operator. More... | |
class | OprtKilo |
class | OprtLE |
Callback object class for the "Less or equal" operator. More... | |
class | OprtLogicAnd |
Callback class for a logical and operator. More... | |
class | OprtLogicOr |
Callback class for a logical or operator. More... | |
class | OprtLT |
Callback object class for the "Less than" operator. More... | |
class | OprtMega |
class | OprtMicro |
class | OprtMilli |
class | OprtMul |
Callback object for implementing the multiplications of noncomplex values. More... | |
class | OprtMulCmplx |
Callback object for implementing the multiplications of complex values. More... | |
class | OprtNano |
class | OprtNEQ |
Callback object for testing if two values are not equal. More... | |
class | OprtOr |
Callback class for a logic or operator. More... | |
class | OprtPercentage |
Returns percentage of given number. More... | |
class | OprtPow |
Raise x to the power of y. More... | |
class | OprtPowCmplx |
Raise x to the power of y. More... | |
class | OprtShl |
Callback class for the shift left operator. More... | |
class | OprtShortcutLogicAndBegin |
Callback class for a logical and operator. begin . More... | |
class | OprtShortcutLogicAndEnd |
Callback class for a logical and operator. begin . More... | |
class | OprtShortcutLogicOrBegin |
Callback class for a logical or operator. begin. More... | |
class | OprtShortcutLogicOrEnd |
Callback class for a logical or operator. end. More... | |
class | OprtShr |
Callback class for the shift right operator. More... | |
class | OprtSign |
Callback for the negative sign operator for noncomplex values. More... | |
class | OprtSignCmplx |
Callback for the negative sign operator. More... | |
class | OprtSignPos |
Callback for the positive sign operator for noncomplex values. More... | |
class | OprtStrAdd |
class | OprtSub |
Parser callback for implementing the subtraction of two noncomplex values. More... | |
class | OprtSubCmplx |
Parser callback for implementing the subtraction of two complex values. More... | |
class | OprtTranspose |
class | PackageCmplx |
Package for installing complex functions and operators. More... | |
class | PackageCommon |
Package for installing operators and functions which are always present. More... | |
class | PackageMatrix |
Package for installing complex functions and operators. More... | |
class | PackageNonCmplx |
Package for installing complex functions and operators. More... | |
class | PackageStr |
Package for installing unit postfix operators into muParserX. More... | |
class | PackageUnit |
Package for installing unit postfix operators into muParserX. More... | |
class | ParserError |
Error class of the parser. More... | |
class | ParserErrorMsg |
class | ParserMessageProviderBase |
Base class for Parser Message providing classes. More... | |
class | ParserMessageProviderEnglish |
English versions of parser messages. More... | |
class | ParserMessageProviderGerman |
German versions of parser messages. More... | |
class | ParserTester |
Test cases for unit testing the parser framework. More... | |
class | ParserX |
The parser implementation. More... | |
class | ParserXBase |
Implementation of the parser engine. More... | |
class | RPN |
A class representing the reverse polnish notation of the expression. More... | |
class | Stack |
Parser stack implementation. More... | |
class | StrValReader |
A class for reading strings from an expression string. More... | |
class | TokenIfThenElse |
A class for encapsulation if-then-else tokens. More... | |
class | TokenNewline |
A class for encapsulation a newline token. More... | |
class | TokenPtr |
class | TokenReader |
Token reader for the ParserXBase class. More... | |
class | Value |
Value class of muParserX. More... | |
class | ValueCache |
The ValueCache class provides a simple mechanism to recycle unused value items. More... | |
class | Variable |
The variable class represents a parser variable. More... | |
Typedefs | |
typedef TokenPtr< IToken > | ptr_tok_type |
Type of a managed pointer storing parser tokens. | |
typedef TokenPtr< ICallback > | ptr_cal_type |
Type of a managed pointer storing callback tokens. | |
typedef TokenPtr< IValue > | ptr_val_type |
Type of a managed pointer storing value tokens. | |
typedef TokenPtr< IOprtBin > | ptr_binop_type |
Type of a managed pointer storing binary operator tokens. | |
typedef std::vector< ptr_tok_type > | token_vec_type |
Type for a vector of tokens. | |
typedef std::vector< ptr_val_type > | val_vec_type |
Type for a vector of value items. | |
typedef double | float_type |
Parser datatype for floating point value. | |
typedef int64_t | int_type |
Parser datatype for integer valuse. | |
typedef std::complex< float_type > | cmplx_type |
The basic type used for representing complex numbers. | |
typedef bool | bool_type |
Parser boolean datatype. More... | |
typedef Matrix< Value > | matrix_type |
The parsers underlying matrix type. | |
typedef std::string | string_type |
Parser datatype for strings. | |
typedef string_type::value_type | char_type |
Character type of the parser. | |
typedef std::vector< IValueReader * > | readervec_type |
Type of a vector holding pointers to value reader objects. | |
typedef std::map< string_type, ptr_tok_type > | var_maptype |
type for the parser variable storage. | |
typedef std::map< string_type, ptr_tok_type > | val_maptype |
type of a container used to store parser values. | |
typedef std::map< string_type, ptr_tok_type > | fun_maptype |
Type of a container that binds Callback object pointer to operator identifiers. | |
typedef std::map< string_type, ptr_tok_type > | oprt_bin_shortcut_maptype |
typedef std::map< string_type, ptr_tok_type, su::pred::SortByLength< string_type > > | oprt_bin_maptype |
Type of a container that binds Callback object pointer to operator identifiers. | |
typedef std::map< string_type, ptr_tok_type > | oprt_pfx_maptype |
Type of a map for storing postfix operators by their name. | |
typedef std::map< string_type, ptr_tok_type > | oprt_ifx_maptype |
Type of a map for storing infix operators by their name. | |
Functions | |
std::ostream & | operator<< (std::ostream &a_Stream, const IToken &tok) |
Overloaded streaming operator for outputting the value type into an std::ostream. More... | |
std::ostream & | operator<< (std::ostream &a_Stream, const IValue &a_Val) |
Overloaded streaming operator for outputting the value type into an std::ostream. More... | |
std::ostream & | console () |
Encapsulate cout. More... | |
std::istream & | console_in () |
Encapsulate cin. More... | |
Variables | |
const char_type * | g_sCmdCode [] |
Strings assigned to the enum codes of ECmdCode. More... | |
Namespace for mathematical applications.
typedef bool mup::bool_type |
Parser boolean datatype.
This must be bool! The only reason for this typedef is that I need the name bool_type for a preprocessor macro definition to avoid inconsistent naming of the macro parameters.
typedef std::map<string_type, ptr_tok_type> mup::oprt_bin_shortcut_maptype |
Type of a container that short circuit operator object pointer
enum mup::ECmdCode |
Bytecode values.
enum mup::EErrorCodes |
Error codes.
This is the complete list of all error codes used by muparserx
Enumerator | |
---|---|
ecUNEXPECTED_OPERATOR | Unexpected binary operator found. |
ecUNASSIGNABLE_TOKEN | Token cant be identified. |
ecUNEXPECTED_EOF | Unexpected end of expression. (Example: "2+sin(") |
ecUNEXPECTED_COMMA | An unexpected comma has been found. (Example: "1,23") |
ecUNEXPECTED_VAL | An unexpected value token has been found. |
ecUNEXPECTED_VAR | An unexpected variable token has been found. |
ecUNEXPECTED_PARENS | Unexpected Parenthesis, opening or closing. |
ecUNEXPECTED_STR | A string has been found at an inapropriate position. |
ecSTRING_EXPECTED | A string function has been called with a different type of argument. |
ecVAL_EXPECTED | A numerical function has been called with a non value type of argument. |
ecMISSING_PARENS | Missing parens. (Example: "3*sin(3") |
ecUNEXPECTED_FUN | Unexpected function found. (Example: "sin(8)cos(9)") |
ecUNTERMINATED_STRING | unterminated string constant. (Example: "3*valueof("hello)") |
ecTOO_MANY_PARAMS | Too many function parameters. |
ecTOO_FEW_PARAMS | Too few function parameters. (Example: "ite(1<2,2)") |
ecTYPE_CONFLICT | Generic type conflict. |
ecTYPE_CONFLICT_FUN | Function argument type conflict. |
ecTYPE_CONFLICT_IDX | Function argument type conflict. |
ecINVALID_TYPECAST | Invalid Value token cast. |
ecARRAY_SIZE_MISMATCH | Array size mismatch during a vector operation. |
ecNOT_AN_ARRAY | Using the index operator on a scalar variable. |
ecUNEXPECTED_SQR_BRACKET | Invalid use of the index operator. |
ecUNEXPECTED_CURLY_BRACKET | Invalid use of the index operator. |
ecINVALID_NAME | Invalid function, variable or constant name. |
ecBUILTIN_OVERLOAD | Trying to overload builtin operator. |
ecINVALID_FUN_PTR | Invalid callback function pointer. |
ecINVALID_VAR_PTR | Invalid variable pointer. |
ecINVALID_PARAMETER | Invalid function parameter. |
ecNAME_CONFLICT | Name conflict. |
ecOPT_PRI | Invalid operator priority. |
ecASSIGNEMENT_TO_VALUE | Assignment to operator (3=4 instead of a=4) |
ecDOMAIN_ERROR | Trying to use func/oprtr with out-of-domain input args. |
ecDIV_BY_ZERO | Division by zero (currently unused) |
ecGENERIC | Generic error. |
ecINDEX_OUT_OF_BOUNDS | Array index is out of bounds. |
ecMISSING_SQR_BRACKET | The index operator was not closed properly (i.e. "v[3") |
ecEVAL | Error while evaluating function / operator. |
ecOVERFLOW | Overflow (possibly) occurred. |
ecVARIABLE_DEFINED | Variable is already defined. |
ecCONSTANT_DEFINED | Constant is already defined. |
ecFUNOPRT_DEFINED | Function/operator is already defined. |
ecINTERNAL_ERROR | Internal error of any kind. |
ecCOUNT | This is no error code, It just stores just the total number of error codes. |
ecUNDEFINED | Undefined message, placeholder to detect unassigned error messages. |
enum mup::EOprtPrecedence |
Parser operator precedence values.
These are predefined values for the operator precedence.
enum mup::ESynCodes |
Syntax codes.
The syntax codes control the syntax check done during the first time parsing of the expression string. They are flags that indicate which tokens are allowed next if certain tokens are identified.
|
inline |
Encapsulate cout.
Used for supporting UNICODE more easily.
|
inline |
Encapsulate cin.
Used for supporting UNICODE more easily.
std::ostream& mup::operator<< | ( | std::ostream & | a_Stream, |
const IToken & | tok | ||
) |
Overloaded streaming operator for outputting the value type into an std::ostream.
a_Stream | The stream object |
a_Val | The value object to be streamed |
This function is only present if _UNICODE is not defined.
std::ostream& mup::operator<< | ( | std::ostream & | a_Stream, |
const IValue & | a_Val | ||
) |
Overloaded streaming operator for outputting the value type into an std::ostream.
a_Stream | The stream object |
a_Val | The value object to be streamed This function is only present if _UNICODE is not defined. |
const char_type * mup::g_sCmdCode |
Strings assigned to the enum codes of ECmdCode.
Used for debugging purposes only.