Classes | |
class | Parser |
Mathematical expressions parser. More... | |
class | ParserBase |
Mathematical expressions parser (base parser engine). More... | |
class | ParserByteCode |
Bytecode implementation of the Math Parser. More... | |
class | ParserCallback |
Encapsulation of prototypes for a numerical parser function. More... | |
class | ParserComplex |
Mathematical expressions parser. More... | |
struct | mu::STATIC_ASSERTION_FAILURE< true > |
class | ParserErrorMsg |
A class that handles the error messages. More... | |
class | ParserError |
Error class of the parser. More... | |
class | ParserInt |
Mathematical expressions parser. More... | |
class | ParserStack |
Parser stack implementation. More... | |
class | ParserToken |
Encapsulation of the data for a single formula token. More... | |
class | ParserTokenReader |
Token reader for the ParserBase class. More... | |
Namespaces | |
namespace | Test |
Namespace for test cases. | |
Typedefs | |
typedef std::map< string_type, ParserCallback > | funmap_type |
Container for Callback objects. | |
typedef MUP_BASETYPE | value_type |
The numeric datatype used by the parser. | |
typedef MUP_STRING_TYPE | string_type |
The stringtype used by the parser. | |
typedef MUP_BYTECODE_TYPE | bytecode_type |
The bytecode type used by the parser. | |
typedef string_type::value_type | char_type |
The character type used by the parser. | |
typedef 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. | |
typedef std::map< string_type, value_type * > | varmap_type |
Type used for storing variables. | |
typedef std::map< string_type, value_type > | valmap_type |
Type used for storing constants. | |
typedef std::map< string_type, std::size_t > | strmap_type |
Type for assigning a string name to an index in the internal string table. | |
typedef value_type(* | fun_type0 )() |
Callback type used for functions without arguments. | |
typedef value_type(* | fun_type1 )(value_type) |
Callback type used for functions with a single arguments. | |
typedef value_type(* | fun_type2 )(value_type, value_type) |
Callback type used for functions with two arguments. | |
typedef value_type(* | fun_type3 )(value_type, value_type, value_type) |
Callback type used for functions with three arguments. | |
typedef value_type(* | fun_type4 )(value_type, value_type, value_type, value_type) |
Callback type used for functions with four arguments. | |
typedef value_type(* | fun_type5 )(value_type, value_type, value_type, value_type, value_type) |
Callback type used for functions with five arguments. | |
typedef value_type(* | multfun_type )(const value_type *, int) |
Callback type used for functions with a variable argument list. | |
typedef value_type(* | strfun_type1 )(const char_type *) |
Callback type used for functions taking a string as an argument. | |
typedef value_type(* | strfun_type2 )(const char_type *, value_type) |
Callback type used for functions taking a string and a value as arguments. | |
typedef value_type(* | strfun_type3 )(const char_type *, value_type, value_type) |
Callback type used for functions taking a string and two values as arguments. | |
typedef int(* | identfun_type )(const char_type *sExpr, int *nPos, value_type *fVal) |
Callback used for functions that identify values in a string. | |
typedef value_type *(* | facfun_type )(const char_type *, void *) |
Callback used for variable creation factory functions. | |
typedef char | MAP_TYPE_CANT_BE_UNSIGNED [sizeof(STATIC_ASSERTION_FAILURE< bytecode_type(-1)< 0 >)] |
This is a static typecheck. | |
Enumerations | |
enum | ECmdCode { cmLE = 0, cmGE = 1, cmNEQ = 2, cmEQ = 3, cmLT = 4, cmGT = 5, cmADD = 6, cmSUB = 7, cmMUL = 8, cmDIV = 9, cmPOW = 10, cmAND = 11, cmOR = 12, cmXOR = 13, cmASSIGN = 14, cmBO = 15, cmBC = 16, cmARG_SEP, cmVAR, cmVAL, cmFUNC, cmFUNC_STR, cmSTRING, cmOPRT_BIN, cmOPRT_POSTFIX, cmOPRT_INFIX, cmEND, cmUNKNOWN } |
Bytecode values. More... | |
enum | ETypeCode { tpSTR = 0, tpDBL = 1, tpVOID = 2 } |
Types internally used by the parser. More... | |
enum | EPrec { prLOGIC = 1, prCMP = 2, prADD_SUB = 3, prMUL_DIV = 4, prPOW = 5, prINFIX = 4, prPOSTFIX = 4 } |
Parser operator precedence values. More... | |
enum | EErrorCodes { ecUNEXPECTED_OPERATOR = 0, ecUNASSIGNABLE_TOKEN = 1, ecUNEXPECTED_EOF = 2, ecUNEXPECTED_ARG_SEP = 3, ecUNEXPECTED_ARG = 4, ecUNEXPECTED_VAL = 5, ecUNEXPECTED_VAR = 6, ecUNEXPECTED_PARENS = 7, ecUNEXPECTED_STR = 8, ecSTRING_EXPECTED = 9, ecVAL_EXPECTED = 10, ecMISSING_PARENS = 11, ecUNEXPECTED_FUN = 12, ecUNTERMINATED_STRING = 13, ecTOO_MANY_PARAMS = 14, ecTOO_FEW_PARAMS = 15, ecOPRT_TYPE_CONFLICT = 16, ecSTR_RESULT = 17, ecINVALID_NAME = 18, ecBUILTIN_OVERLOAD = 19, ecINVALID_FUN_PTR = 20, ecINVALID_VAR_PTR = 21, ecEMPTY_EXPRESSION = 22, ecNAME_CONFLICT = 23, ecOPT_PRI = 24, ecDOMAIN_ERROR = 25, ecDIV_BY_ZERO = 26, ecGENERIC = 27, ecLOCALE = 28, ecINTERNAL_ERROR = 29, ecCOUNT, ecUNDEFINED = -1 } |
Error codes. More... | |
Functions | |
std::ostream & | console () |
Encapsulate cout. | |
std::istream & | console_in () |
Encapsulate cin. |
typedef MUP_BYTECODE_TYPE mu::bytecode_type |
The bytecode type used by the parser.
The bytecode type depends on the value_type.
typedef string_type::value_type mu::char_type |
The character type used by the parser.
Depends on wether UNICODE is used or not.
typedef char mu::MAP_TYPE_CANT_BE_UNSIGNED[sizeof(STATIC_ASSERTION_FAILURE< bytecode_type(-1)< 0 >)] |
This is a static typecheck.
If you get a compiler error here you tried to use an unsigned bytecode map type!
typedef MUP_STRING_TYPE mu::string_type |
typedef MUP_BASETYPE mu::value_type |
The numeric datatype used by the parser.
Normally this is a floating point type either single or double precision.
enum mu::ECmdCode |
Bytecode values.
enum mu::EErrorCodes |
Error codes.
enum mu::ETypeCode |
std::ostream& mu::console | ( | ) | [inline] |
Encapsulate cout.
Used for supporting UNICODE more easily.
Referenced by mu::Test::ParserTester::Abort(), mu::Test::ParserTester::EqnTest(), mu::Test::ParserTester::TestNames(), and mu::Test::ParserTester::TestVolatile().
std::istream& mu::console_in | ( | ) | [inline] |