| 1 |
|
| 2 |
_____ __ _____________ _______ ______ ___________ |
| 3 |
/ \| | \____ \__ \\_ __ \/ ___// __ \_ __ \ |
| 4 |
| Y Y \ | / |_> > __ \| | \/\___ \\ ___/| | \/ |
| 5 |
|__|_| /____/| __(____ /__| /____ >\___ >__| |
| 6 |
\/ |__| \/ \/ \/ |
| 7 |
Copyright (C) 2004 - 2022 Ingo Berg |
| 8 |
|
| 9 |
======================================================================= |
| 10 |
https://beltoforion.de/en/muparser |
| 11 |
======================================================================= |
| 12 |
|
| 13 |
History: |
| 14 |
-------- |
| 15 |
|
| 16 |
Rev 2.3.4: 06.11.2022 |
| 17 |
--------------------- |
| 18 |
Build System Changes (CMake): |
| 19 |
* cmake is using OpenMP target and setting _UNICODE preprocessor definition |
| 20 |
Compiler Warnings: |
| 21 |
* fix for issue #117 (sprintf deprecation warning) |
| 22 |
|
| 23 |
Rev 2.3.3: 22.01.2022 |
| 24 |
--------------------- |
| 25 |
Build System Changes (CMake): |
| 26 |
* Added a new option "-DENABLE_WIDE_CHAR" to CMake for building muparser with wide character support |
| 27 |
|
| 28 |
Compiler Warnings fixed/disabled (Visual Studio): |
| 29 |
* Disabled compiler warning 26812 (Prefer 'enum class' over 'enum') |
| 30 |
I consider this a bogus warning. Use of plain old enums has not been deprecated and only MSVC is complaining. |
| 31 |
* Disabled compiler warning 4251 (... needs to have dll-interface to be used by clients of class ...) |
| 32 |
When the build system was changed to CMake Linux and Windows builds were unified. Each dynamic library contains the |
| 33 |
class interface as well as the C-interface. Before the linux shared library was using the class interface and the |
| 34 |
windows dll was using the C-interface. |
| 35 |
|
| 36 |
Only the C-Interface is safe to use when you intent to bring an executable to another linux distribution or windows version! |
| 37 |
This is up to the client software. I cannot change this because on linux the shared library was always using the class |
| 38 |
interface. Usually this is not a problem since distributions compile all applications from scratch. |
| 39 |
|
| 40 |
If you use the class interface you can not take for granted that your software will run with a muparser |
| 41 |
version compiled for another operating system or linux distribution! You must either use the C-Interface if you |
| 42 |
want this or use a static library build of muparser! |
| 43 |
|
| 44 |
Security Fixes: (The issues were present in all prior stable releases) |
| 45 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24167 |
| 46 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24355 |
| 47 |
|
| 48 |
Bugfixes: |
| 49 |
* fixed a couple of issues for building the C-Interface (muParserDLL.cpp/.h) with wide character support. |
| 50 |
|
| 51 |
Rev 2.3.2: 17.06.2020 |
| 52 |
--------------------- |
| 53 |
API-Change Revertion (to 2.3.0): |
| 54 |
* removed final keyword from Parser class (added in 2.3.0) as this was breaking existing Applications |
| 55 |
|
| 56 |
Changes: |
| 57 |
* made Parser class final |
| 58 |
* using OpenMP is now the default settings for cmake based builds |
| 59 |
* added optimization for trivial expressions. (Expressions whose RPN only has a single entry) |
| 60 |
* introduced a maximum length for expressions (5000 Character) |
| 61 |
* introduced a maximum length for identifiers (100 Characters) |
| 62 |
* removed the MUP_MATH_EXCEPTION macro and related functionality. (C++ exceptions for divide by zero or sqrt of a negative number are no longer supported) |
| 63 |
* removed ParserStack.h (replaced with std::stack) |
| 64 |
* removed macros for defining E and PI (replaced with a static constants) |
| 65 |
* source code is now aimed at C++17 |
| 66 |
* the MUP_ASSERT macro is no longer removed in release builds for better protection against segmentation faults |
| 67 |
|
| 68 |
Security Fixes: (The issues were present in all prior stable releases) |
| 69 |
* Prevented multiple access violations for malformed expressions with if then else and functions taking multiple arguments like "sum(0?1,2,3,4:5)" |
| 70 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23330 |
| 71 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22922 |
| 72 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22938 |
| 73 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23330 |
| 74 |
* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23410 |
| 75 |
* Added additional runtime checks for release builds to prevent segmentation faults for invalid expressions |
| 76 |
|
| 77 |
Bugfixes: |
| 78 |
* Fixed an issue where the bulk mode could hang on GCC/CLANG builds due to OpenMP chunksize dropping below 1. |
| 79 |
|
| 80 |
Rev 2.3.0 - 2.3.1: |
| 81 |
------------------ |
| 82 |
Short lived releases or prereleases that were replaced by 2.3.2 almost instantly due to API breaking changes. Version 2.3.2 is the successor to version 2.2.6 |
| 83 |
|
| 84 |
Rev 2.2.6: 04.10.2018 |
| 85 |
--------------------- |
| 86 |
Changes: |
| 87 |
* Build system is now based on cmake |
| 88 |
* several compiler warnings fixed |
| 89 |
|
| 90 |
Rev 2.2.5: 27.04.2015 |
| 91 |
--------------------- |
| 92 |
Changes: |
| 93 |
* example2 extended to work with UNICODE character set |
| 94 |
* Applied patch from Issue 9 |
| 95 |
|
| 96 |
Bugfixes: |
| 97 |
* muChar_t in muParserDLL.h was not set properly when UNICODE was used |
| 98 |
* muparser.dll did not build on UNICODE systems |
| 99 |
|
| 100 |
Rev 2.2.4: 02.10.2014 |
| 101 |
--------------------- |
| 102 |
Changes: |
| 103 |
* explicit positive sign allowed |
| 104 |
|
| 105 |
Bugfixes: |
| 106 |
* Fix for Issue 6 (https://code.google.com/p/muparser/issues/detail?id=6) |
| 107 |
* String constants did not work properly. Using more than a single one |
| 108 |
was impossible. |
| 109 |
* Project Files for VS2008 and VS2010 removed from the repository |
| 110 |
* Fix for Issue 4 (https://code.google.com/p/muparser/issues/detail?id=4) |
| 111 |
* Fix for VS2013 64 bit build option |
| 112 |
* return type of ParserError::GetPos changed to int |
| 113 |
* OpenMP support enabled in the VS2013 project files and precompiled windows DLL's |
| 114 |
* Bulkmode did not evaluate properly if "=" and "," operator was used in the expression |
| 115 |
|
| 116 |
Rev 2.2.3: 22.12.2012 |
| 117 |
--------------------- |
| 118 |
|
| 119 |
Removed features: |
| 120 |
* build files for msvc2005, borland and watcom compiler were removed |
| 121 |
|
| 122 |
Bugfixes: |
| 123 |
* Bugfix for Intel Compilers added: The power operator did not work properly |
| 124 |
with Intel C++ composer XE 2011. |
| 125 |
(see https://sourceforge.net/projects/muparser/forums/forum/462843/topic/5117983/index/page/1) |
| 126 |
* Issue 3509860: Callbacks of functions with string parameters called twice |
| 127 |
(see http://sourceforge.net/tracker/?func=detail&aid=3509860&group_id=137191&atid=737979) |
| 128 |
* Issue 3570423: example1 shows slot number in hexadecimal |
| 129 |
(see https://sourceforge.net/tracker/?func=detail&aid=3570423&group_id=137191&atid=737979) |
| 130 |
* Fixes for compiling with the "MUP_MATH_EXCEPTIONS" macro definition: |
| 131 |
- division by zero in constant expressions was reported with the code "ec_GENERIC" |
| 132 |
instead of "ecDIV_BY_ZERO" |
| 133 |
- added throwing of "ecDOMAIN_ERROR" to sqrt and log functions |
| 134 |
|
| 135 |
|
| 136 |
Rev 2.2.2: 18.02.2012 |
| 137 |
--------------------- |
| 138 |
Bugfixes: |
| 139 |
* Optimizer did'nt work properly for division: |
| 140 |
(see https://sourceforge.net/projects/muparser/forums/forum/462843/topic/5037825) |
| 141 |
|
| 142 |
Rev 2.2.1: 22.01.2012 |
| 143 |
--------------------- |
| 144 |
Bugfixes: |
| 145 |
* Optimizer bug in 64 bit systems fixed |
| 146 |
(see https://sourceforge.net/projects/muparser/forums/forum/462843/topic/4977977/index/page/1) |
| 147 |
|
| 148 |
Rev 2.2.0: 22.01.2012 |
| 149 |
--------------------- |
| 150 |
Improvements: |
| 151 |
* Optimizer rewritten and improved. In general: more optimizations are |
| 152 |
now applied to the bytecode. The downside is that callback Functions |
| 153 |
can no longer be flagged as non-optimizable. (The flag is still present |
| 154 |
but ignored) This is necessary since the optimizer had to call the |
| 155 |
functions in order to precalculate the result (see Bugfixes). These calls |
| 156 |
posed a problems for callback functions with side effects and if-then-else |
| 157 |
clauses in general since they undermined the shortcut evaluation prinziple. |
| 158 |
|
| 159 |
Bugfixes: |
| 160 |
* Infix operators where not properly detected in the presence of a constant |
| 161 |
name starting with an underscore which is a valid character for infix |
| 162 |
operators too (i.e. "-_pi"). |
| 163 |
* Issue 3463353: Callback functions are called twice during the first call to eval. |
| 164 |
* Issue 3447007: GetUsedVar unnecessaryly executes callback functions. |
| 165 |
|
| 166 |
|
| 167 |
Rev 2.1.0: 19.11.2011 |
| 168 |
--------------------- |
| 169 |
New feature: |
| 170 |
* Function atan2 added |
| 171 |
|
| 172 |
Bugfixes: |
| 173 |
* Issue 3438380: Changed behaviour of tellg with GCC >4.6 led to failures |
| 174 |
in value detection callbacks. |
| 175 |
* Issue 3438715: only "double" is a valid MUP_BASETYPE |
| 176 |
MUP_BASETYPE can now be any of: |
| 177 |
float, |
| 178 |
double, |
| 179 |
long double, |
| 180 |
short, |
| 181 |
unsigned short, |
| 182 |
unsigned int, |
| 183 |
long, |
| 184 |
unsigned long. |
| 185 |
Previousely only floating point types were allowed. |
| 186 |
Using "int" is still not allowed! |
| 187 |
* Compiler issues with GCC 4.6 fixed |
| 188 |
* Custom value recognition callbacks added with AddValIdent had lower |
| 189 |
priority than built in functions. This was causing problems with |
| 190 |
hex value recognition since detection of non hex values had priority |
| 191 |
over the detection of hex values. The "0" in the hex prefix "0x" would |
| 192 |
be read as a separate non-hex number leaving the rest of the expression |
| 193 |
unparseable. |
| 194 |
|
| 195 |
Rev 2.0.0: 04.09.2011 |
| 196 |
--------------------- |
| 197 |
This release introduces a new version numbering scheme in order to make |
| 198 |
future changes in the ABI apparent to users of the library. The number is |
| 199 |
now based on the SONAME property as used by GNU/Linux. |
| 200 |
|
| 201 |
Changes: |
| 202 |
* Beginning with this version all version numbers will be SONAME compliant |
| 203 |
* Project files for MSVC2010 added |
| 204 |
* Project files for MSVC2003 removed |
| 205 |
* Bytecode parsing engine cleaned up and rewritten |
| 206 |
* Retrieving all results of expressions made up of comma separate |
| 207 |
subexpressions is now possible with a new Eval overload. |
| 208 |
* Callback functions with fixed number of arguments can now have up to 10 |
| 209 |
Parameters (previous limit was 5) |
| 210 |
|
| 211 |
New features: |
| 212 |
* ternary if-then-else operator added (C++ like; "(...) ? ... : ..." ) |
| 213 |
* new intrinsic binary operators: "&&", "||" (logical and, or) |
| 214 |
* A new bulkmode allows submitting large arrays as variables to compute large |
| 215 |
numbers of expressions with a single call. This can drastically improve |
| 216 |
parsing performance when interfacing the library from managed languages like |
| 217 |
C#. (It doesn't bring any performance benefit for C++ users though...) |
| 218 |
|
| 219 |
Removed features: |
| 220 |
* intrinsic "and", "or" and "xor" operators have been removed. I'd like to let |
| 221 |
users the freedom of defining them on their own versions (either as logical or bitwise |
| 222 |
operators). |
| 223 |
* Implementation for complex numbers removed. This was merely a hack. If you |
| 224 |
need complex numbers try muParserX which provides native support for them. |
| 225 |
(see: http://beltoforion.de/muparserx/math_expression_parser_en.html) |
| 226 |
|
| 227 |
Bugfixes: |
| 228 |
* User defined operators could collide with built in operators that entirely |
| 229 |
contained their identifier. i.e. user defined "&" would not work with the built |
| 230 |
in "&&" operator since the user defined operator was detected with a higher |
| 231 |
priority resulting in a syntax error. |
| 232 |
* Detection of unknown variables did not work properly in case a postfix operator |
| 233 |
was defined which was part of the undefined variable. |
| 234 |
i.e. If a postfix operator "m" was defined expressions like "multi*1.0" did |
| 235 |
not detect "multi" as an undefined variable. |
| 236 |
(Reference: http://sourceforge.net/tracker/index.php?func=detail&aid=3343891&group_id=137191&atid=737979) |
| 237 |
* Postfix operators sharing the first few characters were causing bogus parsing exception. |
| 238 |
(Reference: https://sourceforge.net/tracker/?func=detail&aid=3358571&group_id=137191&atid=737979) |
| 239 |
|
| 240 |
Rev 1.34: 04.09.2010 |
| 241 |
-------------------- |
| 242 |
Changes: |
| 243 |
* The prefix needed for parsing hex values is now "0x" and no longer "$". |
| 244 |
* AddValIdent reintroduced into the DLL interface |
| 245 |
|
| 246 |
New features: |
| 247 |
* The associativity of binary operators can now be changed. The pow operator |
| 248 |
is now right associative. (This is what Mathematica is using) |
| 249 |
* Separator can now be used outside of functions. This allows compound |
| 250 |
expressions like: |
| 251 |
"a=10,b=20,c=a*b" The last "argument" will be taken as the return value |
| 252 |
|
| 253 |
Bugfixes: |
| 254 |
* The copy constructor did not copy binary operator definitions. Those were lost |
| 255 |
in the copied parser instance. |
| 256 |
* Mixing special characters and alphabetic characters in binary operator names |
| 257 |
led to inconsistent parsing behaviour when parsing expressions like "a ++ b" |
| 258 |
and "a++b" when "++" is defined as a binary operator. Binary operators must |
| 259 |
now consist entirely of special characters or of alphabetic ones. |
| 260 |
(original bug report: https://sourceforge.net/projects/muparser/forums/forum/462843/topic/3696881/index/page/1) |
| 261 |
* User defined operators were not exactly handled like built in operators. This |
| 262 |
led to inconsistencies in expression evaluation when using them. The results |
| 263 |
differed due to slightly different precedence rules. |
| 264 |
* Using empty string arguments ("") would cause a crash of muParser |
| 265 |
|
| 266 |
|
| 267 |
Rev 1.32: 29.01.2010 |
| 268 |
-------------------- |
| 269 |
|
| 270 |
Changes: |
| 271 |
* "example3" renamed to "example2" |
| 272 |
* Project/Makefiles files are now provided for: |
| 273 |
- msvc2003 |
| 274 |
- msvc2005 |
| 275 |
- msvc2008 |
| 276 |
- watcom (makefile) |
| 277 |
- mingw (makefile) |
| 278 |
- bcc (makefile) |
| 279 |
* Project files for borland cpp builder were removed |
| 280 |
|
| 281 |
|
| 282 |
New features: |
| 283 |
* Added function returning muparsers version number |
| 284 |
* Added function for resetting the locale |
| 285 |
|
| 286 |
|
| 287 |
Bugfixes: |
| 288 |
* Changes example1 in order to fix issues with irritating memory leak reports. |
| 289 |
Added conditional code for memory leak detection with MSVC in example1. |
| 290 |
(see: http://www.codeproject.com/KB/recipes/FastMathParser.aspx?msg=3286367#xx3286367xx) |
| 291 |
* Fixed some warnings for gcc |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
Rev 1.31cp: 15.01.2010 (Maintenance release for CodeProject) |
| 296 |
---------------------- |
| 297 |
|
| 298 |
Changes: |
| 299 |
* Archive structure changed |
| 300 |
* C# wrapper added |
| 301 |
* Fixed issued that prevented compiling with VS2010 Beta2 |
| 302 |
|
| 303 |
|
| 304 |
Rev 1.30: 09.06.2008 |
| 305 |
-------------------- |
| 306 |
|
| 307 |
Changes: |
| 308 |
* Epsilon of the numerical differentiation algorithm changed to allow greater accuracy. |
| 309 |
|
| 310 |
New features: |
| 311 |
* Setting thousands separator and decimal separator is now possible |
| 312 |
|
| 313 |
Bugfixes: |
| 314 |
* The dll interface did not provide a callback for functions without any arguments. |
| 315 |
|
| 316 |
|
| 317 |
Rev 1.29: Januar 2008 |
| 318 |
--------------------- |
| 319 |
|
| 320 |
Unrelease Version available only via SVN. |
| 321 |
|
| 322 |
|
| 323 |
Rev 1.28: 02. July, 2007 |
| 324 |
--------------------------- |
| 325 |
|
| 326 |
Library changes: |
| 327 |
* Interface for the dynamic library changed and extended to create an interface |
| 328 |
using pure C functions only. |
| 329 |
* mupInit() removed |
| 330 |
|
| 331 |
Build system: |
| 332 |
* MSVC7 Project files removed in favor of MSVC8 |
| 333 |
|
| 334 |
Bugfixes: |
| 335 |
* The dynamic library did not build on other systems than linux due to a misplaced |
| 336 |
preprocessor definition. This is fixed now. |
| 337 |
|
| 338 |
|
| 339 |
Rev 1.27: |
| 340 |
--------------------------- |
| 341 |
|
| 342 |
Build system: |
| 343 |
* Modified build\ directory layout introducing some subfolders |
| 344 |
for the various IDE supported |
| 345 |
* Project files for BCB and MSVC7 added |
| 346 |
* Switched to use bakefile 0.2.1 which now correctly creates the |
| 347 |
"make uninstall" target for autoconf's Makefile.in |
| 348 |
* Now the library debug builds are named "muparserd" instead of "muparser" |
| 349 |
to allow multiple mixed release/debug builds to coexist; so e.g. on Windows |
| 350 |
when building with DEBUG=1, you'll get "muparserd.lib" instead of "muparser.lib" |
| 351 |
|
| 352 |
New Features: |
| 353 |
* Factory functions can now take a user defined pointer |
| 354 |
* String functions can now be used with up to two additional |
| 355 |
double parameters |
| 356 |
* Support for UNICODE character types added |
| 357 |
* Infix operator priority can now be changed by the user |
| 358 |
|
| 359 |
Bugfixes: |
| 360 |
* An internal error was raised when evaluating an empty |
| 361 |
expressions |
| 362 |
* The error message raised in case of name collisions between |
| 363 |
implicitely defined variables and postfix operators did contain |
| 364 |
misleading data. |
| 365 |
|
| 366 |
|
| 367 |
Rev 1.26: (unofficial release) |
| 368 |
------------------------------ |
| 369 |
|
| 370 |
New Features: |
| 371 |
* Unary operator precedence can now be changed by the user. |
| 372 |
|
| 373 |
|
| 374 |
Rev 1.25: 5. February, 2006 |
| 375 |
--------------------------- |
| 376 |
|
| 377 |
Build system: (special thanks to Francesco Montorsi for implementing it!) |
| 378 |
* created a bakefile-based build system which adds support for the following win32 compilers: |
| 379 |
-> MS visual C++ (6 and .NET) |
| 380 |
-> BorlandC++ (5 or greater) |
| 381 |
-> Mingw32 (tested with gcc 3.2) |
| 382 |
-> Watcom (not tested) |
| 383 |
and for GCC on Unix (using a standard autoconf's configure script). |
| 384 |
|
| 385 |
Compatibility improvements: |
| 386 |
* fixed some small warnings when using -Wall with GCC on Unix |
| 387 |
* added inclusion guards for win32-specific portions of code |
| 388 |
* added fixes that remove compiler warnings on Intel C++ and the Solaris C++ compiler. |
| 389 |
|
| 390 |
|
| 391 |
Rev 1.24: 29. October, 2005 |
| 392 |
--------------------------- |
| 393 |
|
| 394 |
Changes: |
| 395 |
|
| 396 |
Compatibility improvements: |
| 397 |
* parser now works on 64 bit compilers |
| 398 |
* (bytecode base datatype can now be changed freely) |
| 399 |
|
| 400 |
|
| 401 |
Rev 1.23: 19. October, 2005 |
| 402 |
--------------------------- |
| 403 |
|
| 404 |
Changes: |
| 405 |
|
| 406 |
Bugfixes: |
| 407 |
* Variable factory examples in Example1.cpp and Example3.cpp contained a subtle bug. |
| 408 |
|
| 409 |
New features: |
| 410 |
* Added a MSVC6 project file and introduced muParserFixes.h in order to make it compile with MSVC6 |
| 411 |
|
| 412 |
|
| 413 |
Rev 1.22: October, 2005 |
| 414 |
----------------------- |
| 415 |
|
| 416 |
Release notes: |
| 417 |
|
| 418 |
All features of Version 1.22 are similar to Version 1.21. Version 1.22 fixes a compilation issue with |
| 419 |
gcc 4.0. In order to fix this issue I rewrote part of the library to remove some unnecessary templates. |
| 420 |
This should make the code cleaner. The Borland Project files were removed. If you want to use it |
| 421 |
with Borland either use the dll version or create your own project files. I can't support it since I don't |
| 422 |
have this compiler at hand. |
| 423 |
|
| 424 |
Changes: |
| 425 |
|
| 426 |
Project Changes: |
| 427 |
* Borland project files removed |
| 428 |
(The code should still compile with BCB but I can't provide you with project files) |
| 429 |
|
| 430 |
Internal Changes: |
| 431 |
* unnecessary template files have been removed: |
| 432 |
- new files: muParserError.cpp, muParserTokenReader.cpp, muParserCallback.cpp |
| 433 |
- removed Files: muIParserTypes.h |
| 434 |
|
| 435 |
|
| 436 |
Rev 1.2 / 1.21: April, 2005 |
| 437 |
--------------------------- |
| 438 |
|
| 439 |
Release Notes: |
| 440 |
First of all the interface has changed so this version is not backwards compatible. |
| 441 |
After receiving a couple of questions about it, this version features support for |
| 442 |
user defined binary operators. Consequently the built in operators can now be |
| 443 |
turned off, thus you can deactivate them and write complete customized parser |
| 444 |
subclasses that only contain the functionality you want. Another new feature is |
| 445 |
the introduction of callback functions taking string arguments, implicit |
| 446 |
generation of variables and the Assignment operator. |
| 447 |
|
| 448 |
Functionality |
| 449 |
* New built in operator: xor; Logical xor. |
| 450 |
* New built in operator: Assignment operator; Defining variables in terms of |
| 451 |
other variables/constants |
| 452 |
* New feature: Strings as arguments for callback functions |
| 453 |
* New feature: User defined binary operators |
| 454 |
* New feature: ParserInt a class with a sample implementation for |
| 455 |
integer numbers. |
| 456 |
* New feature: Callbacks to value regognition functions. |
| 457 |
|
| 458 |
* Removed: all predefined postfix operators have been removed. |
| 459 |
* New project file: Now comes with a ready to use windows DLL. |
| 460 |
* New project file: Makefile for cygwin now included. |
| 461 |
* New example: Example3 shows usage of the DLL. |
| 462 |
|
| 463 |
Interface changes |
| 464 |
* New member function: DefineOprt For adding user defined binary operators. |
| 465 |
* New member function: EnableBuiltInOprt(bool) Enables/Disables built in |
| 466 |
binary operators. |
| 467 |
* New member function: AddValIdent(...) to add callbacks for custom value |
| 468 |
recognition functions. |
| 469 |
* Removed: SetVar(), SetConst(). |
| 470 |
* Renamed: Most interface functions have been renamed |
| 471 |
* Changed: The type for multiargument callbacks multfun_type has changed. |
| 472 |
It no longer takes a std::vector as input. |
| 473 |
|
| 474 |
Internal changes |
| 475 |
* new class muParserTokenReader.h encapsulates the token identification |
| 476 |
and token assignment. |
| 477 |
* Internal handling of function callbacks unified as a result the performance |
| 478 |
of the bytecode evaluation increased. |
| 479 |
|
| 480 |
|
| 481 |
Rev 1.10 : December 30, 2004 |
| 482 |
---------------------------- |
| 483 |
|
| 484 |
Release Notes: |
| 485 |
This version does not contain major new feature compared to V1.07 but its internal structure has |
| 486 |
changed significantly. The String parsing routine is slower than the one of V1.07 but bytecode |
| 487 |
parsing is equally fast. On the other hand the error messages of V1.09 are more flexible and you |
| 488 |
can change its value datatype. It should work on 64-bit systems. For this reason I supply both |
| 489 |
versions for download. If you use V1.07 and are happy with it there is no need for updating |
| 490 |
your version. |
| 491 |
|
| 492 |
* New example program: Archive now contains two demo programs: One for standard C++ and one for |
| 493 |
managed C++. |
| 494 |
* New member function: RemoveVar(...) can be used for removing a single variable from the internal |
| 495 |
storage. |
| 496 |
* New member function: GetVar() can be used for querying the variable names and pointers of all |
| 497 |
variables defined in the parser. |
| 498 |
* New member function: GetConst() can be used for querying all defined constants and their values. |
| 499 |
* New member function: GetFunDef() can be used for querying all defined functions and the number of |
| 500 |
arguments they expect. |
| 501 |
* Internal structure changed; hanging base datatype at compile time is now possible. |
| 502 |
* Bugfix: Postfix operator parsing could fail in certain cases; This has been fixed now. |
| 503 |
* Bugfix: Variable names must will now be tested if they conflict with constant or function names. |
| 504 |
* Internal change: Removed most dependencies from the C-string libraries. |
| 505 |
* Internal change: Bytecode is now stored in a separate class: ParserByteCode.h |
| 506 |
* Internal change: GetUsedVar() does no longer require that variables are defined at time of call. |
| 507 |
* Internal change: Error treatment changed. ParserException is no longer derived from |
| 508 |
std::runtime_error; Internal treatment of Error messages changed. |
| 509 |
* New functions in Parser interface: ValidNameChars(), ValidOprtChars() and ValidPrefixOprtChars() |
| 510 |
they are used for defining the charset allowed for variable-, operator- and |
| 511 |
function names. |
| 512 |
|
| 513 |
|
| 514 |
Rev 1.09 : November 20, 2004 |
| 515 |
---------------------------- |
| 516 |
|
| 517 |
* New member function: RemoveVar(...) can be used for removing a single variable from the internal |
| 518 |
storage. |
| 519 |
* Internal structure changed; changing base datatype at compile time is now possible. |
| 520 |
* Bug fix: Postfix operator parsing could fail in certain cases; This has been fixed now. |
| 521 |
* Internal change: Removed most dependencies from the C-string libraries. |
| 522 |
* Internal change: Bytecode is now stored in a separate class: ParserByteCode.h. |
| 523 |
* Internal change: GetUsedVar() does no longer require that variables are defined at time of call. |
| 524 |
* Internal change: Error treatment changed. ParserException is no longer derived from |
| 525 |
std::runtime_error; Internal treatment of Error messages changed. |
| 526 |
* New functions in Parser interface; ValidNameChars(), ValidOprtChars() and ValidPrefixOprtChars() |
| 527 |
they are used for defining the charset allowed for variable-, operator- and function names. |
| 528 |
|
| 529 |
|
| 530 |
Rev 1.08 : November, 2004 |
| 531 |
------------------------- |
| 532 |
|
| 533 |
* unpublished; experimental template version with respect to data type and underlying string |
| 534 |
type (string <-> widestring). The idea was dropped... |
| 535 |
|
| 536 |
|
| 537 |
Rev 1.07 : September 4 2004 |
| 538 |
--------------------------- |
| 539 |
|
| 540 |
* Improved portability; Changes to make life for MSVC 6 user easier, there are probably still some |
| 541 |
issues left. |
| 542 |
* Improved portability; Changes in order to allow compiling on BCB. |
| 543 |
* New function; value_type Diff(value_type *a_Var, value_type a_fPos) 4th order Differentiation with |
| 544 |
respect to a certain variable; added in muParser.h. |
| 545 |
|
| 546 |
|
| 547 |
Rev 1.06 : August 20 2004 |
| 548 |
------------------------- |
| 549 |
|
| 550 |
* Volatile functions added; All overloaded AddFun(...) functions can now take a third parameter |
| 551 |
indicating that the function can not be optimized. |
| 552 |
* Internal changes: muParserStack.h simplified; refactorings |
| 553 |
* Parser is now distributed under the MIT License; all comments changed accordingly. |
| 554 |
|
| 555 |
|
| 556 |
Rev 1.05 : August 20 2004 |
| 557 |
------------------------- |
| 558 |
|
| 559 |
* Variable/constant names will now be checked for invalid characters. |
| 560 |
* Querying the names of all variables used in an expression is now possible; new function: GetUsedVar(). |
| 561 |
* Disabling bytecode parsing is now possible; new function: EnableByteCode(bool bStat). |
| 562 |
* Predefined functions with variable number of arguments added: sum, avg, min, max. |
| 563 |
* Unary prefix operators added; new functions: AddPrefixOp(...), ClearPrefixOp(). |
| 564 |
* Postfix operator interface names changed; new function names: AddPostfixOp(...), ClearPostfixOp(). |
| 565 |
* Hardcoded sign operators removed in favor of prefix operators; bytecode format changed accordingly. |
| 566 |
* Internal changes: static array removed in Command code calculation routine; misc. changes. |
| 567 |
|
| 568 |
|
| 569 |
Rev 1.04 : August 16 2004 |
| 570 |
------------------------- |
| 571 |
|
| 572 |
* Support for functions with variable number of arguments added. |
| 573 |
* Internal structure changed; new: ParserBase.h, ParserBase.cpp; removed: ParserException.h; |
| 574 |
changed: Parser.h, Parser.cpp. |
| 575 |
* Bug in the bytecode calculation function fixed (affected the unary minus operator). |
| 576 |
* Optimizer can be deactivated; new function: EnableOptimizer(bool bStat). |
| 577 |
|
| 578 |
|
| 579 |
Rev 1.03 : August 10 2004 |
| 580 |
------------------------- |
| 581 |
|
| 582 |
* Support for user-defined unary postfix operators added; new functions: AddPostOp(), InitPostOp(), |
| 583 |
ClearPostOp(). |
| 584 |
* Minor changes to the bytecode parsing routine. |
| 585 |
* User defined functions can now have up to four parameters. |
| 586 |
* Performance optimized: simple formula optimization added; (precalculation of constant parts of the |
| 587 |
expression). |
| 588 |
* Bug fixes: Multi-arg function parameters, constant name lookup and unary minus did not work properly. |
| 589 |
|
| 590 |
|
| 591 |
Rev 1.02 : July 30 2004 |
| 592 |
----------------------- |
| 593 |
|
| 594 |
* Support for user defined constants added; new functions: InitConst(), AddConst(), SetConst(), |
| 595 |
ClearConst(). |
| 596 |
* Single variables can now be added using AddVar(); you have now the choice of adding them either |
| 597 |
one by one or all at the same time using SetVar(const varmap_type &a_vVar). |
| 598 |
* Internal handling of variables changed, is now similar to function handling. |
| 599 |
* Virtual destructor added; InitFun(), InitConst() are now virtual too thus making it possible to |
| 600 |
derive new parsers with a modified set of default functions and constants. |
| 601 |
* Support for user defined functions with 2 or 3 parameters added; bytecode format changed to hold |
| 602 |
function parameter count. |
| 603 |
|
| 604 |
|
| 605 |
Rev 1.01 : July 23 2004 |
| 606 |
----------------------- |
| 607 |
|
| 608 |
* Support for user defined functions has been added; new functions: AddFun(), ClearFun(), |
| 609 |
InitFunctions(). |
| 610 |
* Built in constants have been removed; the parser contained undocumented built in |
| 611 |
constants pi, e. |
| 612 |
There was the possibility of name conflicts with user defined variables. |
| 613 |
* Setting multiple variables with SetVar can now be done with a map of names and pointers as the only |
| 614 |
argument. For this reason, a new type Parser::varmap_type was added. The old version that took 3 |
| 615 |
arguments (array of names, array of pointers, and array length) is now marked as deprecated. |
| 616 |
* The names of logarithm functions have changed. The new names are: log2 for base 2, log10 or log for |
| 617 |
base 10, and ln for base e. |
| 618 |
|
| 619 |
|
| 620 |
Rev 1.00 : July 21 2004 |
| 621 |
----------------------- |
| 622 |
|
| 623 |
* Initial release |