39 #define MUP_VERSION _T("2.2.5")
40 #define MUP_VERSION_DATE _T("20150427; GC")
42 #define MUP_CHARS _T("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
52 #define MUP_BASETYPE double
62 #define MUP_STRING_TYPE std::wstring
66 #endif // not defined _T
73 #define MUP_STRING_TYPE std::string
79 #define MUP_FAIL(MSG) \
90 #define MUP_ASSERT(COND) \
93 stringstream_type ss; \
94 ss << _T("Assertion \"") _T(#COND) _T("\" failed: ") \
95 << __FILE__ << _T(" line ") \
96 << __LINE__ << _T("."); \
97 throw ParserError( ss.str() ); \
100 #define MUP_FAIL(MSG)
101 #define MUP_ASSERT(COND)
107 #if defined(_UNICODE)
111 inline std::wostream&
console()
207 enum EParserVersionInfo
262 typedef std::basic_stringstream<
char_type,
263 std::char_traits<char_type>,
343 typedef value_type (*
bulkfun_type9)(int, int,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type);
346 typedef value_type (*
bulkfun_type10)(int, int,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type,
value_type);
361 typedef int (*
identfun_type)(
const char_type *sExpr,
int *nPos, value_type *fVal);
364 typedef value_type* (*facfun_type)(
const char_type*,
void*);
Operator item: closing bracket.
user defined binary operator
value_type(* bulkfun_type6)(int, int, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
std::ostream & console()
Encapsulate cout.
#define MUP_STRING_TYPE
Definition of the basic parser string type.
Postfix operator priority (currently unused)
std::map< string_type, std::size_t > strmap_type
Type for assigning a string name to an index in the internal string table.
std::map< string_type, value_type * > varmap_type
Type used for storing variables.
function argument separator
Operator item: y to the power of ...
value_type(* strfun_type3)(const char_type *, value_type, value_type)
Callback type used for functions taking a string and two values as arguments.
code for postfix operators
value_type(* fun_type3)(value_type, value_type, value_type)
Callback type used for functions with three arguments.
This file contains compatibility fixes for some platforms.
Operator item: not equal.
value_type(* bulkfun_type2)(int, int, value_type, value_type)
Callback type used for functions with two arguments.
For use in the ternary if-then-else operator.
#define MUP_BASETYPE
If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions.
value_type(* bulkfun_type9)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
value_type(* bulkfun_type0)(int, int)
Callback type used for functions without arguments.
value_type(* fun_type6)(value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
value_type(* bulkfun_type7)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
power operator priority (highest)
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.
Code for a generic function item.
EOprtAssociativity
Parser operator precedence values.
value_type(* strfun_type1)(const char_type *)
Callback type used for functions taking a string as an argument.
std::map< string_type, value_type > valmap_type
Type used for storing constants.
value_type(* strfun_type2)(const char_type *, value_type)
Callback type used for functions taking a string and a value as arguments.
For use in the ternary if-then-else operator.
ETypeCode
Types internally used by the parser.
value_type(* bulkfun_type1)(int, int, value_type)
Callback type used for functions with a single arguments.
For use in the ternary if-then-else operator.
value_type(* bulkfun_type4)(int, int, value_type, value_type, value_type, value_type)
Callback type used for functions with four arguments.
MUP_BASETYPE value_type
The numeric datatype used by the parser.
value_type(* bulkfun_type10)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
String type (Function arguments and constants only, no string variables)
Namespace for mathematical applications.
Operator item: less than.
Operator item: greater than.
value_type(* generic_fun_type)()
Callback type used for functions without arguments.
Special callbacks for Bulk mode with an additional parameter for the bulk index.
value_type(* fun_type8)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
value_type(* fun_type7)(value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
string_type::value_type char_type
The character type used by the parser.
value_type(* fun_type0)()
Callback type used for functions without arguments.
Code for a function with a string parameter.
EOprtPrecedence
Parser operator precedence values.
value_type(* fun_type4)(value_type, value_type, value_type, value_type)
Callback type used for functions with four arguments.
Operator item: Assignment operator.
MUP_STRING_TYPE string_type
The stringtype used by the parser.
value_type(* fun_type1)(value_type)
Callback type used for functions with a single arguments.
int(* identfun_type)(const char_type *sExpr, int *nPos, value_type *fVal)
Callback used for functions that identify values in a string.
value_type(* bulkfun_type3)(int, int, value_type, value_type, value_type)
Callback type used for functions with three arguments.
Operator item: less or equal.
Operator item: greater or equal.
value_type(* bulkfun_type8)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
value_type(* fun_type5)(value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
std::istream & console_in()
Encapsulate cin.
Floating point variables.
value_type(* fun_type2)(value_type, value_type)
Callback type used for functions with two arguments.
value_type(* fun_type10)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
value_type(* bulkfun_type5)(int, int, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
value_type(* fun_type9)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type)
Callback type used for functions with five arguments.
Signs have a higher priority than ADD_SUB, but lower than power operator.
Operator item: opening bracket.
value_type(* multfun_type)(const value_type *, int)
Callback type used for functions with a variable argument list.