uncommitted - muparser

Ready changes

Summary

Import uploads missing from VCS:

Diff

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..777f474
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+
+.vs/muparser/v16/.suo
+*.db
+*.db-shm
+*.opendb
+*.db-wal
+*.ipch
+.vs/*
+build/*
+out/*
+CMakeSettings.json
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index ac0e531..ddd5355 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,11 @@
 language: c++
-dist: trusty
 sudo: false
 compiler:
   - clang
   - gcc
 script:
-  - cmake -Bbuild-ci -H.
-  - cmake --build build-ci
+  # LD_LIBRARY_PATH workaround to find clang's libomp: https://github.com/travis-ci/travis-ci/issues/8613
+  - if [[ ${CC} = clang ]]; then export LD_LIBRARY_PATH=/usr/local/clang/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH; fi
+  - cmake -DCMAKE_C_FLAGS="-Wall" -DCMAKE_CXX_FLAGS="-Wall" -DCMAKE_INSTALL_PREFIX=~/.local/ .
+  - make install -j2
+  - ctest --output-on-failure
diff --git a/Changes.txt b/CHANGELOG
similarity index 84%
rename from Changes.txt
rename to CHANGELOG
index a7baf22..3ad1916 100644
--- a/Changes.txt
+++ b/CHANGELOG
@@ -1,26 +1,85 @@
-#######################################################################
-#                                                                     #
-#                                                                     #
-#                 __________                                          #
-#    _____   __ __\______   \_____  _______  ______  ____ _______     #
-#   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \    #
-#  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/    #
-#  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|       #
-#        \/                       \/            \/      \/            #
-#					  Fast math parser Library                        #
-#                                                                     #
-#  Copyright (C) 2015 Ingo Berg                                       #
-#                                                                     #
-#  Web:     muparser.beltoforion.de                                   #
-#  e-mail:  muparser@beltoforion.de                                   #
-#                                                                     #
-#                                                                     #
-#######################################################################
- 
+
+     _____  __ _____________ _______  ______ ___________
+    /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+         \/      |__|       \/           \/     \/
+    Copyright (C) 2004 - 2020 Ingo Berg
+
+=======================================================================
+    https://beltoforion.de/en/muparser
+=======================================================================
 
 History:
 --------
 
+GitHub Master
+---------------------
+  Build System Changes (CMake):
+   * Added a new option "-DENABLE_WIDE_CHAR" to CMake for building muparser with wide character support
+   
+  Compiler Warnings fixed/disabled (Visual Studio):
+   * Disabled compiler warning 26812 (Prefer 'enum class' over 'enum')
+     I consider this a bogus warning. Use of plain old enums has not been deprecated and only MSVC is complaining. 
+   * Disabled compiler warning 4251 (... needs to have dll-interface to be used by clients of class ...)
+     When the build system was changed to CMake Linux and Windows builds were unified. Each dynamic library contains the 
+     class interface as well as the C-interface. Before the linux shared library was using the class interface and the 
+     windows dll was using the C-interface.
+    
+     Only the C-Interface is safe to use when you intent to bring an executable to another linux distribution or windows version! 
+     This is up to the client software. I cannot change this because on linux the shared library was always using the class 
+     interface. Usually this is not a problem since distributions compile all applications from scratch. 
+
+     If you use the class interface you can not take for granted that your software will run with a muparser 
+     version compiled for another operating system or linux distribution! You must either use the C-Interface if you 
+     want this or use a static library build of muparser!
+
+  Security Fixes: (The issues were present in all prior stable releases)
+   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24167 
+   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24355
+   
+  Bugfixes:
+   * fixed a couple of issues for building the C-Interface (muParserDLL.cpp/.h) with wide character support.
+
+Rev 2.3.2: 17.06.2020
+---------------------
+  API-Change Revertion (to 2.3.0):
+   * removed final keyword from Parser class (added in 2.3.0) as this was breaking existing Applications
+
+  Changes:
+   * made Parser class final
+   * using OpenMP is now the default settings for cmake based builds
+   * added optimization for trivial expressions. (Expressions whose RPN only has a single entry)
+   * introduced a maximum length for expressions (5000 Character)
+   * introduced a maximum length for identifiers (100 Characters)
+   * 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)
+   * removed ParserStack.h (replaced with std::stack)
+   * removed macros for defining E and PI (replaced with a static constants)
+   * source code is now aimed at C++17
+   * the MUP_ASSERT macro is no longer removed in release builds for better protection against segmentation faults
+
+  Security Fixes: (The issues were present in all prior stable releases)
+   * Prevented multiple access violations for malformed expressions with if then else and functions taking multiple arguments like "sum(0?1,2,3,4:5)"
+   	   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23330
+	   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22922
+	   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22938
+	   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23330
+	   * https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23410
+   * Added additional runtime checks for release builds to prevent segmentation faults for invalid expressions
+
+  Bugfixes:
+   * Fixed an issue where the bulk mode could hang on GCC/CLANG builds due to OpenMP chunksize dropping below 1.
+
+Rev 2.3.0 - 2.3.1:
+------------------
+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
+
+Rev 2.2.6: 04.10.2018
+---------------------
+  Changes:
+   * Build system is now based on cmake
+   * several compiler warnings fixed
+
 Rev 2.2.5: 27.04.2015
 ---------------------
   Changes:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a217c60..143894f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,18 +10,16 @@ endif ()
 
 project(muParserProject)
 
-include(CTest)
-enable_testing()
-
 # Bump versions on release
 set(MUPARSER_VERSION_MAJOR 2)
-set(MUPARSER_VERSION_MINOR 2)
-set(MUPARSER_VERSION_PATCH 6)
+set(MUPARSER_VERSION_MINOR 3)
+set(MUPARSER_VERSION_PATCH 3)
 set(MUPARSER_VERSION ${MUPARSER_VERSION_MAJOR}.${MUPARSER_VERSION_MINOR}.${MUPARSER_VERSION_PATCH})
 
 # Build options
 option(ENABLE_SAMPLES "Build the samples" ON)
-option(ENABLE_OPENMP "Enable OpenMP for multithreading" OFF)
+option(ENABLE_OPENMP "Enable OpenMP for multithreading" ON)
+option(ENABLE_WIDE_CHAR "Enable wide character support" OFF)
 option(BUILD_SHARED_LIBS "Build shared/static libs" ON)
 
 if(ENABLE_OPENMP)
@@ -30,7 +28,6 @@ if(ENABLE_OPENMP)
     set(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${OpenMP_CXX_FLAGS} ${CMAKE_SHARED_LIBRARY_CXX_FLAGS}")
 endif()
 
-
 # Credit: https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake/3818084
 if(MSVC)
     # Force to always compile with W4
@@ -44,26 +41,24 @@ elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
 endif()
 
-include_directories("${CMAKE_SOURCE_DIR}/include")
-add_library(muparser
-    src/muParserBase.cpp
-    src/muParserBytecode.cpp
-    src/muParserCallback.cpp
-    src/muParser.cpp
-    src/muParserDLL.cpp
-    src/muParserError.cpp
-    src/muParserInt.cpp
-    src/muParserTest.cpp
-    src/muParserTokenReader.cpp
+FILE(GLOB_RECURSE MUPARSER_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") #all .cpp
+add_library(muparser ${MUPARSER_SOURCES})
+
+# Use the headers in the build-tree or the installed ones
+target_include_directories(muparser PUBLIC
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+    $<INSTALL_INTERFACE:include>
 )
 
-# this compiles the "DLL" interface (C API)
+# This compiles the "DLL" interface (C API)
 target_compile_definitions(muparser PRIVATE MUPARSER_DLL)
 
 if (BUILD_SHARED_LIBS)
   target_compile_definitions(muparser PRIVATE MUPARSERLIB_EXPORTS)
+  add_definitions( -DMUPARSERLIB_EXPORTS )
 else ()
   target_compile_definitions(muparser PUBLIC MUPARSER_STATIC)
+  add_definitions( -DMUPARSER_STATIC )
 endif()
 
 if (CMAKE_BUILD_TYPE STREQUAL Debug)
@@ -73,14 +68,16 @@ endif ()
 if(ENABLE_OPENMP)
   target_compile_definitions(muparser PRIVATE MUP_USE_OPENMP)
 endif()
+
+if(ENABLE_WIDE_CHAR)
+  target_compile_definitions(muparser PUBLIC _UNICODE)
+endif()
+
 set_target_properties(muparser PROPERTIES
     VERSION ${MUPARSER_VERSION}
     SOVERSION ${MUPARSER_VERSION_MAJOR}
 )
 
-# Install the export set for use with the install-tree
-export(TARGETS muparser FILE "${CMAKE_BINARY_DIR}/muparser-targets.cmake")
-
 if(ENABLE_SAMPLES)
   add_executable(example1 samples/example1/example1.cpp)
   target_link_libraries(example1 muparser)
@@ -92,40 +89,67 @@ endif()
 # The GNUInstallDirs defines ${CMAKE_INSTALL_DATAROOTDIR}
 # See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
 include (GNUInstallDirs)
+set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/muparser)
 
 install(TARGETS muparser
+    EXPORT muparser-export
     LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT RuntimeLibraries
     ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT RuntimeLibraries
 )
 
+FILE(GLOB_RECURSE MUPARSER_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h") #all .h
 install(FILES
-    include/muParserBase.h
-    include/muParserBytecode.h
-    include/muParserCallback.h
-    include/muParserDef.h
-    include/muParserDLL.h
-    include/muParserError.h
-    include/muParserFixes.h
-    include/muParser.h
-    include/muParserInt.h
-    include/muParserStack.h
-    include/muParserTemplateMagic.h
-    include/muParserTest.h
-    include/muParserToken.h
-    include/muParserTokenReader.h
+    ${MUPARSER_HEADERS}
     DESTINATION include
     COMPONENT Development
 )
 
+# Export the target under the build-tree (no need to install)
+export(EXPORT muparser-export
+    FILE "${CMAKE_BINARY_DIR}/muparser-targets.cmake"
+    NAMESPACE muparser::
+)
+
+# Export the installed target (typically for packaging)
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file(
+    "${CMAKE_CURRENT_BINARY_DIR}/muparserConfigVersion.cmake"
+    VERSION ${MUPARSER_VERSION}
+    COMPATIBILITY AnyNewerVersion
+)
+configure_file(muparserConfig.cmake.in
+    "${CMAKE_CURRENT_BINARY_DIR}/muparserConfig.cmake"
+    COPYONLY
+)
+install(EXPORT muparser-export
+    FILE muparser-targets.cmake
+    NAMESPACE muparser::
+    DESTINATION ${INSTALL_CONFIGDIR}
+)
+install(FILES
+    ${CMAKE_CURRENT_BINARY_DIR}/muparserConfig.cmake
+    ${CMAKE_CURRENT_BINARY_DIR}/muparserConfigVersion.cmake
+    DESTINATION ${INSTALL_CONFIGDIR}
+    COMPONENT Development
+)
+
 # Define variables for the pkg-config file
 set(PACKAGE_NAME muparser)
 configure_file(
-    "${CMAKE_SOURCE_DIR}/build/autoconf/muparser.pc.cmakein"
-    "${CMAKE_BINARY_DIR}/muparser.pc"
+    muparser.pc.in
+    ${CMAKE_BINARY_DIR}/muparser.pc
     @ONLY
 )
 install(
-    FILES "${CMAKE_BINARY_DIR}/muparser.pc"
-    DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
+    FILES ${CMAKE_BINARY_DIR}/muparser.pc
+    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
 )
+
+include(CTest)
+
+if (BUILD_TESTING)
+    add_executable (t_ParserTest test/t_ParserTest.cpp)
+    target_link_libraries(t_ParserTest muparser)
+    add_test (NAME ParserTest COMMAND t_ParserTest)
+endif()
diff --git a/Install.txt b/Install.txt
index ed8ae97..feb9649 100644
--- a/Install.txt
+++ b/Install.txt
@@ -1,86 +1,24 @@
-#######################################################################
-#                                                                     #
-#                                                                     #
-#                 __________                                          #
-#    _____   __ __\______   \_____  _______  ______  ____ _______     #
-#   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \    #
-#  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/    #
-#  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|       #
-#        \/                       \/            \/      \/            #
-#					  Fast math parser Library    #
-#                                                                     #
-#  Copyright (C) 2012 Ingo Berg                                       #
-#                                                                     #
-#  Web:     muparser.beltoforion.de                                   #
-#  e-mail:  muparser@beltoforion.de                                   #
-#                                                                     #
-#                                                                     #
-#######################################################################
-
-
-
- Contents
- ========
-
- 1. Installation on win32
- 2. Installation on unix
-    2.1 Other miscellaneous info Unix-specific
- 3. Where to ask for help
-
-
-
- 1. Installation on win32
- ========================
-
- muParser supports various win32 command-line compilers:
- -> mingw
- -> watcom
- -> microsoft CL
- and provides also the project files for MSVC6 IDE.
-
- In order to compile muParser from makefiles, open an MSDOS
- prompt and then move to the muParser/build directory and
- type:
-   
-   mingw32-make -fmakefile.mingw    for mingw
-   nmake -fmakefile.vc              for msvc
-   make -fmakefile.bcc              for borland
-   wmake -fmakefile.wat             for watcom
-
- All makefiles supports the following options:
-
-        # Set to 1 to build debug version [0,1]
-        #   0 - Release
-        #   1 - Debug
-        DEBUG = 0
-
-        # Set to 1 to build shared (DLL) version [0,1]
-        #   0 - Static
-        #   1 - DLL
-        SHARED = 0
-
-        # Set to 1 to compile samples [0,1]
-        SAMPLES = 1
-
- The muParser library is created in the 'lib' folder and the sample
- binaries are created in samples\example1 or samples\example2.
-
- NOTE: samples\example1 can be compiled *only* when building
-       muParser as a STATIC library (SHARED=0).
-       samples\example2 can be compiled *only* when building
-       muParser as a SHARED library (SHARED=1).
 
+     _____  __ _____________ _______  ______ ___________
+    /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+         \/      |__|       \/           \/     \/
+    Copyright (C) 2004 - 2020 Ingo Berg
 
+=======================================================================
+    https://muparser.beltoforion.de
+=======================================================================
 
- 2. Installation on Unix/Linux
- =============================
+ Installation
+ ============
 
  muParser can be installed just extracting the sources somewhere
  and then, from a terminal, typing:
 
    cd [path to muParser]
-   ./configure [--enable-shared=yes/no] [--enable-samples=yes/no]
-               [--enable-debug=yes/no]
+   cmake . [-DENABLE_SAMPLES=ON/OFF] [-DENABLE_OPENMP=OFF/ON] [-DENABLE_WIDE_CHAR=OFF/ON]
+           [-DBUILD_SHARED_LIBS=ON/OFF]
    make
    [sudo*] make install
    [sudo*] ldconfig
@@ -98,13 +36,13 @@
 
 
 
- 2.1 Other miscellaneous info Unix-specific
- ==========================================
+ Other miscellaneous info Unix-specific
+ ======================================
 
  If you don't like to have your muParser folder filled by temporary
  files created by GCC, then you can do the following:
 
-    mkdir mybuild && cd mybuild && ../configure && make
+    mkdir mybuild && cd mybuild && cmake .. && make
 
  to put all object files in the "mybuild" directory.
 
@@ -123,11 +61,8 @@
  3. Where to ask for help
  ========================
 
- If you find problems with either compilation, installation or usage
- of muParser, then you can ask in the muParser forum at:
+ Please report any bugs or issues at the muparser project page at GitHub:
 
-  https://sourceforge.net/forum/forum.php?forum_id=462843
+  https://github.com/beltoforion/muparser/issues
 
- For more info about muParser, visit:
-  http://sourceforge.net/projects/muparser/
-  http://muparser.sourceforge.net
+ 
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..e0a01f1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+Copyright 2020 Ingo Berg
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/License.txt b/License.txt
deleted file mode 100644
index 6428656..0000000
--- a/License.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-#######################################################################
-#                                                                     #
-#                                                                     #
-#                 __________                                          #
-#    _____   __ __\______   \_____  _______  ______  ____ _______     #
-#   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \    #
-#  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/    #
-#  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|       #
-#        \/                       \/            \/      \/            #
-#					  Fast math parser Library    #
-#                                                                     #
-#  Copyright (C) 2011 Ingo Berg                                       #
-#                                                                     #
-#  Web:     muparser.beltoforion.de                                   #
-#  e-mail:  muparser@beltoforion.de                                   #
-#                                                                     #
-#                                                                     #
-#######################################################################
-
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
-  OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 157be77..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,368 +0,0 @@
-# =========================================================================
-#     This makefile was generated by
-#     Bakefile 0.2.9 (http://www.bakefile.org)
-#     Do not modify, all changes will be overwritten!
-# =========================================================================
-
-
-@MAKE_SET@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-datarootdir = @datarootdir@
-INSTALL = @INSTALL@
-SHARED_LD_CXX = @SHARED_LD_CXX@
-LIBEXT = @LIBEXT@
-LIBPREFIX = @LIBPREFIX@
-SO_SUFFIX = @SO_SUFFIX@
-DLLIMP_SUFFIX = @DLLIMP_SUFFIX@
-EXEEXT = @EXEEXT@
-LN_S = @LN_S@
-SETFILE = @SETFILE@
-PIC_FLAG = @PIC_FLAG@
-SONAME_FLAG = @SONAME_FLAG@
-STRIP = @STRIP@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_DIR = @INSTALL_DIR@
-BK_DEPS = @BK_DEPS@
-srcdir = @srcdir@
-top_builddir = @top_builddir@
-libdir = @libdir@
-DLLPREFIX = @DLLPREFIX@
-LIBS = @LIBS@
-AR = @AR@
-AROPTIONS = @AROPTIONS@
-RANLIB = @RANLIB@
-CXX = @CXX@
-CXXFLAGS = @CXXFLAGS@
-CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
-
-### Variables: ###
-
-DESTDIR = 
-MUPARSER_LIB_CXXFLAGS = $(____DEBUG) $(____SHARED) $(____SHARED_0) \
-	-I$(srcdir)/include $(CPPFLAGS) $(CXXFLAGS)
-MUPARSER_LIB_OBJECTS =  \
-	muParser_lib_muParser.o \
-	muParser_lib_muParserBase.o \
-	muParser_lib_muParserBytecode.o \
-	muParser_lib_muParserCallback.o \
-	muParser_lib_muParserDLL.o \
-	muParser_lib_muParserError.o \
-	muParser_lib_muParserInt.o \
-	muParser_lib_muParserTest.o \
-	muParser_lib_muParserTokenReader.o
-MUPARSER_LIB_HEADERS =  \
-	include/muParser.h \
-	include/muParserBase.h \
-	include/muParserBytecode.h \
-	include/muParserCallback.h \
-	include/muParserDLL.h \
-	include/muParserDef.h \
-	include/muParserError.h \
-	include/muParserFixes.h \
-	include/muParserInt.h \
-	include/muParserStack.h \
-	include/muParserTemplateMagic.h \
-	include/muParserTest.h \
-	include/muParserToken.h \
-	include/muParserTokenReader.h
-MUPARSER_DLL_CXXFLAGS = $(____DEBUG) $(____SHARED) $(____SHARED_0) \
-	-I$(srcdir)/include $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS)
-MUPARSER_DLL_OBJECTS =  \
-	muParser_dll_muParser.o \
-	muParser_dll_muParserBase.o \
-	muParser_dll_muParserBytecode.o \
-	muParser_dll_muParserCallback.o \
-	muParser_dll_muParserDLL.o \
-	muParser_dll_muParserError.o \
-	muParser_dll_muParserInt.o \
-	muParser_dll_muParserTest.o \
-	muParser_dll_muParserTokenReader.o
-MUPARSER_DLL_HEADERS =  \
-	include/muParser.h \
-	include/muParserBase.h \
-	include/muParserBytecode.h \
-	include/muParserCallback.h \
-	include/muParserDLL.h \
-	include/muParserDef.h \
-	include/muParserError.h \
-	include/muParserFixes.h \
-	include/muParserInt.h \
-	include/muParserStack.h \
-	include/muParserTemplateMagic.h \
-	include/muParserTest.h \
-	include/muParserToken.h \
-	include/muParserTokenReader.h
-EXAMPLE1_CXXFLAGS = $(____DEBUG) -I$(srcdir)/include $(CPPFLAGS) $(CXXFLAGS)
-EXAMPLE1_OBJECTS =  \
-	example1_example1.o
-
-### Conditionally set variables: ###
-
-@COND_DEPS_TRACKING_0@CXXC = $(CXX)
-@COND_DEPS_TRACKING_1@CXXC = $(BK_DEPS) $(CXX)
-@COND_DEBUG_0@DEBUG_BUILD_POSTFIX = 
-@COND_DEBUG_1@DEBUG_BUILD_POSTFIX = d
-@COND_SHARED_0@__muParser_lib___depname = \
-@COND_SHARED_0@	$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT)
-@COND_SHARED_0@__install_muParser_lib___depname = install_muParser_lib
-@COND_SHARED_0@__uninstall_muParser_lib___depname = uninstall_muParser_lib
-@COND_SHARED_0@__install_muParser_lib_headers___depname = \
-@COND_SHARED_0@	install_muParser_lib_headers
-@COND_SHARED_0@__uninstall_muParser_lib_headers___depname = \
-@COND_SHARED_0@	uninstall_muParser_lib_headers
-COND_SHARED_1___muParser_dll___depname = \
-	$(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-@COND_SHARED_1@__muParser_dll___depname = $(COND_SHARED_1___muParser_dll___depname)
-@COND_SHARED_1@__install_muParser_dll___depname = install_muParser_dll
-@COND_SHARED_1@__uninstall_muParser_dll___depname = uninstall_muParser_dll
-COND_PLATFORM_MACOSX_1___muParser_dll___macinstnamecmd = -install_name \
-	$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2)
-@COND_PLATFORM_MACOSX_1@__muParser_dll___macinstnamecmd = $(COND_PLATFORM_MACOSX_1___muParser_dll___macinstnamecmd)
-@COND_SHARED_1@__install_muParser_dll_headers___depname = \
-@COND_SHARED_1@	install_muParser_dll_headers
-@COND_SHARED_1@__uninstall_muParser_dll_headers___depname = \
-@COND_SHARED_1@	uninstall_muParser_dll_headers
-COND_PLATFORM_OS2_1___muParser_dll___importlib = -import \
-	$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_PLATFORM_OS2_1@__muParser_dll___importlib = $(COND_PLATFORM_OS2_1___muParser_dll___importlib)
-COND_WINDOWS_IMPLIB_1___muParser_dll___importlib = \
-	-Wl,--out-implib=$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_WINDOWS_IMPLIB_1@__muParser_dll___importlib = $(COND_WINDOWS_IMPLIB_1___muParser_dll___importlib)
-@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@__muParser_dll___targetsuf2 \
-@COND_PLATFORM_MACOSX_0_USE_SOVERSION_1@	= .$(SO_SUFFIX).2
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf2 \
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@	= .2.$(SO_SUFFIX)
-@COND_USE_SOVERSION_0@__muParser_dll___targetsuf2 = .$(SO_SUFFIX)
-@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@	= \
-@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@	.$(SO_SUFFIX).2.2.4
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@	= .2.2.4.$(SO_SUFFIX)
-@COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@__muParser_dll___targetsuf3 \
-@COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@	= .$(SO_SUFFIX).2
-@COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-@COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@	= -2.$(SO_SUFFIX)
-@COND_USE_SOVERSION_0@__muParser_dll___targetsuf3 = .$(SO_SUFFIX)
-COND_USE_SOVERLINUX_1___muParser_dll___soname_flags = \
-	$(SONAME_FLAG)$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2)
-@COND_USE_SOVERLINUX_1@__muParser_dll___soname_flags = $(COND_USE_SOVERLINUX_1___muParser_dll___soname_flags)
-COND_USE_SOVERSOLARIS_1___muParser_dll___soname_flags = \
-	$(SONAME_FLAG)$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-@COND_USE_SOVERSOLARIS_1@__muParser_dll___soname_flags = $(COND_USE_SOVERSOLARIS_1___muParser_dll___soname_flags)
-COND_USE_SOTWOSYMLINKS_1___muParser_dll___so_symlinks_cmd = (cd \
-	$(top_builddir)/lib/; rm -f \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
-	$(LN_S) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
-	$(LN_S) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX))
-@COND_USE_SOTWOSYMLINKS_1@__muParser_dll___so_symlinks_cmd = $(COND_USE_SOTWOSYMLINKS_1___muParser_dll___so_symlinks_cmd)
-COND_USE_SOVERSOLARIS_1___muParser_dll___so_symlinks_cmd = (cd \
-	$(top_builddir)/lib/; rm -f \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX); $(LN_S) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX))
-@COND_USE_SOVERSOLARIS_1@__muParser_dll___so_symlinks_cmd = $(COND_USE_SOVERSOLARIS_1___muParser_dll___so_symlinks_cmd)
-COND_USE_SOTWOSYMLINKS_1___muParser_dll___so_symlinks_inst_cmd = rm -f \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
-	$(LN_S) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2); \
-	$(LN_S) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_USE_SOTWOSYMLINKS_1@__muParser_dll___so_symlinks_inst_cmd = $(COND_USE_SOTWOSYMLINKS_1___muParser_dll___so_symlinks_inst_cmd)
-COND_USE_SOVERSOLARIS_1___muParser_dll___so_symlinks_inst_cmd = rm -f \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX); $(LN_S) \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX);
-@COND_USE_SOVERSOLARIS_1@__muParser_dll___so_symlinks_inst_cmd = $(COND_USE_SOVERSOLARIS_1___muParser_dll___so_symlinks_inst_cmd)
-COND_USE_SOTWOSYMLINKS_1___muParser_dll___so_symlinks_uninst_cmd = rm -f \
-	$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2) \
-	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_USE_SOTWOSYMLINKS_1@__muParser_dll___so_symlinks_uninst_cmd = $(COND_USE_SOTWOSYMLINKS_1___muParser_dll___so_symlinks_uninst_cmd)
-@COND_USE_SOVERSOLARIS_1@__muParser_dll___so_symlinks_uninst_cmd \
-@COND_USE_SOVERSOLARIS_1@	= rm -f \
-@COND_USE_SOVERSOLARIS_1@	$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_PLATFORM_MACOSX_1@__muParser_dll___macver = \
-@COND_PLATFORM_MACOSX_1@	-compatibility_version 1 -current_version 1
-@COND_SAMPLES_1@__example1___depname = \
-@COND_SAMPLES_1@	$(top_builddir)/samples/example1/example1$(EXEEXT)
-@COND_PLATFORM_MAC_0@__example1___mac_setfilecmd = @true
-@COND_PLATFORM_MAC_1@__example1___mac_setfilecmd = \
-@COND_PLATFORM_MAC_1@	$(SETFILE) -t APPL \
-@COND_PLATFORM_MAC_1@	$(top_builddir)/samples/example1/example1$(EXEEXT)
-@COND_SHARED_0@____SHARED = 
-@COND_SHARED_1@____SHARED = -DMUPARSER_DLL
-@COND_SHARED_0@____SHARED_0 = 
-@COND_SHARED_1@____SHARED_0 = -DMUPARSERLIB_EXPORTS
-@COND_DEBUG_0@____DEBUG = -DNDEBUG
-@COND_DEBUG_1@____DEBUG = 
-
-### Targets: ###
-
-all: $(__muParser_lib___depname) $(__muParser_dll___depname) $(__example1___depname)
-
-install: $(__install_muParser_lib___depname) $(__install_muParser_lib_headers___depname) $(__install_muParser_dll___depname) $(__install_muParser_dll_headers___depname)
-	$(INSTALL_DIR) $(DESTDIR)$(libdir)/pkgconfig
-	$(INSTALL_DATA) build/autoconf/muparser.pc $(DESTDIR)$(libdir)/pkgconfig
-
-uninstall: $(__uninstall_muParser_lib___depname) $(__uninstall_muParser_lib_headers___depname) $(__uninstall_muParser_dll___depname) $(__uninstall_muParser_dll_headers___depname)
-
-install-strip: install
-	$(STRIP) $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-
-clean: 
-	rm -rf ./.deps ./.pch
-	rm -f ./*.o
-	rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT)
-	rm -f $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-	rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-	rm -f $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf2)
-	rm -f $(top_builddir)/samples/example1/example1$(EXEEXT)
-
-distclean: clean
-	rm -f config.cache config.log config.status bk-deps bk-make-pch shared-ld-sh Makefile
-	rm -f build/autoconf/muparser.pc
-
-@COND_SHARED_0@$(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT): $(MUPARSER_LIB_OBJECTS)
-@COND_SHARED_0@	rm -f $@
-@COND_SHARED_0@	$(AR) $(AROPTIONS) $@ $(MUPARSER_LIB_OBJECTS)
-@COND_SHARED_0@	$(RANLIB) $@
-
-@COND_SHARED_0@install_muParser_lib: $(__muParser_lib___depname)
-@COND_SHARED_0@	$(INSTALL_DIR) $(DESTDIR)$(libdir)
-@COND_SHARED_0@	$(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT) $(DESTDIR)$(libdir)
-
-@COND_SHARED_0@uninstall_muParser_lib: 
-@COND_SHARED_0@	rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(LIBEXT)
-
-@COND_SHARED_0@install_muParser_lib_headers: 
-@COND_SHARED_0@	$(INSTALL_DIR) $(DESTDIR)$(prefix)
-@COND_SHARED_0@	for f in $(MUPARSER_LIB_HEADERS); do \
-@COND_SHARED_0@	if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \
-@COND_SHARED_0@	$(INSTALL_DIR) $(DESTDIR)$(prefix)/`dirname $$f`; \
-@COND_SHARED_0@	fi; \
-@COND_SHARED_0@	$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_0@	done
-
-@COND_SHARED_0@uninstall_muParser_lib_headers: 
-@COND_SHARED_0@	for f in $(MUPARSER_LIB_HEADERS); do \
-@COND_SHARED_0@	rm -f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_0@	done
-
-@COND_SHARED_1@$(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3): $(MUPARSER_DLL_OBJECTS)
-@COND_SHARED_1@	$(SHARED_LD_CXX) $@ $(MUPARSER_DLL_OBJECTS)   $(__muParser_dll___macinstnamecmd) $(__muParser_dll___importlib) $(__muParser_dll___soname_flags) $(__muParser_dll___macver) $(LDFLAGS)  $(LIBS)
-@COND_SHARED_1@	
-@COND_SHARED_1@	$(__muParser_dll___so_symlinks_cmd)
-
-@COND_SHARED_1@install_muParser_dll: $(__muParser_dll___depname)
-@COND_SHARED_1@	$(INSTALL_DIR) $(DESTDIR)$(libdir)
-@COND_SHARED_1@	$(INSTALL_DATA) $(top_builddir)/lib/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX) $(DESTDIR)$(libdir)
-@COND_SHARED_1@	$(INSTALL_PROGRAM) $(top_builddir)/lib/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3) $(DESTDIR)$(libdir)
-@COND_SHARED_1@	(cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_inst_cmd))
-
-@COND_SHARED_1@uninstall_muParser_dll: 
-@COND_SHARED_1@	rm -f $(DESTDIR)$(libdir)/$(LIBPREFIX)muparser$(DEBUG_BUILD_POSTFIX).$(DLLIMP_SUFFIX)
-@COND_SHARED_1@	rm -f $(DESTDIR)$(libdir)/$(DLLPREFIX)muparser$(DEBUG_BUILD_POSTFIX)$(__muParser_dll___targetsuf3)
-@COND_SHARED_1@	(cd $(DESTDIR)$(libdir) ; $(__muParser_dll___so_symlinks_uninst_cmd))
-
-@COND_SHARED_1@install_muParser_dll_headers: 
-@COND_SHARED_1@	$(INSTALL_DIR) $(DESTDIR)$(prefix)
-@COND_SHARED_1@	for f in $(MUPARSER_DLL_HEADERS); do \
-@COND_SHARED_1@	if test ! -d $(DESTDIR)$(prefix)/`dirname $$f` ; then \
-@COND_SHARED_1@	$(INSTALL_DIR) $(DESTDIR)$(prefix)/`dirname $$f`; \
-@COND_SHARED_1@	fi; \
-@COND_SHARED_1@	$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_1@	done
-
-@COND_SHARED_1@uninstall_muParser_dll_headers: 
-@COND_SHARED_1@	for f in $(MUPARSER_DLL_HEADERS); do \
-@COND_SHARED_1@	rm -f $(DESTDIR)$(prefix)/$$f; \
-@COND_SHARED_1@	done
-
-@COND_SAMPLES_1@$(top_builddir)/samples/example1/example1$(EXEEXT): $(EXAMPLE1_OBJECTS) $(__muParser_lib___depname)
-@COND_SAMPLES_1@	$(CXX) -o $@ $(EXAMPLE1_OBJECTS) -L$(top_builddir)/lib   -L$(srcdir)/lib $(LDFLAGS)  -lmuparser$(DEBUG_BUILD_POSTFIX) $(LIBS)
-@COND_SAMPLES_1@	
-@COND_SAMPLES_1@	$(__example1___mac_setfilecmd)
-
-lib: $(__muParser_lib___depname) $(__muParser_dll___depname)
-
-samples: $(__example1___depname)
-
-documentation: 
-	( cd $(srcdir)/docs && doxygen )
-
-muParser_lib_muParser.o: $(srcdir)/src/muParser.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParser.cpp
-
-muParser_lib_muParserBase.o: $(srcdir)/src/muParserBase.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserBase.cpp
-
-muParser_lib_muParserBytecode.o: $(srcdir)/src/muParserBytecode.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserBytecode.cpp
-
-muParser_lib_muParserCallback.o: $(srcdir)/src/muParserCallback.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserCallback.cpp
-
-muParser_lib_muParserDLL.o: $(srcdir)/src/muParserDLL.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserDLL.cpp
-
-muParser_lib_muParserError.o: $(srcdir)/src/muParserError.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserError.cpp
-
-muParser_lib_muParserInt.o: $(srcdir)/src/muParserInt.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserInt.cpp
-
-muParser_lib_muParserTest.o: $(srcdir)/src/muParserTest.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserTest.cpp
-
-muParser_lib_muParserTokenReader.o: $(srcdir)/src/muParserTokenReader.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_LIB_CXXFLAGS) $(srcdir)/src/muParserTokenReader.cpp
-
-muParser_dll_muParser.o: $(srcdir)/src/muParser.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParser.cpp
-
-muParser_dll_muParserBase.o: $(srcdir)/src/muParserBase.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserBase.cpp
-
-muParser_dll_muParserBytecode.o: $(srcdir)/src/muParserBytecode.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserBytecode.cpp
-
-muParser_dll_muParserCallback.o: $(srcdir)/src/muParserCallback.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserCallback.cpp
-
-muParser_dll_muParserDLL.o: $(srcdir)/src/muParserDLL.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserDLL.cpp
-
-muParser_dll_muParserError.o: $(srcdir)/src/muParserError.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserError.cpp
-
-muParser_dll_muParserInt.o: $(srcdir)/src/muParserInt.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserInt.cpp
-
-muParser_dll_muParserTest.o: $(srcdir)/src/muParserTest.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserTest.cpp
-
-muParser_dll_muParserTokenReader.o: $(srcdir)/src/muParserTokenReader.cpp
-	$(CXXC) -c -o $@ $(MUPARSER_DLL_CXXFLAGS) $(srcdir)/src/muParserTokenReader.cpp
-
-example1_example1.o: $(srcdir)/samples/example1/example1.cpp
-	$(CXXC) -c -o $@ $(EXAMPLE1_CXXFLAGS) $(srcdir)/samples/example1/example1.cpp
-
-
-# Include dependency info, if present:
-@IF_GNU_MAKE@-include ./.deps/*.d
-
-.PHONY: all install uninstall clean distclean install_muParser_lib \
-	uninstall_muParser_lib install_muParser_lib_headers \
-	uninstall_muParser_lib_headers install_muParser_dll uninstall_muParser_dll \
-	install_muParser_dll_headers uninstall_muParser_dll_headers lib samples
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..8a5cff3
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,54 @@
+.. image:: https://travis-ci.org/beltoforion/muparser.svg?branch=master
+    :target: https://travis-ci.org/beltoforion/muparser
+
+.. image:: https://ci.appveyor.com/api/projects/status/u4882uj8btuspj9x?svg=true
+    :target: https://ci.appveyor.com/project/beltoforion/muparser
+
+.. image:: https://img.shields.io/github/issues/beltoforion/muparser.svg?maxAge=360
+    :target: https://github.com/beltoforion/muparser/issues
+ 
+.. image:: https://img.shields.io/github/release/beltoforion/muparser.svg?maxAge=360
+    :target: https://github.com/beltoforion/muparser/blob/master/CHANGELOG
+ 
+.. image:: https://repology.org/badge/tiny-repos/muparser.svg
+    :target: https://repology.org/project/muparser/versions
+
+
+muparser - Fast Math Parser 2.3.3 
+===========================
+.. image:: http://beltoforion.de/en/muparser/images/title.jpg
+ 
+
+To read the full documentation please go to: http://beltoforion.de/en/muparser.
+
+See Install.txt for installation
+
+Change Notes for Revision 2.3.3  
+===========================
+Security Fixes:  
+------------
+The following new issues, discovered by oss-fuzz are fixed: 
+
+* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24167 (Abrt)
+* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24355 (Heap-buffer-overflow READ 8)
+* https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25402 (Heap-buffer-overflow READ 8)
+
+Bugfixes:
+-----------
+* Fixed a couple of issues for building the C-Interface (muParserDLL.cpp/.h) with wide character support.
+* fix for #93 (https://github.com/beltoforion/muparser/issues/93)
+* fix for #94 (https://github.com/beltoforion/muparser/issues/94)
+* fix for #110 (https://github.com/beltoforion/muparser/issues/110); new expression size limit is 20000
+
+Fixed Compiler Warnings:
+-----------
+* Visual Studio: Disabled compiler warning 26812 (Prefer 'enum class' over 'enum') Use of plain old enums has not been deprecated and only MSVC is complaining. 
+* Visual Studio: Disabled compiler warning 4251 (... needs to have dll-interface to be used by clients of class ...)  For technical reason the DLL contains the class API and the DLL API. Just do not use the class API if you intent to share the dll accross windows versions. (The same is true for Linux but distributions do compile each application against their own library version anyway)
+
+Changes:
+------------
+* Adding manual definitions to avoid potential issues with MSVC
+* Adding missing overrides
+* Added a new option "-DENABLE_WIDE_CHAR" to CMake for building muparser with wide character support
+* export muparser targets, such that client projects can import it using find_package() (https://github.com/beltoforion/muparser/pull/81#event-3528671228)
+
diff --git a/appveyor.yml b/appveyor.yml
index 5f7e07b..cc4d34d 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -11,4 +11,4 @@ environment:
 build_script:
   - cmake -LAH -G "%CMAKE_PLATFORM%" -DCMAKE_INSTALL_PREFIX="%CD:\=/%/install" .
   - cmake --build . --config Release --target install
-  #- ctest -C Release --output-on-failure
+  - ctest -C Release --output-on-failure
diff --git a/build/autoconf/aclocal.m4 b/build/autoconf/aclocal.m4
deleted file mode 100644
index 33fc938..0000000
--- a/build/autoconf/aclocal.m4
+++ /dev/null
@@ -1,1992 +0,0 @@
-# generated automatically by aclocal 1.13.3 -*- Autoconf -*-
-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
-AC_DEFUN([AC_BAKEFILE_CREATE_FILE_DLLAR_SH],
-[
-dnl ===================== dllar.sh begins here =====================
-dnl    (Created by merge-scripts.py from dllar.sh
-dnl     file do not edit here!)
-D='$'
-cat <<EOF >dllar.sh
-#!/bin/sh
-#
-# dllar - a tool to build both a .dll and an .a file
-# from a set of object (.o) files for EMX/OS2.
-#
-#  Written by Andrew Zabolotny, bit@freya.etu.ru
-#  Ported to Unix like shell by Stefan Neis, Stefan.Neis@t-online.de
-#
-#  This script will accept a set of files on the command line.
-#  All the public symbols from the .o files will be exported into
-#  a .DEF file, then linker will be run (through gcc) against them to
-#  build a shared library consisting of all given .o files. All libraries
-#  (.a) will be first decompressed into component .o files then act as
-#  described above. You can optionally give a description (-d "description")
-#  which will be put into .DLL. To see the list of accepted options (as well
-#  as command-line format) simply run this program without options. The .DLL
-#  is built to be imported by name (there is no guarantee that new versions
-#  of the library you build will have same ordinals for same symbols).
-#
-#  dllar is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2, or (at your option)
-#  any later version.
-#
-#  dllar is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with dllar; see the file COPYING.  If not, write to the Free
-#  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-#  02111-1307, USA.
-
-# To successfuly run this program you will need:
-#  - Current drive should have LFN support (HPFS, ext2, network, etc)
-#    (Sometimes dllar generates filenames which won't fit 8.3 scheme)
-#  - gcc
-#    (used to build the .dll)
-#  - emxexp
-#    (used to create .def file from .o files)
-#  - emximp
-#    (used to create .a file from .def file)
-#  - GNU text utilites (cat, sort, uniq)
-#    used to process emxexp output
-#  - GNU file utilities (mv, rm)
-#  - GNU sed
-#  - lxlite (optional, see flag below)
-#    (used for general .dll cleanup)
-#
-
-flag_USE_LXLITE=1;
-
-#
-# helper functions
-# basnam, variant of basename, which does _not_ remove the path, _iff_
-#                              second argument (suffix to remove) is given
-basnam(){
-    case ${D}# in
-    1)
-        echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//'
-        ;;
-    2)
-        echo ${D}1 | sed 's/'${D}2'${D}//'
-        ;;
-    *)
-        echo "error in basnam ${D}*"
-        exit 8
-        ;;
-    esac
-}
-
-# Cleanup temporary files and output
-CleanUp() {
-    cd ${D}curDir
-    for i in ${D}inputFiles ; do
-        case ${D}i in
-        *!)
-            rm -rf \`basnam ${D}i !\`
-            ;;
-        *)
-            ;;
-        esac
-    done
-
-    # Kill result in case of failure as there is just to many stupid make/nmake
-    # things out there which doesn't do this.
-    if @<:@ ${D}# -eq 0 @:>@; then
-        rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile
-    fi
-}
-
-# Print usage and exit script with rc=1.
-PrintHelp() {
- echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@'
- echo '       @<:@-name-mangler-script script.sh@:>@'
- echo '       @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@'
- echo '       @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"'
- echo '       @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@'
- echo '       @<:@*.o@:>@ @<:@*.a@:>@'
- echo '*> "output_file" should have no extension.'
- echo '   If it has the .o, .a or .dll extension, it is automatically removed.'
- echo '   The import library name is derived from this and is set to "name".a,'
- echo '   unless overridden by -import'
- echo '*> "importlib_name" should have no extension.'
- echo '   If it has the .o, or .a extension, it is automatically removed.'
- echo '   This name is used as the import library name and may be longer and'
- echo '   more descriptive than the DLL name which has to follow the old '
- echo '   8.3 convention of FAT.'
- echo '*> "script.sh may be given to override the output_file name by a'
- echo '   different name. It is mainly useful if the regular make process'
- echo '   of some package does not take into account OS/2 restriction of'
- echo '   DLL name lengths. It takes the importlib name as input and is'
- echo '   supposed to procude a shorter name as output. The script should'
- echo '   expect to get importlib_name without extension and should produce'
- echo '   a (max.) 8 letter name without extension.'
- echo '*> "cc" is used to use another GCC executable.   (default: gcc.exe)'
- echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
- echo '   These flags will be put at the start of GCC command line.'
- echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.'
- echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define'
- echo '   multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
- echo '   If the last character of a symbol is "*", all symbols beginning'
- echo '   with the prefix before "*" will be exclude, (see _GLOBAL* above).'
- echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or'
- echo '   TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
- echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s'
- echo '   C runtime DLLs.'
- echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.'
- echo '*> All other switches (for example -L./ or -lmylib) will be passed'
- echo '   unchanged to GCC at the end of command line.'
- echo '*> If you create a DLL from a library and you do not specify -o,'
- echo '   the basename for DLL and import library will be set to library name,'
- echo '   the initial library will be renamed to 'name'_s.a (_s for static)'
- echo '   i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial'
- echo '   library will be renamed into gcc_s.a.'
- echo '--------'
- echo 'Example:'
- echo '   dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord'
- echo '    -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"'
- CleanUp
- exit 1
-}
-
-# Execute a command.
-# If exit code of the commnad <> 0 CleanUp() is called and we'll exit the script.
-# @Uses    Whatever CleanUp() uses.
-doCommand() {
-    echo "${D}*"
-    eval ${D}*
-    rcCmd=${D}?
-
-    if @<:@ ${D}rcCmd -ne 0 @:>@; then
-        echo "command failed, exit code="${D}rcCmd
-        CleanUp
-        exit ${D}rcCmd
-    fi
-}
-
-# main routine
-# setup globals
-cmdLine=${D}*
-outFile=""
-outimpFile=""
-inputFiles=""
-renameScript=""
-description=""
-CC=gcc.exe
-CFLAGS="-s -Zcrtdll"
-EXTRA_CFLAGS=""
-EXPORT_BY_ORDINALS=0
-exclude_symbols=""
-library_flags=""
-curDir=\`pwd\`
-curDirS=curDir
-case ${D}curDirS in
-*/)
-  ;;
-*)
-  curDirS=${D}{curDirS}"/"
-  ;;
-esac
-# Parse commandline
-libsToLink=0
-omfLinking=0
-while @<:@ ${D}1 @:>@; do
-    case ${D}1 in
-    -ord*)
-        EXPORT_BY_ORDINALS=1;
-        ;;
-    -o*)
-	shift
-        outFile=${D}1
-	;;
-    -i*)
-        shift
-        outimpFile=${D}1
-        ;;
-    -name-mangler-script)
-        shift
-        renameScript=${D}1
-        ;;
-    -d*)
-        shift
-        description=${D}1
-        ;;
-    -f*)
-        shift
-        CFLAGS=${D}1
-        ;;
-    -c*)
-        shift
-        CC=${D}1
-        ;;
-    -h*)
-        PrintHelp
-        ;;
-    -ex*)
-        shift
-        exclude_symbols=${D}{exclude_symbols}${D}1" "
-        ;;
-    -libf*)
-        shift
-        library_flags=${D}{library_flags}${D}1" "
-        ;;
-    -nocrt*)
-        CFLAGS="-s"
-        ;;
-    -nolxl*)
-        flag_USE_LXLITE=0
-        ;;
-    -* | /*)
-        case ${D}1 in
-        -L* | -l*)
-            libsToLink=1
-            ;;
-        -Zomf)
-            omfLinking=1
-            ;;
-        *)
-            ;;
-        esac
-        EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
-        ;;
-    *.dll)
-        EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
-        if @<:@ ${D}omfLinking -eq 1 @:>@; then
-            EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
-	else
-            EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
-        fi
-        ;;
-    *)
-        found=0;
-        if @<:@ ${D}libsToLink -ne 0 @:>@; then
-            EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
-        else
-            for file in ${D}1 ; do
-                if @<:@ -f ${D}file @:>@; then
-                    inputFiles="${D}{inputFiles} ${D}file"
-                    found=1
-                fi
-            done
-            if @<:@ ${D}found -eq 0 @:>@; then
-                echo "ERROR: No file(s) found: "${D}1
-                exit 8
-            fi
-        fi
-      ;;
-    esac
-    shift
-done # iterate cmdline words
-
-#
-if @<:@ -z "${D}inputFiles" @:>@; then
-    echo "dllar: no input files"
-    PrintHelp
-fi
-
-# Now extract all .o files from .a files
-newInputFiles=""
-for file in ${D}inputFiles ; do
-    case ${D}file in
-    *.a | *.lib)
-        case ${D}file in
-        *.a)
-            suffix=".a"
-            AR="ar"
-            ;;
-        *.lib)
-            suffix=".lib"
-            AR="emxomfar"
-            EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf"
-            ;;
-        *)
-            ;;
-        esac
-        dirname=\`basnam ${D}file ${D}suffix\`"_%"
-        mkdir ${D}dirname
-        if @<:@ ${D}? -ne 0 @:>@; then
-            echo "Failed to create subdirectory ./${D}dirname"
-            CleanUp
-            exit 8;
-        fi
-        # Append '!' to indicate archive
-        newInputFiles="${D}newInputFiles ${D}{dirname}!"
-        doCommand "cd ${D}dirname; ${D}AR x ../${D}file"
-        cd ${D}curDir
-        found=0;
-        for subfile in ${D}dirname/*.o* ; do
-            if @<:@ -f ${D}subfile @:>@; then
-                found=1
-                if @<:@ -s ${D}subfile @:>@; then
-	            # FIXME: This should be: is file size > 32 byte, _not_ > 0!
-                    newInputFiles="${D}newInputFiles ${D}subfile"
-                fi
-            fi
-        done
-        if @<:@ ${D}found -eq 0 @:>@; then
-            echo "WARNING: there are no files in archive \\'${D}file\\'"
-        fi
-        ;;
-    *)
-        newInputFiles="${D}{newInputFiles} ${D}file"
-        ;;
-    esac
-done
-inputFiles="${D}newInputFiles"
-
-# Output filename(s).
-do_backup=0;
-if @<:@ -z ${D}outFile @:>@; then
-    do_backup=1;
-    set outFile ${D}inputFiles; outFile=${D}2
-fi
-
-# If it is an archive, remove the '!' and the '_%' suffixes
-case ${D}outFile in
-*_%!)
-    outFile=\`basnam ${D}outFile _%!\`
-    ;;
-*)
-    ;;
-esac
-case ${D}outFile in
-*.dll)
-    outFile=\`basnam ${D}outFile .dll\`
-    ;;
-*.DLL)
-    outFile=\`basnam ${D}outFile .DLL\`
-    ;;
-*.o)
-    outFile=\`basnam ${D}outFile .o\`
-    ;;
-*.obj)
-    outFile=\`basnam ${D}outFile .obj\`
-    ;;
-*.a)
-    outFile=\`basnam ${D}outFile .a\`
-    ;;
-*.lib)
-    outFile=\`basnam ${D}outFile .lib\`
-    ;;
-*)
-    ;;
-esac
-case ${D}outimpFile in
-*.a)
-    outimpFile=\`basnam ${D}outimpFile .a\`
-    ;;
-*.lib)
-    outimpFile=\`basnam ${D}outimpFile .lib\`
-    ;;
-*)
-    ;;
-esac
-if @<:@ -z ${D}outimpFile @:>@; then
-    outimpFile=${D}outFile
-fi
-defFile="${D}{outFile}.def"
-arcFile="${D}{outimpFile}.a"
-arcFile2="${D}{outimpFile}.lib"
-
-#create ${D}dllFile as something matching 8.3 restrictions,
-if @<:@ -z ${D}renameScript @:>@ ; then
-    dllFile="${D}outFile"
-else
-    dllFile=\`${D}renameScript ${D}outimpFile\`
-fi
-
-if @<:@ ${D}do_backup -ne 0 @:>@ ; then
-    if @<:@ -f ${D}arcFile @:>@ ; then
-        doCommand "mv ${D}arcFile ${D}{outFile}_s.a"
-    fi
-    if @<:@ -f ${D}arcFile2 @:>@ ; then
-        doCommand "mv ${D}arcFile2 ${D}{outFile}_s.lib"
-    fi
-fi
-
-# Extract public symbols from all the object files.
-tmpdefFile=${D}{defFile}_%
-rm -f ${D}tmpdefFile
-for file in ${D}inputFiles ; do
-    case ${D}file in
-    *!)
-        ;;
-    *)
-        doCommand "emxexp -u ${D}file >> ${D}tmpdefFile"
-        ;;
-    esac
-done
-
-# Create the def file.
-rm -f ${D}defFile
-echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
-dllFile="${D}{dllFile}.dll"
-if @<:@ ! -z ${D}description @:>@; then
-    echo "DESCRIPTION  \\"${D}{description}\\"" >> ${D}defFile
-fi
-echo "EXPORTS" >> ${D}defFile
-
-doCommand "cat ${D}tmpdefFile | sort.exe | uniq.exe > ${D}{tmpdefFile}%"
-grep -v "^ *;" < ${D}{tmpdefFile}% | grep -v "^ *${D}" >${D}tmpdefFile
-
-# Checks if the export is ok or not.
-for word in ${D}exclude_symbols; do
-    grep -v ${D}word < ${D}tmpdefFile >${D}{tmpdefFile}%
-    mv ${D}{tmpdefFile}% ${D}tmpdefFile
-done
-
-
-if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
-    sed "=" < ${D}tmpdefFile | \\
-    sed '
-      N
-      : loop
-      s/^\\(@<:@0-9@:>@\\+\\)\\(@<:@^;@:>@*\\)\\(;.*\\)\\?/\\2 @\\1 NONAME/
-      t loop
-    ' > ${D}{tmpdefFile}%
-    grep -v "^ *${D}" < ${D}{tmpdefFile}% > ${D}tmpdefFile
-else
-    rm -f ${D}{tmpdefFile}%
-fi
-cat ${D}tmpdefFile >> ${D}defFile
-rm -f ${D}tmpdefFile
-
-# Do linking, create implib, and apply lxlite.
-gccCmdl="";
-for file in ${D}inputFiles ; do
-    case ${D}file in
-    *!)
-        ;;
-    *)
-        gccCmdl="${D}gccCmdl ${D}file"
-        ;;
-    esac
-done
-doCommand "${D}CC ${D}CFLAGS -Zdll -o ${D}dllFile ${D}defFile ${D}gccCmdl ${D}EXTRA_CFLAGS"
-touch "${D}{outFile}.dll"
-
-doCommand "emximp -o ${D}arcFile ${D}defFile"
-if @<:@ ${D}flag_USE_LXLITE -ne 0 @:>@; then
-    add_flags="";
-    if @<:@ ${D}EXPORT_BY_ORDINALS -ne 0 @:>@; then
-        add_flags="-ynd"
-    fi
-    doCommand "lxlite -cs -t: -mrn -mln ${D}add_flags ${D}dllFile"
-fi
-doCommand "emxomf -s -l ${D}arcFile"
-
-# Successful exit.
-CleanUp 1
-exit 0
-EOF
-dnl ===================== dllar.sh ends here =====================
-])
-
-dnl
-dnl  This file is part of Bakefile (http://www.bakefile.org)
-dnl
-dnl  Copyright (C) 2003-2007 Vaclav Slavik, David Elliott and others
-dnl
-dnl  Permission is hereby granted, free of charge, to any person obtaining a
-dnl  copy of this software and associated documentation files (the "Software"),
-dnl  to deal in the Software without restriction, including without limitation
-dnl  the rights to use, copy, modify, merge, publish, distribute, sublicense,
-dnl  and/or sell copies of the Software, and to permit persons to whom the
-dnl  Software is furnished to do so, subject to the following conditions:
-dnl
-dnl  The above copyright notice and this permission notice shall be included in
-dnl  all copies or substantial portions of the Software.
-dnl
-dnl  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-dnl  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-dnl  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-dnl  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-dnl  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-dnl  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-dnl  DEALINGS IN THE SOFTWARE.
-dnl
-dnl  $Id: bakefile-lang.m4 1337 2010-02-09 20:22:43Z vaclavslavik $
-dnl
-dnl  Compiler detection macros by David Elliott and Vadim Zeitlin
-dnl
-
-
-dnl ===========================================================================
-dnl Macros to detect different C/C++ compilers
-dnl ===========================================================================
-
-dnl Based on autoconf _AC_LANG_COMPILER_GNU
-dnl _AC_BAKEFILE_LANG_COMPILER(NAME, LANG, SYMBOL, IF-YES, IF-NO)
-AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER],
-[
-    AC_LANG_PUSH($2)
-    AC_CACHE_CHECK(
-        [whether we are using the $1 $2 compiler],
-        [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3],
-        [AC_TRY_COMPILE(
-            [],
-            [
-             #ifndef $3
-                choke me
-             #endif
-            ],
-            [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=yes],
-            [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3=no]
-         )
-        ]
-    )
-    if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3" = "xyes"; then
-        :; $4
-    else
-        :; $5
-    fi
-    AC_LANG_POP($2)
-])
-
-dnl More specific version of the above macro checking whether the compiler
-dnl version is at least the given one (assumes that we do use this compiler)
-dnl
-dnl _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(NAME, LANG, SYMBOL, VER, VERMSG, IF-YES, IF-NO)
-AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER_LATER_THAN],
-[
-    AC_LANG_PUSH($2)
-    AC_CACHE_CHECK(
-        [whether we are using $1 $2 compiler v$5 or later],
-        [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4],
-        [AC_TRY_COMPILE(
-            [],
-            [
-             #ifndef $3 || $3 < $4
-                choke me
-             #endif
-            ],
-            [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=yes],
-            [bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4=no]
-         )
-        ]
-    )
-    if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_[]$3[]_lt_[]$4" = "xyes"; then
-        :; $6
-    else
-        :; $7
-    fi
-    AC_LANG_POP($2)
-])
-
-dnl CodeWarrior Metrowerks compiler defines __MWERKS__ for both C and C++
-AC_DEFUN([AC_BAKEFILE_PROG_MWCC],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Metrowerks, C, __MWERKS__, MWCC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_MWCXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Metrowerks, C++, __MWERKS__, MWCXX=yes)
-])
-
-dnl IBM xlC compiler defines __xlC__ for both C and C++
-AC_DEFUN([AC_BAKEFILE_PROG_XLCC],
-[
-    _AC_BAKEFILE_LANG_COMPILER([IBM xlC], C, __xlC__, XLCC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_XLCXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER([IBM xlC], C++, __xlC__, XLCXX=yes)
-])
-
-dnl recent versions of SGI mipsPro compiler define _SGI_COMPILER_VERSION
-dnl
-dnl NB: old versions define _COMPILER_VERSION but this could probably be
-dnl     defined by other compilers too so don't test for it to be safe
-AC_DEFUN([AC_BAKEFILE_PROG_SGICC],
-[
-    _AC_BAKEFILE_LANG_COMPILER(SGI, C, _SGI_COMPILER_VERSION, SGICC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_SGICXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER(SGI, C++, _SGI_COMPILER_VERSION, SGICXX=yes)
-])
-
-dnl Sun compiler defines __SUNPRO_C/__SUNPRO_CC
-AC_DEFUN([AC_BAKEFILE_PROG_SUNCC],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Sun, C, __SUNPRO_C, SUNCC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_SUNCXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Sun, C++, __SUNPRO_CC, SUNCXX=yes)
-])
-
-dnl Intel icc compiler defines __INTEL_COMPILER for both C and C++
-AC_DEFUN([AC_BAKEFILE_PROG_INTELCC],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Intel, C, __INTEL_COMPILER, INTELCC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Intel, C++, __INTEL_COMPILER, INTELCXX=yes)
-])
-
-dnl Intel compiler command line options changed in incompatible ways sometimes
-dnl before v8 (-KPIC was replaced with gcc-compatible -fPIC) and again in v10
-dnl (-create-pch deprecated in favour of -pch-create) so we need to test for
-dnl its exact version too
-AC_DEFUN([AC_BAKEFILE_PROG_INTELCC_8],
-[
-    _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C, __INTEL_COMPILER, 800, 8, INTELCC8=yes)
-])
-AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX_8],
-[
-    _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C++, __INTEL_COMPILER, 800, 8, INTELCXX8=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_INTELCC_10],
-[
-    _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C, __INTEL_COMPILER, 1000, 10, INTELCC10=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_INTELCXX_10],
-[
-    _AC_BAKEFILE_LANG_COMPILER_LATER_THAN(Intel, C++, __INTEL_COMPILER, 1000, 10, INTELCXX10=yes)
-])
-
-dnl HP-UX aCC: see http://docs.hp.com/en/6162/preprocess.htm#macropredef
-AC_DEFUN([AC_BAKEFILE_PROG_HPCC],
-[
-    _AC_BAKEFILE_LANG_COMPILER(HP, C, __HP_cc, HPCC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_HPCXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER(HP, C++, __HP_aCC, HPCXX=yes)
-])
-
-dnl Tru64 cc and cxx
-AC_DEFUN([AC_BAKEFILE_PROG_COMPAQCC],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Compaq, C, __DECC, COMPAQCC=yes)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_COMPAQCXX],
-[
-    _AC_BAKEFILE_LANG_COMPILER(Compaq, C++, __DECCXX, COMPAQCXX=yes)
-])
-
-dnl ===========================================================================
-dnl macros to detect specialty compiler options
-dnl ===========================================================================
-
-dnl Figure out if we need to pass -ext o to compiler (MetroWerks)
-AC_DEFUN([AC_BAKEFILE_METROWERKS_EXTO],
-[AC_CACHE_CHECK([if the _AC_LANG compiler requires -ext o], bakefile_cv_[]_AC_LANG_ABBREV[]_exto,
-dnl First create an empty conf test
-[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
-dnl Now remove .o and .c.o or .cc.o
-rm -f conftest.$ac_objext conftest.$ac_ext.o
-dnl Now compile the test
-AS_IF([AC_TRY_EVAL(ac_compile)],
-dnl If the test succeeded look for conftest.c.o or conftest.cc.o
-[for ac_file in `(ls conftest.* 2>/dev/null)`; do
-    case $ac_file in
-        conftest.$ac_ext.o)
-            bakefile_cv_[]_AC_LANG_ABBREV[]_exto="-ext o"
-            ;;
-        *)
-            ;;
-    esac
-done],
-[AC_MSG_FAILURE([cannot figure out if compiler needs -ext o: cannot compile])
-]) dnl AS_IF
-
-rm -f conftest.$ac_ext.o conftest.$ac_objext conftest.$ac_ext
-]) dnl AC_CACHE_CHECK
-
-if test "x$bakefile_cv_[]_AC_LANG_ABBREV[]_exto" '!=' "x"; then
-    if test "[]_AC_LANG_ABBREV[]" = "c"; then
-        CFLAGS="$bakefile_cv_[]_AC_LANG_ABBREV[]_exto $CFLAGS"
-    fi
-    if test "[]_AC_LANG_ABBREV[]" = "cxx"; then
-        CXXFLAGS="$bakefile_cv_[]_AC_LANG_ABBREV[]_exto $CXXFLAGS"
-    fi
-fi
-]) dnl AC_DEFUN
-
-
-dnl ===========================================================================
-dnl Macros to do all of the compiler detections as one macro
-dnl ===========================================================================
-
-dnl check for different proprietary compilers depending on target platform
-dnl _AC_BAKEFILE_PROG_COMPILER(LANG)
-AC_DEFUN([_AC_BAKEFILE_PROG_COMPILER],
-[
-    AC_REQUIRE([AC_PROG_$1])
-
-    dnl Intel compiler can be used under several different OS and even
-    dnl different architectures (x86, amd64 and Itanium) so it's easier to just
-    dnl always test for it
-    AC_BAKEFILE_PROG_INTEL$1
-
-    dnl If we use Intel compiler we also need to know its version
-    if test "$INTEL$1" = "yes"; then
-        AC_BAKEFILE_PROG_INTEL$1_8
-        AC_BAKEFILE_PROG_INTEL$1_10
-    fi
-
-    dnl if we're using gcc, we can't be using any of incompatible compilers
-    if test "x$G$1" != "xyes"; then
-        if test "x$1" = "xC"; then
-            AC_BAKEFILE_METROWERKS_EXTO
-            if test "x$bakefile_cv_c_exto" '!=' "x"; then
-                unset ac_cv_prog_cc_g
-                _AC_PROG_CC_G
-            fi
-        fi
-
-        dnl most of these compilers are only used under well-defined OS so
-        dnl don't waste time checking for them on other ones
-        case `uname -s` in
-            AIX*)
-                AC_BAKEFILE_PROG_XL$1
-                ;;
-
-            Darwin)
-                AC_BAKEFILE_PROG_MW$1
-                if test "$MW$1" != "yes"; then
-                    AC_BAKEFILE_PROG_XL$1
-                fi
-                ;;
-
-            IRIX*)
-                AC_BAKEFILE_PROG_SGI$1
-                ;;
-
-            Linux*)
-                dnl Sun CC is now available under Linux too, test for it unless
-                dnl we already found that we were using a different compiler
-                if test "$INTEL$1" != "yes"; then
-                    AC_BAKEFILE_PROG_SUN$1
-                fi
-                ;;
-
-            HP-UX*)
-                AC_BAKEFILE_PROG_HP$1
-                ;;
-
-            OSF1)
-                AC_BAKEFILE_PROG_COMPAQ$1
-                ;;
-
-            SunOS)
-                AC_BAKEFILE_PROG_SUN$1
-                ;;
-        esac
-    fi
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_CC],
-[
-    _AC_BAKEFILE_PROG_COMPILER(CC)
-])
-
-AC_DEFUN([AC_BAKEFILE_PROG_CXX],
-[
-    _AC_BAKEFILE_PROG_COMPILER(CXX)
-])
-
-
-dnl
-dnl  This file is part of Bakefile (http://www.bakefile.org)
-dnl
-dnl  Copyright (C) 2003-2007 Vaclav Slavik and others
-dnl
-dnl  Permission is hereby granted, free of charge, to any person obtaining a
-dnl  copy of this software and associated documentation files (the "Software"),
-dnl  to deal in the Software without restriction, including without limitation
-dnl  the rights to use, copy, modify, merge, publish, distribute, sublicense,
-dnl  and/or sell copies of the Software, and to permit persons to whom the
-dnl  Software is furnished to do so, subject to the following conditions:
-dnl
-dnl  The above copyright notice and this permission notice shall be included in
-dnl  all copies or substantial portions of the Software.
-dnl
-dnl  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-dnl  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-dnl  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-dnl  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-dnl  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-dnl  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-dnl  DEALINGS IN THE SOFTWARE.
-dnl
-dnl  $Id: bakefile.m4 1346 2011-02-01 14:03:00Z vaclavslavik $
-dnl
-dnl  Support macros for makefiles generated by BAKEFILE.
-dnl
-
-
-dnl ---------------------------------------------------------------------------
-dnl Lots of compiler & linker detection code contained here was taken from
-dnl wxWidgets configure.in script (see http://www.wxwidgets.org)
-dnl ---------------------------------------------------------------------------
-
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_GNUMAKE
-dnl
-dnl Detects GNU make
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_GNUMAKE],
-[
-    dnl does make support "-include" (only GNU make does AFAIK)?
-    AC_CACHE_CHECK([if make is GNU make], bakefile_cv_prog_makeisgnu,
-    [
-        if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
-                egrep -s GNU > /dev/null); then
-            bakefile_cv_prog_makeisgnu="yes"
-        else
-            bakefile_cv_prog_makeisgnu="no"
-        fi
-    ])
-
-    if test "x$bakefile_cv_prog_makeisgnu" = "xyes"; then
-        IF_GNU_MAKE=""
-    else
-        IF_GNU_MAKE="#"
-    fi
-    AC_SUBST(IF_GNU_MAKE)
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_PLATFORM
-dnl
-dnl Detects platform and sets PLATFORM_XXX variables accordingly
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_PLATFORM],
-[
-    PLATFORM_UNIX=0
-    PLATFORM_WIN32=0
-    PLATFORM_MSDOS=0
-    PLATFORM_MAC=0
-    PLATFORM_MACOS=0
-    PLATFORM_MACOSX=0
-    PLATFORM_OS2=0
-    PLATFORM_BEOS=0
-
-    if test "x$BAKEFILE_FORCE_PLATFORM" = "x"; then
-        case "${BAKEFILE_HOST}" in
-            *-*-mingw32* )
-                PLATFORM_WIN32=1
-            ;;
-            *-pc-msdosdjgpp )
-                PLATFORM_MSDOS=1
-            ;;
-            *-pc-os2_emx | *-pc-os2-emx )
-                PLATFORM_OS2=1
-            ;;
-            *-*-darwin* )
-                PLATFORM_MAC=1
-                PLATFORM_MACOSX=1
-            ;;
-            *-*-beos* )
-                PLATFORM_BEOS=1
-            ;;
-            powerpc-apple-macos* )
-                PLATFORM_MAC=1
-                PLATFORM_MACOS=1
-            ;;
-            * )
-                PLATFORM_UNIX=1
-            ;;
-        esac
-    else
-        case "$BAKEFILE_FORCE_PLATFORM" in
-            win32 )
-                PLATFORM_WIN32=1
-            ;;
-            msdos )
-                PLATFORM_MSDOS=1
-            ;;
-            os2 )
-                PLATFORM_OS2=1
-            ;;
-            darwin )
-                PLATFORM_MAC=1
-                PLATFORM_MACOSX=1
-            ;;
-            unix )
-                PLATFORM_UNIX=1
-            ;;
-            beos )
-                PLATFORM_BEOS=1
-            ;;
-            * )
-                AC_MSG_ERROR([Unknown platform: $BAKEFILE_FORCE_PLATFORM])
-            ;;
-        esac
-    fi
-
-    AC_SUBST(PLATFORM_UNIX)
-    AC_SUBST(PLATFORM_WIN32)
-    AC_SUBST(PLATFORM_MSDOS)
-    AC_SUBST(PLATFORM_MAC)
-    AC_SUBST(PLATFORM_MACOS)
-    AC_SUBST(PLATFORM_MACOSX)
-    AC_SUBST(PLATFORM_OS2)
-    AC_SUBST(PLATFORM_BEOS)
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_PLATFORM_SPECIFICS
-dnl
-dnl Sets misc platform-specific settings
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_PLATFORM_SPECIFICS],
-[
-    AC_ARG_ENABLE([omf], AS_HELP_STRING([--enable-omf],
-                                        [use OMF object format (OS/2)]),
-                  [bk_os2_use_omf="$enableval"])
-
-    case "${BAKEFILE_HOST}" in
-      *-*-darwin* )
-        dnl For Unix to MacOS X porting instructions, see:
-        dnl http://fink.sourceforge.net/doc/porting/porting.html
-        if test "x$GCC" = "xyes"; then
-            CFLAGS="$CFLAGS -fno-common"
-            CXXFLAGS="$CXXFLAGS -fno-common"
-        fi
-        if test "x$XLCC" = "xyes"; then
-            CFLAGS="$CFLAGS -qnocommon"
-            CXXFLAGS="$CXXFLAGS -qnocommon"
-        fi
-        ;;
-
-      *-pc-os2_emx | *-pc-os2-emx )
-        if test "x$bk_os2_use_omf" = "xyes" ; then
-            AR=emxomfar
-            RANLIB=:
-            LDFLAGS="-Zomf $LDFLAGS"
-            CFLAGS="-Zomf $CFLAGS"
-            CXXFLAGS="-Zomf $CXXFLAGS"
-            OS2_LIBEXT="lib"
-        else
-            OS2_LIBEXT="a"
-        fi
-        ;;
-
-      i*86-*-beos* )
-        LDFLAGS="-L/boot/develop/lib/x86 $LDFLAGS"
-        ;;
-    esac
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SUFFIXES
-dnl
-dnl Detects shared various suffixes for shared libraries, libraries, programs,
-dnl plugins etc.
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_SUFFIXES],
-[
-    SO_SUFFIX="so"
-    SO_SUFFIX_MODULE="so"
-    EXEEXT=""
-    LIBPREFIX="lib"
-    LIBEXT=".a"
-    DLLPREFIX="lib"
-    DLLPREFIX_MODULE=""
-    DLLIMP_SUFFIX=""
-    dlldir="$libdir"
-
-    case "${BAKEFILE_HOST}" in
-        dnl PA-RISC HP systems used .sl but IA64 use ELF-64 and so use the
-        dnl standard .so extension
-        ia64-hp-hpux* )
-        ;;
-        *-hp-hpux* )
-            SO_SUFFIX="sl"
-            SO_SUFFIX_MODULE="sl"
-        ;;
-        *-*-aix* )
-            dnl quoting from
-            dnl http://www-1.ibm.com/servers/esdd/articles/gnu.html:
-            dnl     Both archive libraries and shared libraries on AIX have an
-            dnl     .a extension. This will explain why you can't link with an
-            dnl     .so and why it works with the name changed to .a.
-            SO_SUFFIX="a"
-            SO_SUFFIX_MODULE="a"
-        ;;
-        *-*-cygwin* )
-            SO_SUFFIX="dll"
-            SO_SUFFIX_MODULE="dll"
-            DLLIMP_SUFFIX="dll.a"
-            EXEEXT=".exe"
-            DLLPREFIX="cyg"
-            dlldir="$bindir"
-        ;;
-        *-*-mingw32* )
-            SO_SUFFIX="dll"
-            SO_SUFFIX_MODULE="dll"
-            DLLIMP_SUFFIX="dll.a"
-            EXEEXT=".exe"
-            DLLPREFIX=""
-            dlldir="$bindir"
-        ;;
-        *-pc-msdosdjgpp )
-            EXEEXT=".exe"
-            DLLPREFIX=""
-            dlldir="$bindir"
-        ;;
-        *-pc-os2_emx | *-pc-os2-emx )
-            SO_SUFFIX="dll"
-            SO_SUFFIX_MODULE="dll"
-            DLLIMP_SUFFIX=$OS2_LIBEXT
-            EXEEXT=".exe"
-            DLLPREFIX=""
-            LIBPREFIX=""
-            LIBEXT=".$OS2_LIBEXT"
-            dlldir="$bindir"
-        ;;
-        *-*-darwin* )
-            SO_SUFFIX="dylib"
-            SO_SUFFIX_MODULE="bundle"
-        ;;
-    esac
-
-    if test "x$DLLIMP_SUFFIX" = "x" ; then
-        DLLIMP_SUFFIX="$SO_SUFFIX"
-    fi
-
-    AC_SUBST(SO_SUFFIX)
-    AC_SUBST(SO_SUFFIX_MODULE)
-    AC_SUBST(DLLIMP_SUFFIX)
-    AC_SUBST(EXEEXT)
-    AC_SUBST(LIBPREFIX)
-    AC_SUBST(LIBEXT)
-    AC_SUBST(DLLPREFIX)
-    AC_SUBST(DLLPREFIX_MODULE)
-    AC_SUBST(dlldir)
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SHARED_LD
-dnl
-dnl Detects command for making shared libraries, substitutes SHARED_LD_CC
-dnl and SHARED_LD_CXX.
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_SHARED_LD],
-[
-    dnl the extra compiler flags needed for compilation of shared library
-    PIC_FLAG=""
-    if test "x$GCC" = "xyes"; then
-        dnl the switch for gcc is the same under all platforms
-        PIC_FLAG="-fPIC"
-    fi
-
-    dnl Defaults for GCC and ELF .so shared libs:
-    SHARED_LD_CC="\$(CC) -shared ${PIC_FLAG} -o"
-    SHARED_LD_CXX="\$(CXX) -shared ${PIC_FLAG} -o"
-    WINDOWS_IMPLIB=0
-
-    case "${BAKEFILE_HOST}" in
-      *-hp-hpux* )
-        dnl default settings are good for gcc but not for the native HP-UX
-        if test "x$GCC" != "xyes"; then
-            dnl no idea why it wants it, but it does
-            LDFLAGS="$LDFLAGS -L/usr/lib"
-
-            SHARED_LD_CC="${CC} -b -o"
-            SHARED_LD_CXX="${CXX} -b -o"
-            PIC_FLAG="+Z"
-        fi
-      ;;
-
-      *-*-linux* )
-        dnl newer icc versions use -fPIC just as gcc does and, in fact, the
-        dnl newest (v10+) ones don't even understand -KPIC any longer
-        if test "$INTELCC" = "yes" -a "$INTELCC8" != "yes"; then
-            PIC_FLAG="-KPIC"
-        elif test "x$SUNCXX" = "xyes"; then
-            SHARED_LD_CC="${CC} -G -o"
-            SHARED_LD_CXX="${CXX} -G -o"
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-solaris2* )
-        if test "x$SUNCXX" = xyes ; then
-            SHARED_LD_CC="${CC} -G -o"
-            SHARED_LD_CXX="${CXX} -G -o"
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-darwin* )
-        AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH
-        chmod +x shared-ld-sh
-
-        SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o"
-        SHARED_LD_MODULE_CXX="CXX=\"\$(CXX)\" $SHARED_LD_MODULE_CC"
-
-        dnl Most apps benefit from being fully binded (its faster and static
-        dnl variables initialized at startup work).
-        dnl This can be done either with the exe linker flag -Wl,-bind_at_load
-        dnl or with a double stage link in order to create a single module
-        dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved
-
-        dnl If using newer dev tools then there is a -single_module flag that
-        dnl we can use to do this for dylibs, otherwise we'll need to use a helper
-        dnl script.  Check the version of gcc to see which way we can go:
-        AC_CACHE_CHECK([for gcc 3.1 or later], bakefile_cv_gcc31, [
-           AC_TRY_COMPILE([],
-               [
-                   #if (__GNUC__ < 3) || \
-                       ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
-                       This is old gcc
-                   #endif
-               ],
-               [
-                   bakefile_cv_gcc31=yes
-               ],
-               [
-                   bakefile_cv_gcc31=no
-               ]
-           )
-        ])
-        if test "$bakefile_cv_gcc31" = "no"; then
-            dnl Use the shared-ld-sh helper script
-            SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o"
-            SHARED_LD_CXX="$SHARED_LD_CC"
-        else
-            dnl Use the -single_module flag and let the linker do it for us
-            SHARED_LD_CC="\${CC} -dynamiclib -single_module -headerpad_max_install_names -o"
-            SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o"
-        fi
-
-        if test "x$GCC" == "xyes"; then
-            PIC_FLAG="-dynamic -fPIC"
-        fi
-        if test "x$XLCC" = "xyes"; then
-            PIC_FLAG="-dynamic -DPIC"
-        fi
-      ;;
-
-      *-*-aix* )
-        if test "x$GCC" = "xyes"; then
-            dnl at least gcc 2.95 warns that -fPIC is ignored when
-            dnl compiling each and every file under AIX which is annoying,
-            dnl so don't use it there (it's useless as AIX runs on
-            dnl position-independent architectures only anyhow)
-            PIC_FLAG=""
-
-            dnl -bexpfull is needed by AIX linker to export all symbols (by
-            dnl default it doesn't export any and even with -bexpall it
-            dnl doesn't export all C++ support symbols, e.g. vtable
-            dnl pointers) but it's only available starting from 5.1 (with
-            dnl maintenance pack 2, whatever this is), see
-            dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html
-            case "${BAKEFILE_HOST}" in
-                *-*-aix5* )
-                    LD_EXPFULL="-Wl,-bexpfull"
-                    ;;
-            esac
-
-            SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o"
-            SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o"
-        else
-            dnl FIXME: makeC++SharedLib is obsolete, what should we do for
-            dnl        recent AIX versions?
-            AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib,
-                          makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib)
-            SHARED_LD_CC="$AIX_CC_LD -p 0 -o"
-            SHARED_LD_CXX="$AIX_CXX_LD -p 0 -o"
-        fi
-      ;;
-
-      *-*-beos* )
-        dnl can't use gcc under BeOS for shared library creation because it
-        dnl complains about missing 'main'
-        SHARED_LD_CC="${LD} -nostart -o"
-        SHARED_LD_CXX="${LD} -nostart -o"
-      ;;
-
-      *-*-irix* )
-        dnl default settings are ok for gcc
-        if test "x$GCC" != "xyes"; then
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-cygwin* | *-*-mingw32* )
-        PIC_FLAG=""
-        SHARED_LD_CC="\$(CC) -shared -o"
-        SHARED_LD_CXX="\$(CXX) -shared -o"
-        WINDOWS_IMPLIB=1
-      ;;
-
-      *-pc-os2_emx | *-pc-os2-emx )
-        SHARED_LD_CC="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
-        SHARED_LD_CXX="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
-        PIC_FLAG=""
-        AC_BAKEFILE_CREATE_FILE_DLLAR_SH
-        chmod +x dllar.sh
-      ;;
-
-      powerpc-apple-macos* | \
-      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \
-      *-*-mirbsd* | \
-      *-*-sunos4* | \
-      *-*-osf* | \
-      *-*-dgux5* | \
-      *-*-sysv5* | \
-      *-pc-msdosdjgpp )
-        dnl defaults are ok
-      ;;
-
-      *)
-        AC_MSG_ERROR(unknown system type $BAKEFILE_HOST.)
-    esac
-
-    if test "x$PIC_FLAG" != "x" ; then
-        PIC_FLAG="$PIC_FLAG -DPIC"
-    fi
-
-    if test "x$SHARED_LD_MODULE_CC" = "x" ; then
-        SHARED_LD_MODULE_CC="$SHARED_LD_CC"
-    fi
-    if test "x$SHARED_LD_MODULE_CXX" = "x" ; then
-        SHARED_LD_MODULE_CXX="$SHARED_LD_CXX"
-    fi
-
-    AC_SUBST(SHARED_LD_CC)
-    AC_SUBST(SHARED_LD_CXX)
-    AC_SUBST(SHARED_LD_MODULE_CC)
-    AC_SUBST(SHARED_LD_MODULE_CXX)
-    AC_SUBST(PIC_FLAG)
-    AC_SUBST(WINDOWS_IMPLIB)
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SHARED_VERSIONS
-dnl
-dnl Detects linker options for attaching versions (sonames) to shared  libs.
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_SHARED_VERSIONS],
-[
-    USE_SOVERSION=0
-    USE_SOVERLINUX=0
-    USE_SOVERSOLARIS=0
-    USE_SOVERCYGWIN=0
-    USE_SOTWOSYMLINKS=0
-    USE_MACVERSION=0
-    SONAME_FLAG=
-
-    case "${BAKEFILE_HOST}" in
-      *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-      *-*-k*bsd*-gnu | *-*-mirbsd* )
-        if test "x$SUNCXX" = "xyes"; then
-            SONAME_FLAG="-h "
-        else
-            SONAME_FLAG="-Wl,-soname,"
-        fi
-        USE_SOVERSION=1
-        USE_SOVERLINUX=1
-        USE_SOTWOSYMLINKS=1
-      ;;
-
-      *-*-solaris2* )
-        SONAME_FLAG="-h "
-        USE_SOVERSION=1
-        USE_SOVERSOLARIS=1
-      ;;
-
-      *-*-darwin* )
-        USE_MACVERSION=1
-        USE_SOVERSION=1
-        USE_SOTWOSYMLINKS=1
-      ;;
-
-      *-*-cygwin* )
-        USE_SOVERSION=1
-        USE_SOVERCYGWIN=1
-      ;;
-    esac
-
-    AC_SUBST(USE_SOVERSION)
-    AC_SUBST(USE_SOVERLINUX)
-    AC_SUBST(USE_SOVERSOLARIS)
-    AC_SUBST(USE_SOVERCYGWIN)
-    AC_SUBST(USE_MACVERSION)
-    AC_SUBST(USE_SOTWOSYMLINKS)
-    AC_SUBST(SONAME_FLAG)
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_DEPS
-dnl
-dnl Detects available C/C++ dependency tracking options
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_DEPS],
-[
-    AC_ARG_ENABLE([dependency-tracking],
-                  AS_HELP_STRING([--disable-dependency-tracking],
-                                 [don't use dependency tracking even if the compiler can]),
-                  [bk_use_trackdeps="$enableval"])
-
-    AC_MSG_CHECKING([for dependency tracking method])
-
-    BK_DEPS=""
-    if test "x$bk_use_trackdeps" = "xno" ; then
-        DEPS_TRACKING=0
-        AC_MSG_RESULT([disabled])
-    else
-        DEPS_TRACKING=1
-
-        if test "x$GCC" = "xyes"; then
-            DEPSMODE=gcc
-            case "${BAKEFILE_HOST}" in
-                *-*-darwin* )
-                    dnl -cpp-precomp (the default) conflicts with -MMD option
-                    dnl used by bk-deps (see also http://developer.apple.com/documentation/Darwin/Conceptual/PortingUnix/compiling/chapter_4_section_3.html)
-                    DEPSFLAG="-no-cpp-precomp -MMD"
-                ;;
-                * )
-                    DEPSFLAG="-MMD"
-                ;;
-            esac
-            AC_MSG_RESULT([gcc])
-        elif test "x$MWCC" = "xyes"; then
-            DEPSMODE=mwcc
-            DEPSFLAG="-MM"
-            AC_MSG_RESULT([mwcc])
-        elif test "x$SUNCC" = "xyes"; then
-            DEPSMODE=unixcc
-            DEPSFLAG="-xM1"
-            AC_MSG_RESULT([Sun cc])
-        elif test "x$SGICC" = "xyes"; then
-            DEPSMODE=unixcc
-            DEPSFLAG="-M"
-            AC_MSG_RESULT([SGI cc])
-        elif test "x$HPCC" = "xyes"; then
-            DEPSMODE=unixcc
-            DEPSFLAG="+make"
-            AC_MSG_RESULT([HP cc])
-        elif test "x$COMPAQCC" = "xyes"; then
-            DEPSMODE=gcc
-            DEPSFLAG="-MD"
-            AC_MSG_RESULT([Compaq cc])
-        else
-            DEPS_TRACKING=0
-            AC_MSG_RESULT([none])
-        fi
-
-        if test $DEPS_TRACKING = 1 ; then
-            AC_BAKEFILE_CREATE_FILE_BK_DEPS
-            chmod +x bk-deps
-            dnl FIXME: make this $(top_builddir)/bk-deps once autoconf-2.60
-            dnl        is required (and so top_builddir is never empty):
-            BK_DEPS="`pwd`/bk-deps"
-        fi
-    fi
-
-    AC_SUBST(DEPS_TRACKING)
-    AC_SUBST(BK_DEPS)
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_CHECK_BASIC_STUFF
-dnl
-dnl Checks for presence of basic programs, such as C and C++ compiler, "ranlib"
-dnl or "install"
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_CHECK_BASIC_STUFF],
-[
-    AC_PROG_RANLIB
-    AC_PROG_INSTALL
-    AC_PROG_LN_S
-
-    AC_PROG_MAKE_SET
-    AC_SUBST(MAKE_SET)
-
-    if test "x$SUNCXX" = "xyes"; then
-        dnl Sun C++ compiler requires special way of creating static libs;
-        dnl see here for more details:
-        dnl https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1229751&group_id=9863
-        AR=$CXX
-        AROPTIONS="-xar -o"
-        AC_SUBST(AR)
-    elif test "x$SGICC" = "xyes"; then
-        dnl Almost the same as above for SGI mipsPro compiler
-        AR=$CXX
-        AROPTIONS="-ar -o"
-        AC_SUBST(AR)
-    else
-        AC_CHECK_TOOL(AR, ar, ar)
-        AROPTIONS=rcu
-    fi
-    AC_SUBST(AROPTIONS)
-
-    AC_CHECK_TOOL(STRIP, strip, :)
-    AC_CHECK_TOOL(NM, nm, :)
-
-    dnl This check is necessary because "install -d" doesn't exist on
-    dnl all platforms (e.g. HP/UX), see http://www.bakefile.org/ticket/80
-    AC_MSG_CHECKING([for command to install directories])
-    INSTALL_TEST_DIR=acbftest$$
-    $INSTALL -d $INSTALL_TEST_DIR > /dev/null 2>&1
-    if test $? = 0 -a -d $INSTALL_TEST_DIR; then
-        rmdir $INSTALL_TEST_DIR
-        dnl we must refer to makefile's $(INSTALL) variable and not
-        dnl current value of shell variable, hence the single quoting:
-        INSTALL_DIR='$(INSTALL) -d'
-        AC_MSG_RESULT([$INSTALL -d])
-    else
-        INSTALL_DIR="mkdir -p"
-        AC_MSG_RESULT([mkdir -p])
-    fi
-    AC_SUBST(INSTALL_DIR)
-
-    LDFLAGS_GUI=
-    case ${BAKEFILE_HOST} in
-        *-*-cygwin* | *-*-mingw32* )
-        LDFLAGS_GUI="-mwindows"
-    esac
-    AC_SUBST(LDFLAGS_GUI)
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_RES_COMPILERS
-dnl
-dnl Checks for presence of resource compilers for win32 or mac
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_RES_COMPILERS],
-[
-    case ${BAKEFILE_HOST} in
-        *-*-cygwin* | *-*-mingw32* )
-            dnl Check for win32 resources compiler:
-            AC_CHECK_TOOL(WINDRES, windres)
-         ;;
-
-      *-*-darwin* | powerpc-apple-macos* )
-            AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez)
-            AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile)
-        ;;
-    esac
-
-    AC_SUBST(WINDRES)
-    AC_SUBST(REZ)
-    AC_SUBST(SETFILE)
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_PRECOMP_HEADERS
-dnl
-dnl Check for precompiled headers support (GCC >= 3.4)
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_PRECOMP_HEADERS],
-[
-
-    AC_ARG_ENABLE([precomp-headers],
-                  AS_HELP_STRING([--disable-precomp-headers],
-                                 [don't use precompiled headers even if compiler can]),
-                  [bk_use_pch="$enableval"])
-
-    GCC_PCH=0
-    ICC_PCH=0
-    USE_PCH=0
-    BK_MAKE_PCH=""
-
-    case ${BAKEFILE_HOST} in
-        *-*-cygwin* )
-            dnl PCH support is broken in cygwin gcc because of unportable
-            dnl assumptions about mmap() in gcc code which make PCH generation
-            dnl fail erratically; disable PCH completely until this is fixed
-            bk_use_pch="no"
-            ;;
-    esac
-
-    if test "x$bk_use_pch" = "x" -o "x$bk_use_pch" = "xyes" ; then
-        if test "x$GCC" = "xyes"; then
-            dnl test if we have gcc-3.4:
-            AC_MSG_CHECKING([if the compiler supports precompiled headers])
-            AC_TRY_COMPILE([],
-                [
-                    #if !defined(__GNUC__) || !defined(__GNUC_MINOR__)
-                        There is no PCH support
-                    #endif
-                    #if (__GNUC__ < 3)
-                        There is no PCH support
-                    #endif
-                    #if (__GNUC__ == 3) && \
-                       ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \
-                       ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \
-                       ( defined(__INTEL_COMPILER) )
-                        There is no PCH support
-                    #endif
-                ],
-                [
-                    AC_MSG_RESULT([yes])
-                    GCC_PCH=1
-                ],
-                [
-                    if test "$INTELCXX8" = "yes"; then
-                        AC_MSG_RESULT([yes])
-                        ICC_PCH=1
-                        if test "$INTELCXX10" = "yes"; then
-                            ICC_PCH_CREATE_SWITCH="-pch-create"
-                            ICC_PCH_USE_SWITCH="-pch-use"
-                        else
-                            ICC_PCH_CREATE_SWITCH="-create-pch"
-                            ICC_PCH_USE_SWITCH="-use-pch"
-                        fi
-                    else
-                        AC_MSG_RESULT([no])
-                    fi
-                ])
-            if test $GCC_PCH = 1 -o $ICC_PCH = 1 ; then
-                USE_PCH=1
-                AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH
-                chmod +x bk-make-pch
-                dnl FIXME: make this $(top_builddir)/bk-make-pch once
-                dnl        autoconf-2.60 is required (and so top_builddir is
-                dnl        never empty):
-                BK_MAKE_PCH="`pwd`/bk-make-pch"
-            fi
-        fi
-    fi
-
-    AC_SUBST(GCC_PCH)
-    AC_SUBST(ICC_PCH)
-    AC_SUBST(ICC_PCH_CREATE_SWITCH)
-    AC_SUBST(ICC_PCH_USE_SWITCH)
-    AC_SUBST(BK_MAKE_PCH)
-])
-
-
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE([autoconf_inc.m4 inclusion])
-dnl
-dnl To be used in configure.in of any project using Bakefile-generated mks
-dnl
-dnl Behaviour can be modified by setting following variables:
-dnl    BAKEFILE_CHECK_BASICS    set to "no" if you don't want bakefile to
-dnl                             to perform check for basic tools like ranlib
-dnl    BAKEFILE_HOST            set this to override host detection, defaults
-dnl                             to ${host}
-dnl    BAKEFILE_FORCE_PLATFORM  set to override platform detection
-dnl
-dnl Example usage:
-dnl
-dnl   AC_BAKEFILE([FOO(autoconf_inc.m4)])
-dnl
-dnl (replace FOO with m4_include above, aclocal would die otherwise)
-dnl (yes, it's ugly, but thanks to a bug in aclocal, it's the only thing
-dnl we can do...)
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE],
-[
-    AC_PREREQ([2.58])
-
-    dnl We need to always run C/C++ compiler tests, but it's also possible
-    dnl for the user to call these macros manually, hence this instead of
-    dnl simply calling these macros. See http://www.bakefile.org/ticket/64
-    AC_REQUIRE([AC_BAKEFILE_PROG_CC])
-    AC_REQUIRE([AC_BAKEFILE_PROG_CXX])
-
-    if test "x$BAKEFILE_HOST" = "x"; then
-               if test "x${host}" = "x" ; then
-                       AC_MSG_ERROR([You must call the autoconf "CANONICAL_HOST" macro in your configure.ac (or .in) file.])
-               fi
-
-        BAKEFILE_HOST="${host}"
-    fi
-
-    if test "x$BAKEFILE_CHECK_BASICS" != "xno"; then
-        AC_BAKEFILE_CHECK_BASIC_STUFF
-    fi
-    AC_BAKEFILE_GNUMAKE
-    AC_BAKEFILE_PLATFORM
-    AC_BAKEFILE_PLATFORM_SPECIFICS
-    AC_BAKEFILE_SUFFIXES
-    AC_BAKEFILE_SHARED_LD
-    AC_BAKEFILE_SHARED_VERSIONS
-    AC_BAKEFILE_DEPS
-    AC_BAKEFILE_RES_COMPILERS
-
-    dnl OBJCFLAGS is set by Autoconf, but OBJCXXFLAGS is not:
-    AC_SUBST(OBJCXXFLAGS)
-
-
-    BAKEFILE_BAKEFILE_M4_VERSION="0.2.9"
-
-    dnl includes autoconf_inc.m4:
-    $1
-
-    if test "$BAKEFILE_AUTOCONF_INC_M4_VERSION" = "" ; then
-        AC_MSG_ERROR([No version found in autoconf_inc.m4 - bakefile macro was changed to take additional argument, perhaps configure.in wasn't updated (see the documentation)?])
-    fi
-
-    if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then
-        AC_MSG_ERROR([Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match.])
-    fi
-])
-
-
-dnl ---------------------------------------------------------------------------
-dnl              Embedded copies of helper scripts follow:
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_DEPS],
-[
-dnl ===================== bk-deps begins here =====================
-dnl    (Created by merge-scripts.py from bk-deps
-dnl     file do not edit here!)
-D='$'
-cat <<EOF >bk-deps
-#!/bin/sh
-
-# This script is part of Bakefile (http://www.bakefile.org) autoconf
-# script. It is used to track C/C++ files dependencies in portable way.
-#
-# Permission is given to use this file in any way.
-
-DEPSMODE=${DEPSMODE}
-DEPSFLAG="${DEPSFLAG}"
-DEPSDIRBASE=.deps
-
-if test ${D}DEPSMODE = gcc ; then
-    ${D}* ${D}{DEPSFLAG}
-    status=${D}?
-
-    # determine location of created files:
-    while test ${D}# -gt 0; do
-        case "${D}1" in
-            -o )
-                shift
-                objfile=${D}1
-            ;;
-            -* )
-            ;;
-            * )
-                srcfile=${D}1
-            ;;
-        esac
-        shift
-    done
-    objfilebase=\`basename ${D}objfile\`
-    builddir=\`dirname ${D}objfile\`
-    depfile=\`basename ${D}srcfile | sed -e 's/\\..*${D}/.d/g'\`
-    depobjname=\`echo ${D}depfile |sed -e 's/\\.d/.o/g'\`
-    depsdir=${D}builddir/${D}DEPSDIRBASE
-    mkdir -p ${D}depsdir
-
-    # if the compiler failed, we're done:
-    if test ${D}{status} != 0 ; then
-        rm -f ${D}depfile
-        exit ${D}{status}
-    fi
-
-    # move created file to the location we want it in:
-    if test -f ${D}depfile ; then
-        sed -e "s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{depsdir}/${D}{objfilebase}.d
-        rm -f ${D}depfile
-    else
-        # "g++ -MMD -o fooobj.o foosrc.cpp" produces fooobj.d
-        depfile=\`echo "${D}objfile" | sed -e 's/\\..*${D}/.d/g'\`
-        if test ! -f ${D}depfile ; then
-            # "cxx -MD -o fooobj.o foosrc.cpp" creates fooobj.o.d (Compaq C++)
-            depfile="${D}objfile.d"
-        fi
-        if test -f ${D}depfile ; then
-            sed -e "\\,^${D}objfile,!s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{depsdir}/${D}{objfilebase}.d
-            rm -f ${D}depfile
-        fi
-    fi
-    exit 0
-
-elif test ${D}DEPSMODE = mwcc ; then
-    ${D}* || exit ${D}?
-    # Run mwcc again with -MM and redirect into the dep file we want
-    # NOTE: We can't use shift here because we need ${D}* to be valid
-    prevarg=
-    for arg in ${D}* ; do
-        if test "${D}prevarg" = "-o"; then
-            objfile=${D}arg
-        else
-            case "${D}arg" in
-                -* )
-                ;;
-                * )
-                    srcfile=${D}arg
-                ;;
-            esac
-        fi
-        prevarg="${D}arg"
-    done
-
-    objfilebase=\`basename ${D}objfile\`
-    builddir=\`dirname ${D}objfile\`
-    depsdir=${D}builddir/${D}DEPSDIRBASE
-    mkdir -p ${D}depsdir
-
-    ${D}* ${D}DEPSFLAG >${D}{depsdir}/${D}{objfilebase}.d
-    exit 0
-
-elif test ${D}DEPSMODE = unixcc; then
-    ${D}* || exit ${D}?
-    # Run compiler again with deps flag and redirect into the dep file.
-    # It doesn't work if the '-o FILE' option is used, but without it the
-    # dependency file will contain the wrong name for the object. So it is
-    # removed from the command line, and the dep file is fixed with sed.
-    cmd=""
-    while test ${D}# -gt 0; do
-        case "${D}1" in
-            -o )
-                shift
-                objfile=${D}1
-            ;;
-            * )
-                eval arg${D}#=\\${D}1
-                cmd="${D}cmd \\${D}arg${D}#"
-            ;;
-        esac
-        shift
-    done
-
-    objfilebase=\`basename ${D}objfile\`
-    builddir=\`dirname ${D}objfile\`
-    depsdir=${D}builddir/${D}DEPSDIRBASE
-    mkdir -p ${D}depsdir
-
-    eval "${D}cmd ${D}DEPSFLAG" | sed "s|.*:|${D}objfile:|" >${D}{depsdir}/${D}{objfilebase}.d
-    exit 0
-
-else
-    ${D}*
-    exit ${D}?
-fi
-EOF
-dnl ===================== bk-deps ends here =====================
-])
-
-AC_DEFUN([AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH],
-[
-dnl ===================== shared-ld-sh begins here =====================
-dnl    (Created by merge-scripts.py from shared-ld-sh
-dnl     file do not edit here!)
-D='$'
-cat <<EOF >shared-ld-sh
-#!/bin/sh
-#-----------------------------------------------------------------------------
-#-- Name:        distrib/mac/shared-ld-sh
-#-- Purpose:     Link a mach-o dynamic shared library for Darwin / Mac OS X
-#-- Author:      Gilles Depeyrot
-#-- Copyright:   (c) 2002 Gilles Depeyrot
-#-- Licence:     any use permitted
-#-----------------------------------------------------------------------------
-
-verbose=0
-args=""
-objects=""
-linking_flag="-dynamiclib"
-ldargs="-r -keep_private_externs -nostdlib"
-
-if test "x${D}CXX" = "x"; then
-    CXX="c++"
-fi
-
-while test ${D}# -gt 0; do
-    case ${D}1 in
-
-       -v)
-        verbose=1
-        ;;
-
-       -o|-compatibility_version|-current_version|-framework|-undefined|-install_name)
-        # collect these options and values
-        args="${D}{args} ${D}1 ${D}2"
-        shift
-        ;;
-       
-       -arch|-isysroot)
-        # collect these options and values
-        ldargs="${D}{ldargs} ${D}1 ${D}2"
-        shift
-        ;;
-
-       -s|-Wl,*)
-        # collect these load args
-        ldargs="${D}{ldargs} ${D}1"
-        ;;
-
-       -l*|-L*|-flat_namespace|-headerpad_max_install_names)
-        # collect these options
-        args="${D}{args} ${D}1"
-        ;;
-
-       -dynamiclib|-bundle)
-        linking_flag="${D}1"
-        ;;
-
-       -*)
-        echo "shared-ld: unhandled option '${D}1'"
-        exit 1
-        ;;
-
-        *.o | *.a | *.dylib)
-        # collect object files
-        objects="${D}{objects} ${D}1"
-        ;;
-
-        *)
-        echo "shared-ld: unhandled argument '${D}1'"
-        exit 1
-        ;;
-
-    esac
-    shift
-done
-
-status=0
-
-#
-# Link one module containing all the others
-#
-if test ${D}{verbose} = 1; then
-    echo "${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o"
-fi
-${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o
-status=${D}?
-
-#
-# Link the shared library from the single module created, but only if the
-# previous command didn't fail:
-#
-if test ${D}{status} = 0; then
-    if test ${D}{verbose} = 1; then
-        echo "${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}"
-    fi
-    ${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}
-    status=${D}?
-fi
-
-#
-# Remove intermediate module
-#
-rm -f master.${D}${D}.o
-
-exit ${D}status
-EOF
-dnl ===================== shared-ld-sh ends here =====================
-])
-
-AC_DEFUN([AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH],
-[
-dnl ===================== bk-make-pch begins here =====================
-dnl    (Created by merge-scripts.py from bk-make-pch
-dnl     file do not edit here!)
-D='$'
-cat <<EOF >bk-make-pch
-#!/bin/sh
-
-# This script is part of Bakefile (http://www.bakefile.org) autoconf
-# script. It is used to generated precompiled headers.
-#
-# Permission is given to use this file in any way.
-
-outfile="${D}{1}"
-header="${D}{2}"
-shift
-shift
-
-builddir=\`echo ${D}outfile | sed -e 's,/\\.pch/.*${D},,g'\`
-
-compiler=""
-headerfile=""
-
-while test ${D}{#} -gt 0; do
-    add_to_cmdline=1
-    case "${D}{1}" in
-        -I* )
-            incdir=\`echo ${D}{1} | sed -e 's/-I\\(.*\\)/\\1/g'\`
-            if test "x${D}{headerfile}" = "x" -a -f "${D}{incdir}/${D}{header}" ; then
-                headerfile="${D}{incdir}/${D}{header}"
-            fi
-        ;;
-        -use-pch|-use_pch|-pch-use )
-            shift
-            add_to_cmdline=0
-        ;;
-    esac
-    if test ${D}add_to_cmdline = 1 ; then
-        compiler="${D}{compiler} ${D}{1}"
-    fi
-    shift
-done
-
-if test "x${D}{headerfile}" = "x" ; then
-    echo "error: can't find header ${D}{header} in include paths" >&2
-else
-    if test -f ${D}{outfile} ; then
-        rm -f ${D}{outfile}
-    else
-        mkdir -p \`dirname ${D}{outfile}\`
-    fi
-    depsfile="${D}{builddir}/.deps/\`echo ${D}{outfile} | tr '/.' '__'\`.d"
-    mkdir -p ${D}{builddir}/.deps
-    if test "x${GCC_PCH}" = "x1" ; then
-        # can do this because gcc is >= 3.4:
-        ${D}{compiler} -o ${D}{outfile} -MMD -MF "${D}{depsfile}" "${D}{headerfile}"
-    elif test "x${ICC_PCH}" = "x1" ; then
-        filename=pch_gen-${D}${D}
-        file=${D}{filename}.c
-        dfile=${D}{filename}.d
-        cat > ${D}file <<EOT
-#include "${D}header"
-EOT
-        # using -MF icc complains about differing command lines in creation/use
-        ${D}compiler -c ${ICC_PCH_CREATE_SWITCH} ${D}outfile -MMD ${D}file && \\
-          sed -e "s,^.*:,${D}outfile:," -e "s, ${D}file,," < ${D}dfile > ${D}depsfile && \\
-          rm -f ${D}file ${D}dfile ${D}{filename}.o
-    fi
-    exit ${D}{?}
-fi
-EOF
-dnl ===================== bk-make-pch ends here =====================
-])
-
diff --git a/build/autoconf/acregen.sh b/build/autoconf/acregen.sh
deleted file mode 100755
index ef0ed37..0000000
--- a/build/autoconf/acregen.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/bash
-#
-# Author: Francesco Montorsi
-# RCS-ID: $Id: acregen.sh 236 2009-11-24 23:12:00Z frm $
-# Creation date: 14/9/2005
-#
-# A simple script to generate the configure script
-# Some features of this version:
-# - automatic test for aclocal version
-# - able to be called from any folder
-#   (i.e. you can call it typing 'build/autoconf/acregen.sh', not only './acregen.sh')
-
-
-# called when an old version of aclocal is found
-function aclocalold()
-{
-    echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel"
-    echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel"
-    echo "You can download automake from ftp://sources.redhat.com/pub/automake/"
-    exit 1
-}
-
-# first check if we have an ACLOCAL version recent enough
-aclocal_verfull=$(aclocal --version)
-aclocal_maj=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'`
-aclocal_min=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'`
-aclocal_rel=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'`
-if [[ "$aclocal_rel" = "" ]]; then aclocal_rel="0"; fi
-
-#echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel"   # for debugging
-
-aclocal_minimal_maj=1
-aclocal_minimal_min=9
-aclocal_minimal_rel=6
-
-majok=$(($aclocal_maj > $aclocal_minimal_maj))
-minok=$(($aclocal_maj == $aclocal_minimal_maj && $aclocal_min > $aclocal_minimal_min))
-relok=$(($aclocal_maj == $aclocal_minimal_maj && $aclocal_min == $aclocal_minimal_min && \
-         $aclocal_rel >= $aclocal_minimal_rel))
-
-versionok=$(($majok == 1 || $minok == 1 || $relok == 1))
-if [[ "$versionok" = "0" ]]; then aclocalold; fi
-
-# we can safely proceed
-me=$(basename $0)
-path=${0%%/$me}        # path from which the script has been launched
-current=$(pwd)
-cd $path
-aclocal && autoconf && mv configure ../..
-cd $current
diff --git a/build/autoconf/autoconf_inc.m4 b/build/autoconf/autoconf_inc.m4
deleted file mode 100644
index cc17b06..0000000
--- a/build/autoconf/autoconf_inc.m4
+++ /dev/null
@@ -1,134 +0,0 @@
-dnl ### begin block 00_header[muparser.bkl] ###
-dnl
-dnl This macro was generated by
-dnl Bakefile 0.2.9 (http://www.bakefile.org)
-dnl Do not modify, all changes will be overwritten!
-
-BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.9"
-
-dnl ### begin block 20_COND_DEBUG_0[muparser.bkl] ###
-    COND_DEBUG_0="#"
-    if test "x$DEBUG" = "x0" ; then
-        COND_DEBUG_0=""
-    fi
-    AC_SUBST(COND_DEBUG_0)
-dnl ### begin block 20_COND_DEBUG_1[muparser.bkl] ###
-    COND_DEBUG_1="#"
-    if test "x$DEBUG" = "x1" ; then
-        COND_DEBUG_1=""
-    fi
-    AC_SUBST(COND_DEBUG_1)
-dnl ### begin block 20_COND_DEPS_TRACKING_0[muparser.bkl] ###
-    COND_DEPS_TRACKING_0="#"
-    if test "x$DEPS_TRACKING" = "x0" ; then
-        COND_DEPS_TRACKING_0=""
-    fi
-    AC_SUBST(COND_DEPS_TRACKING_0)
-dnl ### begin block 20_COND_DEPS_TRACKING_1[muparser.bkl] ###
-    COND_DEPS_TRACKING_1="#"
-    if test "x$DEPS_TRACKING" = "x1" ; then
-        COND_DEPS_TRACKING_1=""
-    fi
-    AC_SUBST(COND_DEPS_TRACKING_1)
-dnl ### begin block 20_COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1[muparser.bkl] ###
-    COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1="#"
-    if test "x$PLATFORM_MACOSX" = "x0" -a "x$USE_SOVERCYGWIN" = "x0" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1=""
-    fi
-    AC_SUBST(COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1)
-dnl ### begin block 20_COND_PLATFORM_MACOSX_0_USE_SOVERSION_1[muparser.bkl] ###
-    COND_PLATFORM_MACOSX_0_USE_SOVERSION_1="#"
-    if test "x$PLATFORM_MACOSX" = "x0" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_PLATFORM_MACOSX_0_USE_SOVERSION_1=""
-    fi
-    AC_SUBST(COND_PLATFORM_MACOSX_0_USE_SOVERSION_1)
-dnl ### begin block 20_COND_PLATFORM_MACOSX_1[muparser.bkl] ###
-    COND_PLATFORM_MACOSX_1="#"
-    if test "x$PLATFORM_MACOSX" = "x1" ; then
-        COND_PLATFORM_MACOSX_1=""
-    fi
-    AC_SUBST(COND_PLATFORM_MACOSX_1)
-dnl ### begin block 20_COND_PLATFORM_MACOSX_1_USE_SOVERSION_1[muparser.bkl] ###
-    COND_PLATFORM_MACOSX_1_USE_SOVERSION_1="#"
-    if test "x$PLATFORM_MACOSX" = "x1" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_PLATFORM_MACOSX_1_USE_SOVERSION_1=""
-    fi
-    AC_SUBST(COND_PLATFORM_MACOSX_1_USE_SOVERSION_1)
-dnl ### begin block 20_COND_PLATFORM_MAC_0[muparser.bkl] ###
-    COND_PLATFORM_MAC_0="#"
-    if test "x$PLATFORM_MAC" = "x0" ; then
-        COND_PLATFORM_MAC_0=""
-    fi
-    AC_SUBST(COND_PLATFORM_MAC_0)
-dnl ### begin block 20_COND_PLATFORM_MAC_1[muparser.bkl] ###
-    COND_PLATFORM_MAC_1="#"
-    if test "x$PLATFORM_MAC" = "x1" ; then
-        COND_PLATFORM_MAC_1=""
-    fi
-    AC_SUBST(COND_PLATFORM_MAC_1)
-dnl ### begin block 20_COND_PLATFORM_OS2_1[muparser.bkl] ###
-    COND_PLATFORM_OS2_1="#"
-    if test "x$PLATFORM_OS2" = "x1" ; then
-        COND_PLATFORM_OS2_1=""
-    fi
-    AC_SUBST(COND_PLATFORM_OS2_1)
-dnl ### begin block 20_COND_SAMPLES_1[muparser.bkl] ###
-    COND_SAMPLES_1="#"
-    if test "x$SAMPLES" = "x1" ; then
-        COND_SAMPLES_1=""
-    fi
-    AC_SUBST(COND_SAMPLES_1)
-dnl ### begin block 20_COND_SHARED_0[muparser.bkl] ###
-    COND_SHARED_0="#"
-    if test "x$SHARED" = "x0" ; then
-        COND_SHARED_0=""
-    fi
-    AC_SUBST(COND_SHARED_0)
-dnl ### begin block 20_COND_SHARED_1[muparser.bkl] ###
-    COND_SHARED_1="#"
-    if test "x$SHARED" = "x1" ; then
-        COND_SHARED_1=""
-    fi
-    AC_SUBST(COND_SHARED_1)
-dnl ### begin block 20_COND_USE_SOTWOSYMLINKS_1[muparser.bkl] ###
-    COND_USE_SOTWOSYMLINKS_1="#"
-    if test "x$USE_SOTWOSYMLINKS" = "x1" ; then
-        COND_USE_SOTWOSYMLINKS_1=""
-    fi
-    AC_SUBST(COND_USE_SOTWOSYMLINKS_1)
-dnl ### begin block 20_COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1[muparser.bkl] ###
-    COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1="#"
-    if test "x$USE_SOVERCYGWIN" = "x1" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1=""
-    fi
-    AC_SUBST(COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1)
-dnl ### begin block 20_COND_USE_SOVERLINUX_1[muparser.bkl] ###
-    COND_USE_SOVERLINUX_1="#"
-    if test "x$USE_SOVERLINUX" = "x1" ; then
-        COND_USE_SOVERLINUX_1=""
-    fi
-    AC_SUBST(COND_USE_SOVERLINUX_1)
-dnl ### begin block 20_COND_USE_SOVERSION_0[muparser.bkl] ###
-    COND_USE_SOVERSION_0="#"
-    if test "x$USE_SOVERSION" = "x0" ; then
-        COND_USE_SOVERSION_0=""
-    fi
-    AC_SUBST(COND_USE_SOVERSION_0)
-dnl ### begin block 20_COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1[muparser.bkl] ###
-    COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1="#"
-    if test "x$USE_SOVERSION" = "x1" -a "x$USE_SOVERSOLARIS" = "x1" ; then
-        COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1=""
-    fi
-    AC_SUBST(COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1)
-dnl ### begin block 20_COND_USE_SOVERSOLARIS_1[muparser.bkl] ###
-    COND_USE_SOVERSOLARIS_1="#"
-    if test "x$USE_SOVERSOLARIS" = "x1" ; then
-        COND_USE_SOVERSOLARIS_1=""
-    fi
-    AC_SUBST(COND_USE_SOVERSOLARIS_1)
-dnl ### begin block 20_COND_WINDOWS_IMPLIB_1[muparser.bkl] ###
-    COND_WINDOWS_IMPLIB_1="#"
-    if test "x$WINDOWS_IMPLIB" = "x1" ; then
-        COND_WINDOWS_IMPLIB_1=""
-    fi
-    AC_SUBST(COND_WINDOWS_IMPLIB_1)
diff --git a/build/autoconf/bakefile-presets.m4 b/build/autoconf/bakefile-presets.m4
deleted file mode 100644
index 5d3159e..0000000
--- a/build/autoconf/bakefile-presets.m4
+++ /dev/null
@@ -1,156 +0,0 @@
-dnl ---------------------------------------------------------------------------
-dnl Support macros for makefiles generated with Bakefile presets
-dnl ---------------------------------------------------------------------------
-
-
-dnl ---------------------------------------------------------------------------
-dnl AM_YESNO_OPTCHECK([name of the boolean variable to set],
-dnl                   [name of the variable with yes/no values],
-dnl                   [name of the --enable/--with option])
-dnl
-dnl Converts the $3 variable, supposed to contain a yes/no value to a 1/0
-dnl boolean variable and saves the result into $1.
-dnl Outputs also the standard checking-option message.
-dnl Used by the m4 macros of the presets.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_YESNO_OPTCHECK],
-[
-    AC_MSG_CHECKING([for the $3 option])
-    if [[ "x$$2" = "xyes" ]]; then
-        AC_MSG_RESULT([yes])
-        $1=1
-    else
-        AC_MSG_RESULT([no])
-        $1=0
-    fi
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_UNICODEOPT([default value for the --enable-unicode option])
-dnl
-dnl Adds the --enable-unicode option to the configure script and sets the
-dnl UNICODE=0/1 variable accordingly to the value of the option.
-dnl To be used with unicodeopt.bkl preset.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_UNICODEOPT],
-[
-    default="$1"
-    if [[ -z "$default" ]]; then
-        default="no"
-    fi
-
-    AC_ARG_ENABLE([unicode],
-            AC_HELP_STRING([--enable-unicode], [Builds in Unicode mode]),
-            [], [enableval="$default"])
-
-    AC_BAKEFILE_YESNO_OPTCHECK([UNICODE], [enableval], [--enable-unicode])
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_DEBUGOPT([default value for the --enable-debug option])
-dnl
-dnl Adds the --enable-debug option to the configure script and sets the
-dnl DEBUG=0/1 variable accordingly to the value of the option.
-dnl To be used with debugopt.bkl preset.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_DEBUGOPT],
-[
-    default="$1"
-    if [[ -z "$default" ]]; then
-        default="no"
-    fi
-
-    AC_ARG_ENABLE([debug],
-            AC_HELP_STRING([--enable-debug], [Builds in debug mode]),
-            [], [enableval="$default"])
-
-    AC_BAKEFILE_YESNO_OPTCHECK([DEBUG], [enableval], [--enable-debug])
-
-    dnl add the optimize/debug flags
-    if [[ "x$DEBUG" = "x1" ]]; then
-
-        dnl NOTE: the -Wundef and -Wno-ctor-dtor-privacy are not enabled automatically by -Wall
-        dnl NOTE2: the '-Wno-ctor-dtor-privacy' has sense only when compiling C++ source files
-        dnl        and thus we must be careful to add it only to CXXFLAGS and not to CFLAGS
-        dnl        (remember that CPPFLAGS is reserved for both C and C++ compilers while
-        dnl         CFLAGS is intended as flags for C compiler only and CXXFLAGS for C++ only)
-        my_CXXFLAGS="$my_CXXFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy"
-        my_CFLAGS="$my_CFLAGS -g -O0 -Wall -Wundef"
-    else
-        my_CXXFLAGS="$my_CXXFLAGS -O2"
-        my_CFLAGS="$my_CFLAGS -O2"
-    fi
-    # User-supplied CXXFLAGS must always take precedence.
-    # This still sucks because using `make CFLAGS=-foobar` kills
-    # the project-supplied flags again.
-    CXXFLAGS="$my_CXXFLAGS $CXXFLAGS"
-    CFLAGS="$my_CFLAGS $CFLAGS"
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SHAREDOPT([default value for the --enable-shared option])
-dnl
-dnl Adds the --enable-shared option to the configure script and sets the
-dnl SHARED=0/1 variable accordingly to the value of the option.
-dnl To be used with sharedopt.bkl preset.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_SHAREDOPT],
-[
-    default="$1"
-    if [[ -z "$default" ]]; then
-        default="no"
-    fi
-
-    AC_ARG_ENABLE([shared],
-            AC_HELP_STRING([--enable-shared], [Builds in shared mode]),
-            [], [enableval="$default"])
-
-    AC_BAKEFILE_YESNO_OPTCHECK([SHARED], [enableval], [--enable-shared])
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SHOW_DEBUGOPT
-dnl
-dnl Prints a message on stdout about the value of the DEBUG variable.
-dnl This macro is useful to show summary messages at the end of the configure scripts.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_SHOW_DEBUGOPT],
-[
-    if [[ "$DEBUG" = "1" ]]; then
-        echo "  - DEBUG build"
-    else
-        echo "  - RELEASE build"
-    fi
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SHOW_SHAREDOPT
-dnl
-dnl Prints a message on stdout about the value of the SHARED variable.
-dnl This macro is useful to show summary messages at the end of the configure scripts.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_SHOW_SHAREDOPT],
-[
-    if [[ "$SHARED" = "1" ]]; then
-        echo "  - SHARED mode"
-    else
-        echo "  - STATIC mode"
-    fi
-])
-
-dnl ---------------------------------------------------------------------------
-dnl AC_BAKEFILE_SHOW_UNICODEOPT
-dnl
-dnl Prints a message on stdout about the value of the UNICODE variable.
-dnl This macro is useful to show summary messages at the end of the configure scripts.
-dnl ---------------------------------------------------------------------------
-AC_DEFUN([AC_BAKEFILE_SHOW_UNICODEOPT],
-[
-    if [[ "$UNICODE" = "1" ]]; then
-        echo "  - UNICODE mode"
-    else
-        echo "  - ANSI mode"
-    fi
-])
-
- 	  	 
diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess
deleted file mode 100755
index c38553d..0000000
--- a/build/autoconf/config.guess
+++ /dev/null
@@ -1,1497 +0,0 @@
-#! /bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2006-02-23'
-
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help" >&2
-       exit 1 ;;
-    * )
-       break ;;
-  esac
-done
-
-if test $# != 0; then
-  echo "$me: too many arguments$help" >&2
-  exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
-	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
-	     CC_FOR_BUILD="$c"; break ;
-	  fi ;
-	done ;
-	if test x"$CC_FOR_BUILD" = x ; then
-	  CC_FOR_BUILD=no_compiler_found ;
-	fi
-	;;
- ,,*)   CC_FOR_BUILD=$CC ;;
- ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
-    *:NetBSD:*:*)
-	# NetBSD (nbsd) targets should (where applicable) match one or
-	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
-	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
-	# switched to ELF, *-*-netbsd* would select the old
-	# object file format.  This provides both forward
-	# compatibility and a consistent mechanism for selecting the
-	# object file format.
-	#
-	# Note: NetBSD doesn't particularly care about the vendor
-	# portion of the name.  We always set it to "unknown".
-	sysctl="sysctl -n hw.machine_arch"
-	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
-	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
-	case "${UNAME_MACHINE_ARCH}" in
-	    armeb) machine=armeb-unknown ;;
-	    arm*) machine=arm-unknown ;;
-	    sh3el) machine=shl-unknown ;;
-	    sh3eb) machine=sh-unknown ;;
-	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
-	esac
-	# The Operating System including object format, if it has switched
-	# to ELF recently, or will in the future.
-	case "${UNAME_MACHINE_ARCH}" in
-	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-		eval $set_cc_for_build
-		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
-		then
-		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
-		    # Return netbsd for either.  FIX?
-		    os=netbsd
-		else
-		    os=netbsdelf
-		fi
-		;;
-	    *)
-	        os=netbsd
-		;;
-	esac
-	# The OS release
-	# Debian GNU/NetBSD machines have a different userland, and
-	# thus, need a distinct triplet. However, they do not need
-	# kernel version information, so it can be replaced with a
-	# suitable tag, in the style of linux-gnu.
-	case "${UNAME_VERSION}" in
-	    Debian*)
-		release='-gnu'
-		;;
-	    *)
-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-		;;
-	esac
-	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
-	# contains redundant information, the shorter form:
-	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-	echo "${machine}-${os}${release}"
-	exit ;;
-    *:OpenBSD:*:*)
-	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
-	exit ;;
-    *:ekkoBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
-	exit ;;
-    *:SolidBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
-	exit ;;
-    macppc:MirBSD:*:*)
-	echo powerppc-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    *:MirBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
-	exit ;;
-    alpha:OSF1:*:*)
-	case $UNAME_RELEASE in
-	*4.0)
-		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-		;;
-	*5.*)
-	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
-		;;
-	esac
-	# According to Compaq, /usr/sbin/psrinfo has been available on
-	# OSF/1 and Tru64 systems produced since 1995.  I hope that
-	# covers most systems running today.  This code pipes the CPU
-	# types through head -n 1, so we only detect the type of CPU 0.
-	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
-	case "$ALPHA_CPU_TYPE" in
-	    "EV4 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV4.5 (21064)")
-		UNAME_MACHINE="alpha" ;;
-	    "LCA4 (21066/21068)")
-		UNAME_MACHINE="alpha" ;;
-	    "EV5 (21164)")
-		UNAME_MACHINE="alphaev5" ;;
-	    "EV5.6 (21164A)")
-		UNAME_MACHINE="alphaev56" ;;
-	    "EV5.6 (21164PC)")
-		UNAME_MACHINE="alphapca56" ;;
-	    "EV5.7 (21164PC)")
-		UNAME_MACHINE="alphapca57" ;;
-	    "EV6 (21264)")
-		UNAME_MACHINE="alphaev6" ;;
-	    "EV6.7 (21264A)")
-		UNAME_MACHINE="alphaev67" ;;
-	    "EV6.8CB (21264C)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8AL (21264B)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.8CX (21264D)")
-		UNAME_MACHINE="alphaev68" ;;
-	    "EV6.9A (21264/EV69A)")
-		UNAME_MACHINE="alphaev69" ;;
-	    "EV7 (21364)")
-		UNAME_MACHINE="alphaev7" ;;
-	    "EV7.9 (21364A)")
-		UNAME_MACHINE="alphaev79" ;;
-	esac
-	# A Pn.n version is a patched version.
-	# A Vn.n version is a released version.
-	# A Tn.n version is a released field test version.
-	# A Xn.n version is an unreleased experimental baselevel.
-	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit ;;
-    Alpha\ *:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# Should we change UNAME_MACHINE based on the output of uname instead
-	# of the specific Alpha model?
-	echo alpha-pc-interix
-	exit ;;
-    21064:Windows_NT:50:3)
-	echo alpha-dec-winnt3.5
-	exit ;;
-    Amiga*:UNIX_System_V:4.0:*)
-	echo m68k-unknown-sysv4
-	exit ;;
-    *:[Aa]miga[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit ;;
-    *:[Mm]orph[Oo][Ss]:*:*)
-	echo ${UNAME_MACHINE}-unknown-morphos
-	exit ;;
-    *:OS/390:*:*)
-	echo i370-ibm-openedition
-	exit ;;
-    *:z/VM:*:*)
-	echo s390-ibm-zvmoe
-	exit ;;
-    *:OS400:*:*)
-        echo powerpc-ibm-os400
-	exit ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit ;;
-    arm:riscos:*:*|arm:RISCOS:*:*)
-	echo arm-unknown-riscos
-	exit ;;
-    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
-	echo hppa1.1-hitachi-hiuxmpp
-	exit ;;
-    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
-	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit ;;
-    NILE*:*:*:dcosx)
-	echo pyramid-pyramid-svr4
-	exit ;;
-    DRS?6000:unix:4.0:6*)
-	echo sparc-icl-nx6
-	exit ;;
-    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
-	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7; exit ;;
-	esac ;;
-    sun4H:SunOS:5.*:*)
-	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    sun4*:SunOS:*:*)
-	case "`/usr/bin/arch -k`" in
-	    Series*|S4*)
-		UNAME_RELEASE=`uname -v`
-		;;
-	esac
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit ;;
-    sun*:*:4.2BSD:*)
-	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
-	case "`/bin/arch`" in
-	    sun3)
-		echo m68k-sun-sunos${UNAME_RELEASE}
-		;;
-	    sun4)
-		echo sparc-sun-sunos${UNAME_RELEASE}
-		;;
-	esac
-	exit ;;
-    aushp:SunOS:*:*)
-	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit ;;
-    # The situation for MiNT is a little confusing.  The machine name
-    # can be virtually everything (everything which is not
-    # "atarist" or "atariste" at least should have a processor
-    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
-    # to the lowercase version "mint" (or "freemint").  Finally
-    # the system name "TOS" denotes a system which is actually not
-    # MiNT.  But MiNT is downward compatible to TOS, so this should
-    # be no problem.
-    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-	echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
-    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-        echo m68k-atari-mint${UNAME_RELEASE}
-	exit ;;
-    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-        echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
-    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-        echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
-    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-        echo m68k-unknown-mint${UNAME_RELEASE}
-        exit ;;
-    m68k:machten:*:*)
-	echo m68k-apple-machten${UNAME_RELEASE}
-	exit ;;
-    powerpc:machten:*:*)
-	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit ;;
-    RISC*:Mach:*:*)
-	echo mips-dec-mach_bsd4.3
-	exit ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit ;;
-    2020:CLIX:*:* | 2430:CLIX:*:*)
-	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit ;;
-    mips:*:*:UMIPS | mips:*:*:RISCos)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h>  /* for printf() prototype */
-	int main (int argc, char *argv[]) {
-#else
-	int main (argc, argv) int argc; char *argv[]; {
-#endif
-	#if defined (host_mips) && defined (MIPSEB)
-	#if defined (SYSTYPE_SYSV)
-	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_SVR4)
-	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
-	#endif
-	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
-	#endif
-	#endif
-	  exit (-1);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c &&
-	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-	  SYSTEM_NAME=`$dummy $dummyarg` &&
-	    { echo "$SYSTEM_NAME"; exit; }
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit ;;
-    Motorola:PowerMAX_OS:*:*)
-	echo powerpc-motorola-powermax
-	exit ;;
-    Motorola:*:4.3:PL8-*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
-	echo powerpc-harris-powermax
-	exit ;;
-    Night_Hawk:Power_UNIX:*:*)
-	echo powerpc-harris-powerunix
-	exit ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit ;;
-    AViiON:dgux:*:*)
-        # DG/UX returns AViiON for all architectures
-        UNAME_PROCESSOR=`/usr/bin/uname -p`
-	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
-	then
-	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-	       [ ${TARGET_BINARY_INTERFACE}x = x ]
-	    then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	    else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	    fi
-	else
-	    echo i586-dg-dgux${UNAME_RELEASE}
-	fi
- 	exit ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit ;;
-    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
-	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
-    i*86:AIX:*:*)
-	echo i386-ibm-aix
-	exit ;;
-    ia64:AIX:*:*)
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		eval $set_cc_for_build
-		sed 's/^		//' << EOF >$dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
-		then
-			echo "$SYSTEM_NAME"
-		else
-			echo rs6000-ibm-aix3.2.5
-		fi
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit ;;
-    *:AIX:*:[45])
-	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if [ -x /usr/bin/oslevel ] ; then
-		IBM_REV=`/usr/bin/oslevel`
-	else
-		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
-	echo romp-ibm-bsd4.4
-	exit ;;
-    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit ;;                             # report: romp-ibm BSD 4.3
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit ;;
-    9000/[34678]??:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/[678][0-9][0-9])
-		if [ -x /usr/bin/getconf ]; then
-		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
-                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                    case "${sc_cpu_version}" in
-                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
-                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
-                      532)                      # CPU_PA_RISC2_0
-                        case "${sc_kernel_bits}" in
-                          32) HP_ARCH="hppa2.0n" ;;
-                          64) HP_ARCH="hppa2.0w" ;;
-			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
-                        esac ;;
-                    esac
-		fi
-		if [ "${HP_ARCH}" = "" ]; then
-		    eval $set_cc_for_build
-		    sed 's/^              //' << EOF >$dummy.c
-
-              #define _HPUX_SOURCE
-              #include <stdlib.h>
-              #include <unistd.h>
-
-              int main ()
-              {
-              #if defined(_SC_KERNEL_BITS)
-                  long bits = sysconf(_SC_KERNEL_BITS);
-              #endif
-                  long cpu  = sysconf (_SC_CPU_VERSION);
-
-                  switch (cpu)
-              	{
-              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
-              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
-              	case CPU_PA_RISC2_0:
-              #if defined(_SC_KERNEL_BITS)
-              	    switch (bits)
-              		{
-              		case 64: puts ("hppa2.0w"); break;
-              		case 32: puts ("hppa2.0n"); break;
-              		default: puts ("hppa2.0"); break;
-              		} break;
-              #else  /* !defined(_SC_KERNEL_BITS) */
-              	    puts ("hppa2.0"); break;
-              #endif
-              	default: puts ("hppa1.0"); break;
-              	}
-                  exit (0);
-              }
-EOF
-		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
-		    test -z "$HP_ARCH" && HP_ARCH=hppa
-		fi ;;
-	esac
-	if [ ${HP_ARCH} = "hppa2.0w" ]
-	then
-	    eval $set_cc_for_build
-
-	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
-	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
-	    # generating 64-bit code.  GNU and HP use different nomenclature:
-	    #
-	    # $ CC_FOR_BUILD=cc ./config.guess
-	    # => hppa2.0w-hp-hpux11.23
-	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
-	    # => hppa64-hp-hpux11.23
-
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
-		grep __LP64__ >/dev/null
-	    then
-		HP_ARCH="hppa2.0w"
-	    else
-		HP_ARCH="hppa64"
-	    fi
-	fi
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit ;;
-    ia64:HP-UX:*:*)
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ia64-hp-hpux${HPUX_REV}
-	exit ;;
-    3050*:HI-UX:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
-		{ echo "$SYSTEM_NAME"; exit; }
-	echo unknown-hitachi-hiuxwe2
-	exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit ;;
-    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
-	echo hppa1.0-hp-mpeix
-	exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit ;;
-    i*86:OSF1:*:*)
-	if [ -x /usr/sbin/sysversion ] ; then
-	    echo ${UNAME_MACHINE}-unknown-osf1mk
-	else
-	    echo ${UNAME_MACHINE}-unknown-osf1
-	fi
-	exit ;;
-    parisc*:Lites*:*:*)
-	echo hppa1.1-hp-lites
-	exit ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*[A-Z]90:*:*:*)
-	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
-	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-	      -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*T3E:*:*:*)
-	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    CRAY*SV1:*:*:*)
-	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    *:UNICOS/mp:*:*)
-	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit ;;
-    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
-	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
-        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit ;;
-    5000:UNIX_System_V:4.*:*)
-        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
-        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
-        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit ;;
-    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit ;;
-    sparc*:BSD/OS:*:*)
-	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:BSD/OS:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit ;;
-    *:FreeBSD:*:*)
-	case ${UNAME_MACHINE} in
-	    pc98)
-		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	    *)
-		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-	esac
-	exit ;;
-    i*:CYGWIN*:*)
-	echo ${UNAME_MACHINE}-pc-cygwin
-	exit ;;
-    i*:MINGW*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:MSYS_NT-*:*:*)
-	echo ${UNAME_MACHINE}-pc-mingw32
-	exit ;;
-    i*:windows32*:*)
-    	# uname -m includes "-pc" on this system.
-    	echo ${UNAME_MACHINE}-mingw32
-	exit ;;
-    i*:PW*:*)
-	echo ${UNAME_MACHINE}-pc-pw32
-	exit ;;
-    x86:Interix*:[345]*)
-	echo i586-pc-interix${UNAME_RELEASE}
-	exit ;;
-    EM64T:Interix*:[345]*)
-	echo x86_64-unknown-interix${UNAME_RELEASE}
-	exit ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-	echo i${UNAME_MACHINE}-pc-mks
-	exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-	# How do we know it's Interix rather than the generic POSIX subsystem?
-	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-	# UNAME_MACHINE based on the output of uname instead of i386?
-	echo i586-pc-interix
-	exit ;;
-    i*:UWIN*:*)
-	echo ${UNAME_MACHINE}-pc-uwin
-	exit ;;
-    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
-	echo x86_64-unknown-cygwin
-	exit ;;
-    p*:CYGWIN*:*)
-	echo powerpcle-unknown-cygwin
-	exit ;;
-    prep*:SunOS:5.*:*)
-	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit ;;
-    *:GNU:*:*)
-	# the GNU system
-	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit ;;
-    *:GNU/*:*:*)
-	# other systems with GNU libc and userland
-	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit ;;
-    i*86:Minix:*:*)
-	echo ${UNAME_MACHINE}-pc-minix
-	exit ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit ;;
-    crisv32:Linux:*:*)
-	echo crisv32-axis-linux-gnu
-	exit ;;
-    frv:Linux:*:*)
-    	echo frv-unknown-linux-gnu
-	exit ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m32r*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^CPU/{
-		s: ::g
-		p
-	    }'`"
-	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
-	;;
-    or32:Linux:*:*)
-	echo or32-unknown-linux-gnu
-	exit ;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit ;;
-    alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
-	  EV5)   UNAME_MACHINE=alphaev5 ;;
-	  EV56)  UNAME_MACHINE=alphaev56 ;;
-	  PCA56) UNAME_MACHINE=alphapca56 ;;
-	  PCA57) UNAME_MACHINE=alphapca56 ;;
-	  EV6)   UNAME_MACHINE=alphaev6 ;;
-	  EV67)  UNAME_MACHINE=alphaev67 ;;
-	  EV68*) UNAME_MACHINE=alphaev68 ;;
-        esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
-	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
-	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit ;;
-    parisc:Linux:*:* | hppa:Linux:*:*)
-	# Look for CPU level
-	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
-	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
-	  *)    echo hppa-unknown-linux-gnu ;;
-	esac
-	exit ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit ;;
-    s390:Linux:*:* | s390x:Linux:*:*)
-	echo ${UNAME_MACHINE}-ibm-linux
-	exit ;;
-    sh64*:Linux:*:*)
-    	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sh*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    sparc:Linux:*:* | sparc64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit ;;
-    vax:Linux:*:*)
-	echo ${UNAME_MACHINE}-dec-linux-gnu
-	exit ;;
-    x86_64:Linux:*:*)
-	echo x86_64-unknown-linux-gnu
-	exit ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
-	    /^LIBC/{
-		s: ::g
-		p
-	    }'`"
-	test x"${LIBC}" != x && {
-		echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
-		exit
-	}
-	test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
-	;;
-    i*86:DYNIX/ptx:4*:*)
-	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
-	# earlier versions are messed up and put the nodename in both
-	# sysname and nodename.
-	echo i386-sequent-sysv4
-	exit ;;
-    i*86:UNIX_SV:4.2MP:2.*)
-        # Unixware is an offshoot of SVR4, but it has its own version
-        # number series starting with 2...
-        # I am not positive that other SVR4 systems won't match this,
-	# I just have to hope.  -- rms.
-        # Use sysv4.2uw... so that sysv4* matches it.
-	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit ;;
-    i*86:OS/2:*:*)
-	# If we were able to find `uname', then EMX Unix compatibility
-	# is probably installed.
-	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit ;;
-    i*86:XTS-300:*:STOP)
-	echo ${UNAME_MACHINE}-unknown-stop
-	exit ;;
-    i*86:atheos:*:*)
-	echo ${UNAME_MACHINE}-unknown-atheos
-	exit ;;
-    i*86:syllable:*:*)
-	echo ${UNAME_MACHINE}-pc-syllable
-	exit ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
-	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    i*86:*DOS:*:*)
-	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
-	else
-		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
-	fi
-	exit ;;
-    i*86:*:5:[678]*)
-    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
-	case `/bin/uname -X | grep "^Machine"` in
-	    *486*)	     UNAME_MACHINE=i486 ;;
-	    *Pentium)	     UNAME_MACHINE=i586 ;;
-	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
-	esac
-	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit ;;
-    i*86:*:3.2:*)
-	if test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
-	elif /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
-		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
-			&& UNAME_MACHINE=i586
-		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
-			&& UNAME_MACHINE=i686
-		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-pc-sysv32
-	fi
-	exit ;;
-    pc:*:*:*)
-	# Left here for compatibility:
-        # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit ;;
-    Intel:Mach:3*:*)
-	echo i386-pc-mach3
-	exit ;;
-    paragon:*:*:*)
-	echo i860-intel-osf1
-	exit ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit ;;
-    mc68k:UNIX:SYSTEM5:3.51m)
-	echo m68k-convergent-sysv
-	exit ;;
-    M680?0:D-NIX:5.3:*)
-	echo m68k-diab-dnix
-	exit ;;
-    M68*:*:R3V[5678]*:*)
-	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
-	OS_REL=''
-	test -r /etc/.relid \
-	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
-	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
-	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && { echo i486-ncr-sysv4; exit; } ;;
-    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit ;;
-    TSUNAMI:LynxOS:2.*:*)
-	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    rs6000:LynxOS:2.*:*)
-	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
-	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit ;;
-    SM[BE]S:UNIX_SV:*:*)
-	echo mips-dde-sysv${UNAME_RELEASE}
-	exit ;;
-    RM*:ReliantUNIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit ;;
-    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
-                      # says <Richard.M.Bartel@ccMail.Census.GOV>
-        echo i586-unisys-sysv4
-        exit ;;
-    *:UNIX_System_V:4*:FTX*)
-	# From Gerald Hewes <hewes@openmarket.com>.
-	# How about differentiating between stratus architectures? -djm
-	echo hppa1.1-stratus-sysv4
-	exit ;;
-    *:*:*:FTX*)
-	# From seanf@swdc.stratus.com.
-	echo i860-stratus-sysv4
-	exit ;;
-    i*86:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo ${UNAME_MACHINE}-stratus-vos
-	exit ;;
-    *:VOS:*:*)
-	# From Paul.Green@stratus.com.
-	echo hppa1.1-stratus-vos
-	exit ;;
-    mc68*:A/UX:*:*)
-	echo m68k-apple-aux${UNAME_RELEASE}
-	exit ;;
-    news*:NEWS-OS:6*:*)
-	echo mips-sony-newsos6
-	exit ;;
-    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
-	if [ -d /usr/nec ]; then
-	        echo mips-nec-sysv${UNAME_RELEASE}
-	else
-	        echo mips-unknown-sysv${UNAME_RELEASE}
-	fi
-        exit ;;
-    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
-	echo powerpc-be-beos
-	exit ;;
-    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
-	echo powerpc-apple-beos
-	exit ;;
-    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
-	echo i586-pc-beos
-	exit ;;
-    SX-4:SUPER-UX:*:*)
-	echo sx4-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-5:SUPER-UX:*:*)
-	echo sx5-nec-superux${UNAME_RELEASE}
-	exit ;;
-    SX-6:SUPER-UX:*:*)
-	echo sx6-nec-superux${UNAME_RELEASE}
-	exit ;;
-    Power*:Rhapsody:*:*)
-	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Rhapsody:*:*)
-	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit ;;
-    *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	case $UNAME_PROCESSOR in
-	    unknown) UNAME_PROCESSOR=powerpc ;;
-	esac
-	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit ;;
-    *:procnto*:*:* | *:QNX:[0123456789]*:*)
-	UNAME_PROCESSOR=`uname -p`
-	if test "$UNAME_PROCESSOR" = "x86"; then
-		UNAME_PROCESSOR=i386
-		UNAME_MACHINE=pc
-	fi
-	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit ;;
-    *:QNX:*:4*)
-	echo i386-pc-qnx
-	exit ;;
-    NSE-?:NONSTOP_KERNEL:*:*)
-	echo nse-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit ;;
-    *:NonStop-UX:*:*)
-	echo mips-compaq-nonstopux
-	exit ;;
-    BS2000:POSIX*:*:*)
-	echo bs2000-siemens-sysv
-	exit ;;
-    DS/*:UNIX_System_V:*:*)
-	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit ;;
-    *:Plan9:*:*)
-	# "uname -m" is not consistent, so use $cputype instead. 386
-	# is converted to i386 for consistency with other x86
-	# operating systems.
-	if test "$cputype" = "386"; then
-	    UNAME_MACHINE=i386
-	else
-	    UNAME_MACHINE="$cputype"
-	fi
-	echo ${UNAME_MACHINE}-unknown-plan9
-	exit ;;
-    *:TOPS-10:*:*)
-	echo pdp10-unknown-tops10
-	exit ;;
-    *:TENEX:*:*)
-	echo pdp10-unknown-tenex
-	exit ;;
-    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
-	echo pdp10-dec-tops20
-	exit ;;
-    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
-	echo pdp10-xkl-tops20
-	exit ;;
-    *:TOPS-20:*:*)
-	echo pdp10-unknown-tops20
-	exit ;;
-    *:ITS:*:*)
-	echo pdp10-unknown-its
-	exit ;;
-    SEI:*:*:SEIUX)
-        echo mips-sei-seiux${UNAME_RELEASE}
-	exit ;;
-    *:DragonFly:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit ;;
-    *:*VMS:*:*)
-    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
-	case "${UNAME_MACHINE}" in
-	    A*) echo alpha-dec-vms ; exit ;;
-	    I*) echo ia64-dec-vms ; exit ;;
-	    V*) echo vax-dec-vms ; exit ;;
-	esac ;;
-    *:XENIX:*:SysV)
-	echo i386-pc-xenix
-	exit ;;
-    i*86:skyos:*:*)
-	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
-	exit ;;
-    i*86:rdos:*:*)
-	echo ${UNAME_MACHINE}-pc-rdos
-	exit ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-          "4"
-#else
-	  ""
-#endif
-         ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-	printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-	printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-	{ echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit ;;
-    c34*)
-	echo c34-convex-bsd
-	exit ;;
-    c38*)
-	echo c38-convex-bsd
-	exit ;;
-    c4*)
-	echo c4-convex-bsd
-	exit ;;
-    esac
-fi
-
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
-and
-  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo               = `(hostinfo) 2>/dev/null`
-/bin/universe          = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch              = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
-
-exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/build/autoconf/config.sub b/build/autoconf/config.sub
deleted file mode 100755
index ad9f395..0000000
--- a/build/autoconf/config.sub
+++ /dev/null
@@ -1,1608 +0,0 @@
-#! /bin/sh
-# Configuration validation subroutine script.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
-timestamp='2006-02-23'
-
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can.
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or in some cases, the newer four-part form:
-#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
-       $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
-  -h, --help         print this help, then exit
-  -t, --time-stamp   print date of last modification, then exit
-  -v, --version      print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
-  case $1 in
-    --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
-    --version | -v )
-       echo "$version" ; exit ;;
-    --help | --h* | -h )
-       echo "$usage"; exit ;;
-    -- )     # Stop option processing
-       shift; break ;;
-    - )	# Use stdin as input.
-       break ;;
-    -* )
-       echo "$me: invalid option $1$help"
-       exit 1 ;;
-
-    *local*)
-       # First pass through any local machine types.
-       echo $1
-       exit ;;
-
-    * )
-       break ;;
-  esac
-done
-
-case $# in
- 0) echo "$me: missing argument$help" >&2
-    exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
-    exit 1;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
-  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
-  storm-chaos* | os2-emx* | rtmk-nova*)
-    os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
-    ;;
-  *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
-    else os=; fi
-    ;;
-esac
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis | -knuth | -cray)
-		os=
-		basic_machine=$1
-		;;
-	-sim | -cisco | -oki | -wec | -winbond)
-		os=
-		basic_machine=$1
-		;;
-	-scout)
-		;;
-	-wrs)
-		os=-vxworks
-		basic_machine=$1
-		;;
-	-chorusos*)
-		os=-chorusos
-		basic_machine=$1
-		;;
- 	-chorusrdb)
- 		os=-chorusrdb
-		basic_machine=$1
- 		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco6)
-		os=-sco5v6
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5)
-		os=-sco3.2v5
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco5v6*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-udk*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
-		;;
-	-lynx*)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-	-psos*)
-		os=-psos
-		;;
-	-mint | -mint[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	1750a | 580 \
-	| a29k \
-	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
-	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
-	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
-	| bfin \
-	| c4x | clipper \
-	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
-	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
-	| i370 | i860 | i960 | ia64 \
-	| ip2k | iq2000 \
-	| m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
-	| mips | mipsbe | mipseb | mipsel | mipsle \
-	| mips16 \
-	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
-	| mips64orion | mips64orionel \
-	| mips64vr4100 | mips64vr4100el \
-	| mips64vr4300 | mips64vr4300el \
-	| mips64vr5000 | mips64vr5000el \
-	| mips64vr5900 | mips64vr5900el \
-	| mipsisa32 | mipsisa32el \
-	| mipsisa32r2 | mipsisa32r2el \
-	| mipsisa64 | mipsisa64el \
-	| mipsisa64r2 | mipsisa64r2el \
-	| mipsisa64sb1 | mipsisa64sb1el \
-	| mipsisa64sr71k | mipsisa64sr71kel \
-	| mipstx39 | mipstx39el \
-	| mn10200 | mn10300 \
-	| mt \
-	| msp430 \
-	| nios | nios2 \
-	| ns16k | ns32k \
-	| or32 \
-	| pdp10 | pdp11 | pj | pjl \
-	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
-	| pyramid \
-	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
-	| sh64 | sh64le \
-	| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
-	| sparcv8 | sparcv9 | sparcv9b \
-	| strongarm \
-	| tahoe | thumb | tic4x | tic80 | tron \
-	| v850 | v850e \
-	| we32k \
-	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
-	| z8k)
-		basic_machine=$basic_machine-unknown
-		;;
-	m32c)
-		basic_machine=$basic_machine-unknown
-		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
-		# Motorola 68HC11/12.
-		basic_machine=$basic_machine-unknown
-		os=-none
-		;;
-	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
-		;;
-	ms1)
-		basic_machine=mt-unknown
-		;;
-
-	# We use `pc' rather than `unknown'
-	# because (1) that's what they normally are, and
-	# (2) the word "unknown" tends to confuse beginning users.
-	i*86 | x86_64)
-	  basic_machine=$basic_machine-pc
-	  ;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	580-* \
-	| a29k-* \
-	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
-	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
-	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
-	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bfin-* | bs2000-* \
-	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | craynv-* | cydra-* \
-	| d10v-* | d30v-* | dlx-* \
-	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
-	| h8300-* | h8500-* \
-	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
-	| i*86-* | i860-* | i960-* | ia64-* \
-	| ip2k-* | iq2000-* \
-	| m32r-* | m32rle-* \
-	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | maxq-* | mcore-* \
-	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
-	| mips16-* \
-	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
-	| mips64orion-* | mips64orionel-* \
-	| mips64vr4100-* | mips64vr4100el-* \
-	| mips64vr4300-* | mips64vr4300el-* \
-	| mips64vr5000-* | mips64vr5000el-* \
-	| mips64vr5900-* | mips64vr5900el-* \
-	| mipsisa32-* | mipsisa32el-* \
-	| mipsisa32r2-* | mipsisa32r2el-* \
-	| mipsisa64-* | mipsisa64el-* \
-	| mipsisa64r2-* | mipsisa64r2el-* \
-	| mipsisa64sb1-* | mipsisa64sb1el-* \
-	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
-	| mipstx39-* | mipstx39el-* \
-	| mmix-* \
-	| mt-* \
-	| msp430-* \
-	| nios-* | nios2-* \
-	| none-* | np1-* | ns16k-* | ns32k-* \
-	| orion-* \
-	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
-	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
-	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
-	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
-	| sparclite-* \
-	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
-	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
-	| tron-* \
-	| v850-* | v850e-* | vax-* \
-	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
-	| xstormy16-* | xtensa-* \
-	| ymp-* \
-	| z8k-*)
-		;;
-	m32c-*)
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	386bsd)
-		basic_machine=i386-unknown
-		os=-bsd
-		;;
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	a29khif)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-    	abacus)
-		basic_machine=abacus-unknown
-		;;
-	adobe68k)
-		basic_machine=m68010-adobe
-		os=-scout
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amd64)
-		basic_machine=x86_64-pc
-		;;
-	amd64-*)
-		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-unknown
-		;;
-	amigaos | amigados)
-		basic_machine=m68k-unknown
-		os=-amigaos
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-unknown
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	apollo68bsd)
-		basic_machine=m68k-apollo
-		os=-bsd
-		;;
-	aux)
-		basic_machine=m68k-apple
-		os=-aux
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	c90)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | j90)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	craynv)
-		basic_machine=craynv-cray
-		os=-unicosmp
-		;;
-	cr16c)
-		basic_machine=cr16c-unknown
-		os=-elf
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	crisv32 | crisv32-* | etraxfs*)
-		basic_machine=crisv32-axis
-		;;
-	cris | cris-* | etrax*)
-		basic_machine=cris-axis
-		;;
-	crx)
-		basic_machine=crx-unknown
-		os=-elf
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	decsystem10* | dec10*)
-		basic_machine=pdp10-dec
-		os=-tops10
-		;;
-	decsystem20* | dec20*)
-		basic_machine=pdp10-dec
-		os=-tops20
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	djgpp)
-		basic_machine=i586-pc
-		os=-msdosdjgpp
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	es1800 | OSE68k | ose68k | ose | OSE)
-		basic_machine=m68k-ericsson
-		os=-ose
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	go32)
-		basic_machine=i386-pc
-		os=-go32
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	h8300xray)
-		basic_machine=h8300-hitachi
-		os=-xray
-		;;
-	h8500hms)
-		basic_machine=h8500-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp3k9[0-9][0-9] | hp9[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k6[0-9][0-9] | hp6[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hp9k7[0-79][0-9] | hp7[0-79][0-9])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k78[0-9] | hp78[0-9])
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
-		# FIXME: really hppa2.0-hp
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][13679] | hp8[0-9][13679])
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	hppa-next)
-		os=-nextstep3
-		;;
-	hppaosf)
-		basic_machine=hppa1.1-hp
-		os=-osf
-		;;
-	hppro)
-		basic_machine=hppa1.1-hp
-		os=-proelf
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i*86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv32
-		;;
-	i*86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv4
-		;;
-	i*86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-sysv
-		;;
-	i*86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
-		os=-solaris2
-		;;
-	i386mach)
-		basic_machine=i386-mach
-		os=-mach
-		;;
-	i386-vsta | vsta)
-		basic_machine=i386-unknown
-		os=-vsta
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	mingw32)
-		basic_machine=i386-pc
-		os=-mingw32
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
-		basic_machine=m68k-atari
-		os=-mint
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	monitor)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	morphos)
-		basic_machine=powerpc-unknown
-		os=-morphos
-		;;
-	msdos)
-		basic_machine=i386-pc
-		os=-msdos
-		;;
-	ms1-*)
-		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
-		;;
-	mvs)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	netbsd386)
-		basic_machine=i386-unknown
-		os=-netbsd
-		;;
-	netwinder)
-		basic_machine=armv4l-rebel
-		os=-linux
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	necv70)
-		basic_machine=v70-nec
-		os=-sysv
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	mon960)
-		basic_machine=i960-intel
-		os=-mon960
-		;;
-	nonstopux)
-		basic_machine=mips-compaq
-		os=-nonstopux
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	nsr-tandem)
-		basic_machine=nsr-tandem
-		;;
-	op50n-* | op60c-*)
-		basic_machine=hppa1.1-oki
-		os=-proelf
-		;;
-	openrisc | openrisc-*)
-		basic_machine=or32-unknown
-		;;
-	os400)
-		basic_machine=powerpc-ibm
-		os=-os400
-		;;
-	OSE68000 | ose68000)
-		basic_machine=m68000-ericsson
-		os=-ose
-		;;
-	os68k)
-		basic_machine=m68k-none
-		os=-os68k
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-	pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pc98)
-		basic_machine=i386-pc
-		;;
-	pc98-*)
-		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium | p5 | k5 | k6 | nexgen | viac3)
-		basic_machine=i586-pc
-		;;
-	pentiumpro | p6 | 6x86 | athlon | athlon_*)
-		basic_machine=i686-pc
-		;;
-	pentiumii | pentium2 | pentiumiii | pentium3)
-		basic_machine=i686-pc
-		;;
-	pentium4)
-		basic_machine=i786-pc
-		;;
-	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pentium4-*)
-		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	power)	basic_machine=power-ibm
-		;;
-	ppc)	basic_machine=powerpc-unknown
-		;;
-	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppcle | powerpclittle | ppc-le | powerpc-little)
-		basic_machine=powerpcle-unknown
-		;;
-	ppcle-* | powerpclittle-*)
-		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64)	basic_machine=powerpc64-unknown
-		;;
-	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
-		basic_machine=powerpc64le-unknown
-		;;
-	ppc64le-* | powerpc64little-*)
-		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	pw32)
-		basic_machine=i586-unknown
-		os=-pw32
-		;;
-	rdos)
-		basic_machine=i386-pc
-		os=-rdos
-		;;
-	rom68k)
-		basic_machine=m68k-rom68k
-		os=-coff
-		;;
-	rm[46]00)
-		basic_machine=mips-siemens
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	s390 | s390-*)
-		basic_machine=s390-ibm
-		;;
-	s390x | s390x-*)
-		basic_machine=s390x-ibm
-		;;
-	sa29200)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	sb1)
-		basic_machine=mipsisa64sb1-unknown
-		;;
-	sb1el)
-		basic_machine=mipsisa64sb1el-unknown
-		;;
-	sei)
-		basic_machine=mips-sei
-		os=-seiux
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparclite-wrs | simso-wrs)
-		basic_machine=sparclite-wrs
-		os=-vxworks
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	st2000)
-		basic_machine=m68k-tandem
-		;;
-	stratus)
-		basic_machine=i860-stratus
-		os=-sysv4
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun4sol2)
-		basic_machine=sparc-sun
-		os=-solaris2
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-	sv1)
-		basic_machine=sv1-cray
-		os=-unicos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t3e)
-		basic_machine=alphaev5-cray
-		os=-unicos
-		;;
-	t90)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tic54x | c54x*)
-		basic_machine=tic54x-unknown
-		os=-coff
-		;;
-	tic55x | c55x*)
-		basic_machine=tic55x-unknown
-		os=-coff
-		;;
-	tic6x | c6x*)
-		basic_machine=tic6x-unknown
-		os=-coff
-		;;
-	tx39)
-		basic_machine=mipstx39-unknown
-		;;
-	tx39el)
-		basic_machine=mipstx39el-unknown
-		;;
-	toad1)
-		basic_machine=pdp10-xkl
-		os=-tops20
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	tpf)
-		basic_machine=s390x-ibm
-		os=-tpf
-		;;
-	udi29k)
-		basic_machine=a29k-amd
-		os=-udi
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	v810 | necv810)
-		basic_machine=v810-nec
-		os=-none
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vpp*|vx|vx-*)
-		basic_machine=f301-fujitsu
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	vxworks29k)
-		basic_machine=a29k-wrs
-		os=-vxworks
-		;;
-	w65*)
-		basic_machine=w65-wdc
-		os=-none
-		;;
-	w89k-*)
-		basic_machine=hppa1.1-winbond
-		os=-proelf
-		;;
-	xbox)
-		basic_machine=i686-pc
-		os=-mingw32
-		;;
-	xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	z8k-*-coff)
-		basic_machine=z8k-unknown
-		os=-sim
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	w89k)
-		basic_machine=hppa1.1-winbond
-		;;
-	op50n)
-		basic_machine=hppa1.1-oki
-		;;
-	op60c)
-		basic_machine=hppa1.1-oki
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	mmix)
-		basic_machine=mmix-knuth
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp10)
-		# there are many clones, so DEC is not a safe bet
-		basic_machine=pdp10-unknown
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
-		basic_machine=sh-unknown
-		;;
-	sparc | sparcv8 | sparcv9 | sparcv9b)
-		basic_machine=sparc-sun
-		;;
-	cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	mac | mpw | mac-mpw)
-		basic_machine=m68k-apple
-		;;
-	pmac | pmac-mpw)
-		basic_machine=powerpc-apple
-		;;
-	*-unknown)
-		# Make sure to match an already-canonicalized machine name.
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-        # First match some system type aliases
-        # that might get confused with valid system types.
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-svr4*)
-		os=-sysv4
-		;;
-	-unixware*)
-		os=-sysv4.2uw
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative MUST END IN A *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
-	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
-	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
-	      | -openbsd* | -solidbsd* \
-	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
-	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
-	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
-	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
-	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
-	      | -uxpv* | -beos* | -mpeix* | -udk* \
-	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
-	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
-	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-	      | -skyos* | -haiku* | -rdos*)
-	# Remember, each alternative MUST END IN *, to match a version number.
-		;;
-	-qnx*)
-		case $basic_machine in
-		    x86-* | i*86-*)
-			;;
-		    *)
-			os=-nto$os
-			;;
-		esac
-		;;
-	-nto-qnx*)
-		;;
-	-nto*)
-		os=`echo $os | sed -e 's|nto|nto-qnx|'`
-		;;
-	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
-	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
-		;;
-	-mac*)
-		os=`echo $os | sed -e 's|mac|macos|'`
-		;;
-	-linux-dietlibc)
-		os=-linux-dietlibc
-		;;
-	-linux*)
-		os=`echo $os | sed -e 's|linux|linux-gnu|'`
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-opened*)
-		os=-openedition
-		;;
-        -os400*)
-		os=-os400
-		;;
-	-wince*)
-		os=-wince
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-atheos*)
-		os=-atheos
-		;;
-	-syllable*)
-		os=-syllable
-		;;
-	-386bsd)
-		os=-bsd
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-nova*)
-		os=-rtmk-nova
-		;;
-	-ns2 )
-		os=-nextstep2
-		;;
-	-nsk*)
-		os=-nsk
-		;;
-	# Preserve the version number of sinix5.
-	-sinix5.*)
-		os=`echo $os | sed -e 's|sinix|sysv|'`
-		;;
-	-sinix*)
-		os=-sysv4
-		;;
-        -tpf*)
-		os=-tpf
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-ose*)
-		os=-ose
-		;;
-	-es1800*)
-		os=-ose
-		;;
-	-xenix)
-		os=-xenix
-		;;
-	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-		os=-mint
-		;;
-	-aros*)
-		os=-aros
-		;;
-	-kaos*)
-		os=-kaos
-		;;
-	-zvmoe)
-		os=-zvmoe
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-	arm*-rebel)
-		os=-linux
-		;;
-	arm*-semi)
-		os=-aout
-		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
-	# This must come before the *-dec entry.
-	pdp10-*)
-		os=-tops20
-		;;
-	pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	m68*-apollo)
-		os=-domain
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	m68*-cisco)
-		os=-aout
-		;;
-	mips*-cisco)
-		os=-elf
-		;;
-	mips*-*)
-		os=-elf
-		;;
-	or32-*)
-		os=-coff
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-be)
-		os=-beos
-		;;
-	*-haiku)
-		os=-haiku
-		;;
-	*-ibm)
-		os=-aix
-		;;
-    	*-knuth)
-		os=-mmixware
-		;;
-	*-wec)
-		os=-proelf
-		;;
-	*-winbond)
-		os=-proelf
-		;;
-	*-oki)
-		os=-proelf
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigaos
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-next )
-		os=-nextstep
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-	*-gould)
-		os=-sysv
-		;;
-	*-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-	*-sgi)
-		os=-irix
-		;;
-	*-siemens)
-		os=-sysv4
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	f30[01]-fujitsu | f700-fujitsu)
-		os=-uxpv
-		;;
-	*-rom68k)
-		os=-coff
-		;;
-	*-*bug)
-		os=-coff
-		;;
-	*-apple)
-		os=-macos
-		;;
-	*-atari*)
-		os=-mint
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-beos*)
-				vendor=be
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-mpeix*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs* | -opened*)
-				vendor=ibm
-				;;
-			-os400*)
-				vendor=ibm
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-			-tpf*)
-				vendor=ibm
-				;;
-			-vxsim* | -vxworks* | -windiss*)
-				vendor=wrs
-				;;
-			-aux*)
-				vendor=apple
-				;;
-			-hms*)
-				vendor=hitachi
-				;;
-			-mpw* | -macos*)
-				vendor=apple
-				;;
-			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
-				vendor=atari
-				;;
-			-vos*)
-				vendor=stratus
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/build/autoconf/configure.ac b/build/autoconf/configure.ac
deleted file mode 100644
index 85ddd2a..0000000
--- a/build/autoconf/configure.ac
+++ /dev/null
@@ -1,82 +0,0 @@
-# ======================================================================================
-# Author: Francesco Montorsi
-# RCS-ID: $Id: configure.ac 634 2012-12-22 10:34:32Z ibg $
-# ======================================================================================
-
-
-# NOTE:
-#  the version of the project must be updated also in docs/Doxyfile !
-AC_INIT([muparser], [2.2.4], [muparser@beltoforion.de])
-
-AC_PREREQ([2.57])
-AC_CONFIG_AUX_DIR([build/autoconf])
-AC_LANG(C++)
-
-# some helpers
-m4_include(bakefile-presets.m4)
-
-
-
-## CONFIGURE CHECKS
-#####################################################################
-
-dnl This allows us to use Bakefile, recognizing the system type
-dnl (and sets the AC_CANONICAL_BUILD, AC_CANONICAL_HOST and
-dnl AC_CANONICAL_TARGET variables)
-AC_CANONICAL_SYSTEM
-
-# We want to inhibit AC_PROG_C* macros adding the default "-g -O2" flags.
-# To do so, make sure that the variables are not unset - it is ok if they are
-# empty. However, their value MUST be retained, since one may have
-# called ./configure CFLAGS=-foobar.
-CFLAGS="$CFLAGS"
-CPPFLAGS="$CPPFLAGS"
-CXXFLAGS="$CXXFLAGS"
-
-dnl Checks for basic programs used to compile/install.
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_LN_S
-AC_PROG_RANLIB
-AC_PROG_CC
-AC_PROG_CXX
-AC_PROG_CXXCPP
-
-
-AC_BAKEFILE_DEBUGOPT([no])
-AC_BAKEFILE_SHAREDOPT([yes])
-
-AC_ARG_ENABLE([samples],
-            AC_HELP_STRING([--enable-samples], [Builds the library samples, too]),
-            [], [enableval="yes"])
-AC_BAKEFILE_YESNO_OPTCHECK([SAMPLES], [enableval], [--enable-samples])
-
-dnl Create the output folders in the current build directory
-dnl (this handles cases like:
-dnl      mkdir mybuild && cd mybuild && ../configure && make  )
-AS_MKDIR_P(lib)
-AS_MKDIR_P(samples/example1)
-
-AC_BAKEFILE([m4_include(autoconf_inc.m4)])
-AC_CONFIG_FILES([Makefile build/autoconf/muparser.pc])
-AC_OUTPUT
-
-
-
-## CONFIGURE END MESSAGE
-#####################################################################
-
-echo
-echo " ----------------------------------------------------------------"
-echo "  Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."
-echo "  Summary of main configuration settings for $PACKAGE_NAME:"
-AC_BAKEFILE_SHOW_SHAREDOPT
-AC_BAKEFILE_SHOW_DEBUGOPT
-if [[ "$SAMPLES" = "1" ]]; then
-    echo "  - SAMPLES enabled"
-else
-    echo "  - SAMPLES disabled"
-fi
-echo "  Now, just run make."
-echo " ----------------------------------------------------------------"
-echo
diff --git a/build/autoconf/install-sh b/build/autoconf/install-sh
deleted file mode 100755
index 1b3f51d..0000000
--- a/build/autoconf/install-sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-
diff --git a/build/autoconf/muparser.pc.in b/build/autoconf/muparser.pc.in
deleted file mode 100644
index 4c16a24..0000000
--- a/build/autoconf/muparser.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: @PACKAGE_NAME@
-Description: Mathematical expressions parser library
-Version: @PACKAGE_VERSION@
-Requires:
-Libs: -L${libdir} -lmuparser
-Cflags: -I${includedir}
diff --git a/configure b/configure
deleted file mode 100755
index 0cde878..0000000
--- a/configure
+++ /dev/null
@@ -1,8354 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for muparser 2.2.4.
-#
-# Report bugs to <muparser@beltoforion.de>.
-#
-#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-#
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# Use a proper internal environment variable to ensure we don't fall
-  # into an infinite loop, continuously re-executing ourselves.
-  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
-    _as_can_reexec=no; export _as_can_reexec;
-    # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
-  fi
-  # We don't want this to propagate to other subprocesses.
-          { _as_can_reexec=; unset _as_can_reexec;}
-if test "x$CONFIG_SHELL" = x; then
-  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-"
-  as_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
-  exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
-  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
-  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
-  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
-  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
-  if (eval "$as_required") 2>/dev/null; then :
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  as_found=:
-  case $as_dir in #(
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     # Try only shells that exist, to save several forks.
-	     as_shell=$as_dir/$as_base
-	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  CONFIG_SHELL=$as_shell as_have_required=yes
-		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
-  break 2
-fi
-fi
-	   done;;
-       esac
-  as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
-	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
-  CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
-      if test "x$CONFIG_SHELL" != x; then :
-  export CONFIG_SHELL
-             # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
-  *v*x* | *x*v* ) as_opts=-vx ;;
-  *v* ) as_opts=-v ;;
-  *x* ) as_opts=-x ;;
-  * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
-fi
-
-    if test x$as_have_required = xno; then :
-  $as_echo "$0: This script requires a shell more modern than all"
-  $as_echo "$0: the shells that I found on your system."
-  if test x${ZSH_VERSION+set} = xset ; then
-    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
-    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
-  else
-    $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: muparser@beltoforion.de about your system, including
-$0: any error possibly output before this message. Then
-$0: install a modern shell, or manually run the script
-$0: under such a shell if you do have one."
-  fi
-  exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-
-  as_lineno_1=$LINENO as_lineno_1a=$LINENO
-  as_lineno_2=$LINENO as_lineno_2a=$LINENO
-  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
-  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
-  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
-
-  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
-  # already done that, so ensure we don't try to do so again and fall
-  # in an infinite loop.  This has already happened in practice.
-  _as_can_reexec=no; export _as_can_reexec
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 6>&1
-
-# Name of the host.
-# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
-# so uname gets run too.
-ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-
-#
-# Initializations.
-#
-ac_default_prefix=/usr/local
-ac_clean_files=
-ac_config_libobj_dir=.
-LIBOBJS=
-cross_compiling=no
-subdirs=
-MFLAGS=
-MAKEFLAGS=
-
-# Identity of this package.
-PACKAGE_NAME='muparser'
-PACKAGE_TARNAME='muparser'
-PACKAGE_VERSION='2.2.4'
-PACKAGE_STRING='muparser 2.2.4'
-PACKAGE_BUGREPORT='muparser@beltoforion.de'
-PACKAGE_URL=''
-
-ac_subst_vars='LTLIBOBJS
-LIBOBJS
-COND_WINDOWS_IMPLIB_1
-COND_USE_SOVERSOLARIS_1
-COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1
-COND_USE_SOVERSION_0
-COND_USE_SOVERLINUX_1
-COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1
-COND_USE_SOTWOSYMLINKS_1
-COND_SHARED_1
-COND_SHARED_0
-COND_SAMPLES_1
-COND_PLATFORM_OS2_1
-COND_PLATFORM_MAC_1
-COND_PLATFORM_MAC_0
-COND_PLATFORM_MACOSX_1_USE_SOVERSION_1
-COND_PLATFORM_MACOSX_1
-COND_PLATFORM_MACOSX_0_USE_SOVERSION_1
-COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1
-COND_DEPS_TRACKING_1
-COND_DEPS_TRACKING_0
-COND_DEBUG_1
-COND_DEBUG_0
-OBJCXXFLAGS
-SETFILE
-REZ
-WINDRES
-BK_DEPS
-DEPS_TRACKING
-SONAME_FLAG
-USE_SOTWOSYMLINKS
-USE_MACVERSION
-USE_SOVERCYGWIN
-USE_SOVERSOLARIS
-USE_SOVERLINUX
-USE_SOVERSION
-WINDOWS_IMPLIB
-PIC_FLAG
-SHARED_LD_MODULE_CXX
-SHARED_LD_MODULE_CC
-SHARED_LD_CXX
-SHARED_LD_CC
-AIX_CXX_LD
-dlldir
-DLLPREFIX_MODULE
-DLLPREFIX
-LIBEXT
-LIBPREFIX
-DLLIMP_SUFFIX
-SO_SUFFIX_MODULE
-SO_SUFFIX
-PLATFORM_BEOS
-PLATFORM_OS2
-PLATFORM_MACOSX
-PLATFORM_MACOS
-PLATFORM_MAC
-PLATFORM_MSDOS
-PLATFORM_WIN32
-PLATFORM_UNIX
-IF_GNU_MAKE
-LDFLAGS_GUI
-INSTALL_DIR
-NM
-STRIP
-AROPTIONS
-AR
-MAKE_SET
-SET_MAKE
-CXXCPP
-ac_ct_CXX
-CXXFLAGS
-CXX
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-RANLIB
-LN_S
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-AWK
-target_os
-target_vendor
-target_cpu
-target
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-target_alias
-host_alias
-build_alias
-LIBS
-ECHO_T
-ECHO_N
-ECHO_C
-DEFS
-mandir
-localedir
-libdir
-psdir
-pdfdir
-dvidir
-htmldir
-infodir
-docdir
-oldincludedir
-includedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_debug
-enable_shared
-enable_samples
-enable_omf
-enable_dependency_tracking
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CXX
-CXXFLAGS
-CCC
-CXXCPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures muparser 2.2.4 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/muparser]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of muparser 2.2.4:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --enable-debug          Builds in debug mode
-  --enable-shared         Builds in shared mode
-  --enable-samples        Builds the library samples, too
-  --enable-omf            use OMF object format (OS/2)
-  --disable-dependency-tracking
-                          don't use dependency tracking even if the compiler
-                          can
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CXX         C++ compiler command
-  CXXFLAGS    C++ compiler flags
-  CXXCPP      C++ preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <muparser@beltoforion.de>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-muparser configure 2.2.4
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_cxx_try_compile LINENO
-# ----------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_compile
-
-# ac_fn_cxx_try_cpp LINENO
-# ------------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_cxx_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_cxx_try_cpp
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by muparser $as_me 2.2.4, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-ac_aux_dir=
-for ac_dir in build/autoconf "$srcdir"/build/autoconf; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build/autoconf \"$srcdir\"/build/autoconf" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-# some helpers
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-## CONFIGURE CHECKS
-#####################################################################
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if ${ac_cv_target+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-
-# We want to inhibit AC_PROG_C* macros adding the default "-g -O2" flags.
-# To do so, make sure that the variables are not unset - it is ok if they are
-# empty. However, their value MUST be retained, since one may have
-# called ./configure CFLAGS=-foobar.
-CFLAGS="$CFLAGS"
-CPPFLAGS="$CPPFLAGS"
-CXXFLAGS="$CXXFLAGS"
-
-for ac_prog in gawk mawk nawk awk
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AWK+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AWK"; then
-  ac_cv_prog_AWK="$AWK" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AWK="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$AWK" && break
-done
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-# Reject install programs that cannot install multiple files.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
-$as_echo_n "checking for a BSD-compatible install... " >&6; }
-if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in #((
-  ./ | .// | /[cC]/* | \
-  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
-  /usr/ucb/* ) ;;
-  *)
-    # OSF1 and SCO ODT 3.0 have their own names for install.
-    # Don't use installbsd from OSF since it installs stuff as root
-    # by default.
-    for ac_prog in ginstall scoinst install; do
-      for ac_exec_ext in '' $ac_executable_extensions; do
-	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
-	  if test $ac_prog = install &&
-	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    :
-	  elif test $ac_prog = install &&
-	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
-	    # program-specific install script used by HP pwplus--don't use.
-	    :
-	  else
-	    rm -rf conftest.one conftest.two conftest.dir
-	    echo one > conftest.one
-	    echo two > conftest.two
-	    mkdir conftest.dir
-	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
-	      test -s conftest.one && test -s conftest.two &&
-	      test -s conftest.dir/conftest.one &&
-	      test -s conftest.dir/conftest.two
-	    then
-	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	      break 3
-	    fi
-	  fi
-	fi
-      done
-    done
-    ;;
-esac
-
-  done
-IFS=$as_save_IFS
-
-rm -rf conftest.one conftest.two conftest.dir
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL=$ac_cv_path_install
-  else
-    # As a last resort, use the slow shell script.  Don't cache a
-    # value for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the value is a relative name.
-    INSTALL=$ac_install_sh
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
-$as_echo "$INSTALL" >&6; }
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -z "$CXX"; then
-  if test -n "$CCC"; then
-    CXX=$CCC
-  else
-    if test -n "$ac_tool_prefix"; then
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CXX=$ac_cv_prog_CXX
-if test -n "$CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
-$as_echo "$CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CXX" && break
-  done
-fi
-if test -z "$CXX"; then
-  ac_ct_CXX=$CXX
-  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CXX"; then
-  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CXX="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
-if test -n "$ac_ct_CXX"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
-$as_echo "$ac_ct_CXX" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CXX" && break
-done
-
-  if test "x$ac_ct_CXX" = x; then
-    CXX="g++"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CXX=$ac_ct_CXX
-  fi
-fi
-
-  fi
-fi
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
-$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if ${ac_cv_cxx_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
-$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GXX=yes
-else
-  GXX=
-fi
-ac_test_CXXFLAGS=${CXXFLAGS+set}
-ac_save_CXXFLAGS=$CXXFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
-$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if ${ac_cv_prog_cxx_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
-   ac_cxx_werror_flag=yes
-   ac_cv_prog_cxx_g=no
-   CXXFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-else
-  CXXFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
-  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-	 CXXFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cxx_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
-$as_echo "$ac_cv_prog_cxx_g" >&6; }
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
-if test -z "$CXXCPP"; then
-  if ${ac_cv_prog_CXXCPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
-
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
-$as_echo "$CXXCPP" >&6; }
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_cxx_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-    default="no"
-    if [ -z "$default" ]; then
-        default="no"
-    fi
-
-    # Check whether --enable-debug was given.
-if test "${enable_debug+set}" = set; then :
-  enableval=$enable_debug;
-else
-  enableval="$default"
-fi
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the --enable-debug option" >&5
-$as_echo_n "checking for the --enable-debug option... " >&6; }
-    if [ "x$enableval" = "xyes" ]; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        DEBUG=1
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        DEBUG=0
-    fi
-
-
-        if [ "x$DEBUG" = "x1" ]; then
-
-                                                my_CXXFLAGS="$my_CXXFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy"
-        my_CFLAGS="$my_CFLAGS -g -O0 -Wall -Wundef"
-    else
-        my_CXXFLAGS="$my_CXXFLAGS -O2"
-        my_CFLAGS="$my_CFLAGS -O2"
-    fi
-    # User-supplied CXXFLAGS must always take precedence.
-    # This still sucks because using `make CFLAGS=-foobar` kills
-    # the project-supplied flags again.
-    CXXFLAGS="$my_CXXFLAGS $CXXFLAGS"
-    CFLAGS="$my_CFLAGS $CFLAGS"
-
-
-    default="yes"
-    if [ -z "$default" ]; then
-        default="no"
-    fi
-
-    # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
-  enableval=$enable_shared;
-else
-  enableval="$default"
-fi
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the --enable-shared option" >&5
-$as_echo_n "checking for the --enable-shared option... " >&6; }
-    if [ "x$enableval" = "xyes" ]; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        SHARED=1
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        SHARED=0
-    fi
-
-
-
-# Check whether --enable-samples was given.
-if test "${enable_samples+set}" = set; then :
-  enableval=$enable_samples;
-else
-  enableval="yes"
-fi
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the --enable-samples option" >&5
-$as_echo_n "checking for the --enable-samples option... " >&6; }
-    if [ "x$enableval" = "xyes" ]; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-        SAMPLES=1
-    else
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-        SAMPLES=0
-    fi
-
-
-as_dir=lib; as_fn_mkdir_p
-as_dir=samples/example1; as_fn_mkdir_p
-
-
-
-
-
-
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Intel C compiler" >&5
-$as_echo_n "checking whether we are using the Intel C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___INTEL_COMPILER+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __INTEL_COMPILER
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___INTEL_COMPILER=yes
-else
-  bakefile_cv_c_compiler___INTEL_COMPILER=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___INTEL_COMPILER" >&5
-$as_echo "$bakefile_cv_c_compiler___INTEL_COMPILER" >&6; }
-    if test "x$bakefile_cv_c_compiler___INTEL_COMPILER" = "xyes"; then
-        :; INTELCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-        if test "$INTELCC" = "yes"; then
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C compiler v8 or later" >&5
-$as_echo_n "checking whether we are using Intel C compiler v8 or later... " >&6; }
-if ${bakefile_cv_c_compiler___INTEL_COMPILER_lt_800+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __INTEL_COMPILER || __INTEL_COMPILER < 800
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___INTEL_COMPILER_lt_800=yes
-else
-  bakefile_cv_c_compiler___INTEL_COMPILER_lt_800=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___INTEL_COMPILER_lt_800" >&5
-$as_echo "$bakefile_cv_c_compiler___INTEL_COMPILER_lt_800" >&6; }
-    if test "x$bakefile_cv_c_compiler___INTEL_COMPILER_lt_800" = "xyes"; then
-        :; INTELCC8=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C compiler v10 or later" >&5
-$as_echo_n "checking whether we are using Intel C compiler v10 or later... " >&6; }
-if ${bakefile_cv_c_compiler___INTEL_COMPILER_lt_1000+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __INTEL_COMPILER || __INTEL_COMPILER < 1000
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___INTEL_COMPILER_lt_1000=yes
-else
-  bakefile_cv_c_compiler___INTEL_COMPILER_lt_1000=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___INTEL_COMPILER_lt_1000" >&5
-$as_echo "$bakefile_cv_c_compiler___INTEL_COMPILER_lt_1000" >&6; }
-    if test "x$bakefile_cv_c_compiler___INTEL_COMPILER_lt_1000" = "xyes"; then
-        :; INTELCC10=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-    fi
-
-        if test "x$GCC" != "xyes"; then
-        if test "xCC" = "xC"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler requires -ext o" >&5
-$as_echo_n "checking if the C++ compiler requires -ext o... " >&6; }
-if ${bakefile_cv_cxx_exto+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest.$ac_ext.o
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in `(ls conftest.* 2>/dev/null)`; do
-    case $ac_file in
-        conftest.$ac_ext.o)
-            bakefile_cv_cxx_exto="-ext o"
-            ;;
-        *)
-            ;;
-    esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot figure out if compiler needs -ext o: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-
-fi
-rm -f conftest.$ac_ext.o conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_exto" >&5
-$as_echo "$bakefile_cv_cxx_exto" >&6; }
-if test "x$bakefile_cv_cxx_exto" '!=' "x"; then
-    if test "cxx" = "c"; then
-        CFLAGS="$bakefile_cv_cxx_exto $CFLAGS"
-    fi
-    if test "cxx" = "cxx"; then
-        CXXFLAGS="$bakefile_cv_cxx_exto $CXXFLAGS"
-    fi
-fi
-
-            if test "x$bakefile_cv_c_exto" '!=' "x"; then
-                unset ac_cv_prog_cc_g
-                ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-            fi
-        fi
-
-                        case `uname -s` in
-            AIX*)
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the IBM xlC C compiler" >&5
-$as_echo_n "checking whether we are using the IBM xlC C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___xlC__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __xlC__
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___xlC__=yes
-else
-  bakefile_cv_c_compiler___xlC__=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___xlC__" >&5
-$as_echo "$bakefile_cv_c_compiler___xlC__" >&6; }
-    if test "x$bakefile_cv_c_compiler___xlC__" = "xyes"; then
-        :; XLCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            Darwin)
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Metrowerks C compiler" >&5
-$as_echo_n "checking whether we are using the Metrowerks C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___MWERKS__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __MWERKS__
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___MWERKS__=yes
-else
-  bakefile_cv_c_compiler___MWERKS__=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___MWERKS__" >&5
-$as_echo "$bakefile_cv_c_compiler___MWERKS__" >&6; }
-    if test "x$bakefile_cv_c_compiler___MWERKS__" = "xyes"; then
-        :; MWCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                if test "$MWCC" != "yes"; then
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the IBM xlC C compiler" >&5
-$as_echo_n "checking whether we are using the IBM xlC C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___xlC__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __xlC__
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___xlC__=yes
-else
-  bakefile_cv_c_compiler___xlC__=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___xlC__" >&5
-$as_echo "$bakefile_cv_c_compiler___xlC__" >&6; }
-    if test "x$bakefile_cv_c_compiler___xlC__" = "xyes"; then
-        :; XLCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                fi
-                ;;
-
-            IRIX*)
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the SGI C compiler" >&5
-$as_echo_n "checking whether we are using the SGI C compiler... " >&6; }
-if ${bakefile_cv_c_compiler__SGI_COMPILER_VERSION+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef _SGI_COMPILER_VERSION
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler__SGI_COMPILER_VERSION=yes
-else
-  bakefile_cv_c_compiler__SGI_COMPILER_VERSION=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler__SGI_COMPILER_VERSION" >&5
-$as_echo "$bakefile_cv_c_compiler__SGI_COMPILER_VERSION" >&6; }
-    if test "x$bakefile_cv_c_compiler__SGI_COMPILER_VERSION" = "xyes"; then
-        :; SGICC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            Linux*)
-                                                if test "$INTELCC" != "yes"; then
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Sun C compiler" >&5
-$as_echo_n "checking whether we are using the Sun C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___SUNPRO_C+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __SUNPRO_C
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___SUNPRO_C=yes
-else
-  bakefile_cv_c_compiler___SUNPRO_C=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___SUNPRO_C" >&5
-$as_echo "$bakefile_cv_c_compiler___SUNPRO_C" >&6; }
-    if test "x$bakefile_cv_c_compiler___SUNPRO_C" = "xyes"; then
-        :; SUNCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                fi
-                ;;
-
-            HP-UX*)
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the HP C compiler" >&5
-$as_echo_n "checking whether we are using the HP C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___HP_cc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __HP_cc
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___HP_cc=yes
-else
-  bakefile_cv_c_compiler___HP_cc=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___HP_cc" >&5
-$as_echo "$bakefile_cv_c_compiler___HP_cc" >&6; }
-    if test "x$bakefile_cv_c_compiler___HP_cc" = "xyes"; then
-        :; HPCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            OSF1)
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Compaq C compiler" >&5
-$as_echo_n "checking whether we are using the Compaq C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___DECC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __DECC
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___DECC=yes
-else
-  bakefile_cv_c_compiler___DECC=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___DECC" >&5
-$as_echo "$bakefile_cv_c_compiler___DECC" >&6; }
-    if test "x$bakefile_cv_c_compiler___DECC" = "xyes"; then
-        :; COMPAQCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            SunOS)
-
-
-    ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Sun C compiler" >&5
-$as_echo_n "checking whether we are using the Sun C compiler... " >&6; }
-if ${bakefile_cv_c_compiler___SUNPRO_C+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __SUNPRO_C
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  bakefile_cv_c_compiler___SUNPRO_C=yes
-else
-  bakefile_cv_c_compiler___SUNPRO_C=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_c_compiler___SUNPRO_C" >&5
-$as_echo "$bakefile_cv_c_compiler___SUNPRO_C" >&6; }
-    if test "x$bakefile_cv_c_compiler___SUNPRO_C" = "xyes"; then
-        :; SUNCC=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-        esac
-    fi
-
-
-
-
-
-
-
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Intel C++ compiler" >&5
-$as_echo_n "checking whether we are using the Intel C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___INTEL_COMPILER+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __INTEL_COMPILER
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___INTEL_COMPILER=yes
-else
-  bakefile_cv_cxx_compiler___INTEL_COMPILER=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___INTEL_COMPILER" >&5
-$as_echo "$bakefile_cv_cxx_compiler___INTEL_COMPILER" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___INTEL_COMPILER" = "xyes"; then
-        :; INTELCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-        if test "$INTELCXX" = "yes"; then
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C++ compiler v8 or later" >&5
-$as_echo_n "checking whether we are using Intel C++ compiler v8 or later... " >&6; }
-if ${bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_800+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __INTEL_COMPILER || __INTEL_COMPILER < 800
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_800=yes
-else
-  bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_800=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_800" >&5
-$as_echo "$bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_800" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_800" = "xyes"; then
-        :; INTELCXX8=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C++ compiler v10 or later" >&5
-$as_echo_n "checking whether we are using Intel C++ compiler v10 or later... " >&6; }
-if ${bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_1000+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __INTEL_COMPILER || __INTEL_COMPILER < 1000
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_1000=yes
-else
-  bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_1000=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_1000" >&5
-$as_echo "$bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_1000" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___INTEL_COMPILER_lt_1000" = "xyes"; then
-        :; INTELCXX10=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-    fi
-
-        if test "x$GCXX" != "xyes"; then
-        if test "xCXX" = "xC"; then
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler requires -ext o" >&5
-$as_echo_n "checking if the C++ compiler requires -ext o... " >&6; }
-if ${bakefile_cv_cxx_exto+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest.$ac_ext.o
-if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in `(ls conftest.* 2>/dev/null)`; do
-    case $ac_file in
-        conftest.$ac_ext.o)
-            bakefile_cv_cxx_exto="-ext o"
-            ;;
-        *)
-            ;;
-    esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot figure out if compiler needs -ext o: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-
-fi
-rm -f conftest.$ac_ext.o conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_exto" >&5
-$as_echo "$bakefile_cv_cxx_exto" >&6; }
-if test "x$bakefile_cv_cxx_exto" '!=' "x"; then
-    if test "cxx" = "c"; then
-        CFLAGS="$bakefile_cv_cxx_exto $CFLAGS"
-    fi
-    if test "cxx" = "cxx"; then
-        CXXFLAGS="$bakefile_cv_cxx_exto $CXXFLAGS"
-    fi
-fi
-
-            if test "x$bakefile_cv_c_exto" '!=' "x"; then
-                unset ac_cv_prog_cc_g
-                ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-            fi
-        fi
-
-                        case `uname -s` in
-            AIX*)
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the IBM xlC C++ compiler" >&5
-$as_echo_n "checking whether we are using the IBM xlC C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___xlC__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __xlC__
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___xlC__=yes
-else
-  bakefile_cv_cxx_compiler___xlC__=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___xlC__" >&5
-$as_echo "$bakefile_cv_cxx_compiler___xlC__" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___xlC__" = "xyes"; then
-        :; XLCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            Darwin)
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Metrowerks C++ compiler" >&5
-$as_echo_n "checking whether we are using the Metrowerks C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___MWERKS__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __MWERKS__
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___MWERKS__=yes
-else
-  bakefile_cv_cxx_compiler___MWERKS__=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___MWERKS__" >&5
-$as_echo "$bakefile_cv_cxx_compiler___MWERKS__" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___MWERKS__" = "xyes"; then
-        :; MWCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                if test "$MWCXX" != "yes"; then
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the IBM xlC C++ compiler" >&5
-$as_echo_n "checking whether we are using the IBM xlC C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___xlC__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __xlC__
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___xlC__=yes
-else
-  bakefile_cv_cxx_compiler___xlC__=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___xlC__" >&5
-$as_echo "$bakefile_cv_cxx_compiler___xlC__" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___xlC__" = "xyes"; then
-        :; XLCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                fi
-                ;;
-
-            IRIX*)
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the SGI C++ compiler" >&5
-$as_echo_n "checking whether we are using the SGI C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler__SGI_COMPILER_VERSION+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef _SGI_COMPILER_VERSION
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler__SGI_COMPILER_VERSION=yes
-else
-  bakefile_cv_cxx_compiler__SGI_COMPILER_VERSION=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler__SGI_COMPILER_VERSION" >&5
-$as_echo "$bakefile_cv_cxx_compiler__SGI_COMPILER_VERSION" >&6; }
-    if test "x$bakefile_cv_cxx_compiler__SGI_COMPILER_VERSION" = "xyes"; then
-        :; SGICXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            Linux*)
-                                                if test "$INTELCXX" != "yes"; then
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Sun C++ compiler" >&5
-$as_echo_n "checking whether we are using the Sun C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___SUNPRO_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __SUNPRO_CC
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___SUNPRO_CC=yes
-else
-  bakefile_cv_cxx_compiler___SUNPRO_CC=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___SUNPRO_CC" >&5
-$as_echo "$bakefile_cv_cxx_compiler___SUNPRO_CC" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___SUNPRO_CC" = "xyes"; then
-        :; SUNCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                fi
-                ;;
-
-            HP-UX*)
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the HP C++ compiler" >&5
-$as_echo_n "checking whether we are using the HP C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___HP_aCC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __HP_aCC
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___HP_aCC=yes
-else
-  bakefile_cv_cxx_compiler___HP_aCC=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___HP_aCC" >&5
-$as_echo "$bakefile_cv_cxx_compiler___HP_aCC" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___HP_aCC" = "xyes"; then
-        :; HPCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            OSF1)
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Compaq C++ compiler" >&5
-$as_echo_n "checking whether we are using the Compaq C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___DECCXX+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __DECCXX
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___DECCXX=yes
-else
-  bakefile_cv_cxx_compiler___DECCXX=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___DECCXX" >&5
-$as_echo "$bakefile_cv_cxx_compiler___DECCXX" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___DECCXX" = "xyes"; then
-        :; COMPAQCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-
-            SunOS)
-
-
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the Sun C++ compiler" >&5
-$as_echo_n "checking whether we are using the Sun C++ compiler... " >&6; }
-if ${bakefile_cv_cxx_compiler___SUNPRO_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-             #ifndef __SUNPRO_CC
-                choke me
-             #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  bakefile_cv_cxx_compiler___SUNPRO_CC=yes
-else
-  bakefile_cv_cxx_compiler___SUNPRO_CC=no
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_cxx_compiler___SUNPRO_CC" >&5
-$as_echo "$bakefile_cv_cxx_compiler___SUNPRO_CC" >&6; }
-    if test "x$bakefile_cv_cxx_compiler___SUNPRO_CC" = "xyes"; then
-        :; SUNCXX=yes
-    else
-        :;
-    fi
-    ac_ext=cpp
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
-
-                ;;
-        esac
-    fi
-
-
-
-
-
-
-
-
-    if test "x$BAKEFILE_HOST" = "x"; then
-               if test "x${host}" = "x" ; then
-                       as_fn_error $? "You must call the autoconf \"CANONICAL_HOST\" macro in your configure.ac (or .in) file." "$LINENO" 5
-               fi
-
-        BAKEFILE_HOST="${host}"
-    fi
-
-    if test "x$BAKEFILE_CHECK_BASICS" != "xno"; then
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_RANLIB" = x; then
-    RANLIB=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    RANLIB=$ac_ct_RANLIB
-  fi
-else
-  RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
-set x ${MAKE-make}
-ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat >conftest.make <<\_ACEOF
-SHELL = /bin/sh
-all:
-	@echo '@@@%%%=$(MAKE)=@@@%%%'
-_ACEOF
-# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
-case `${MAKE-make} -f conftest.make 2>/dev/null` in
-  *@@@%%%=?*=@@@%%%*)
-    eval ac_cv_prog_make_${ac_make}_set=yes;;
-  *)
-    eval ac_cv_prog_make_${ac_make}_set=no;;
-esac
-rm -f conftest.make
-fi
-if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  SET_MAKE=
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-
-    if test "x$SUNCXX" = "xyes"; then
-                                AR=$CXX
-        AROPTIONS="-xar -o"
-
-    elif test "x$SGICC" = "xyes"; then
-                AR=$CXX
-        AROPTIONS="-ar -o"
-
-    else
-        if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_AR+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_AR" = x; then
-    AR="ar"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    AR=$ac_ct_AR
-  fi
-else
-  AR="$ac_cv_prog_AR"
-fi
-
-        AROPTIONS=rcu
-    fi
-
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-    if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_NM+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$NM"; then
-  ac_cv_prog_NM="$NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_NM="${ac_tool_prefix}nm"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-NM=$ac_cv_prog_NM
-if test -n "$NM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
-$as_echo "$NM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NM"; then
-  ac_ct_NM=$NM
-  # Extract the first word of "nm", so it can be a program name with args.
-set dummy nm; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_NM+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_NM"; then
-  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_NM="nm"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NM=$ac_cv_prog_ac_ct_NM
-if test -n "$ac_ct_NM"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
-$as_echo "$ac_ct_NM" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_NM" = x; then
-    NM=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    NM=$ac_ct_NM
-  fi
-else
-  NM="$ac_cv_prog_NM"
-fi
-
-
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for command to install directories" >&5
-$as_echo_n "checking for command to install directories... " >&6; }
-    INSTALL_TEST_DIR=acbftest$$
-    $INSTALL -d $INSTALL_TEST_DIR > /dev/null 2>&1
-    if test $? = 0 -a -d $INSTALL_TEST_DIR; then
-        rmdir $INSTALL_TEST_DIR
-                        INSTALL_DIR='$(INSTALL) -d'
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL -d" >&5
-$as_echo "$INSTALL -d" >&6; }
-    else
-        INSTALL_DIR="mkdir -p"
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: mkdir -p" >&5
-$as_echo "mkdir -p" >&6; }
-    fi
-
-
-    LDFLAGS_GUI=
-    case ${BAKEFILE_HOST} in
-        *-*-cygwin* | *-*-mingw32* )
-        LDFLAGS_GUI="-mwindows"
-    esac
-
-
-    fi
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make is GNU make" >&5
-$as_echo_n "checking if make is GNU make... " >&6; }
-if ${bakefile_cv_prog_makeisgnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        if ( ${SHELL-sh} -c "${MAKE-make} --version" 2> /dev/null |
-                egrep -s GNU > /dev/null); then
-            bakefile_cv_prog_makeisgnu="yes"
-        else
-            bakefile_cv_prog_makeisgnu="no"
-        fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_prog_makeisgnu" >&5
-$as_echo "$bakefile_cv_prog_makeisgnu" >&6; }
-
-    if test "x$bakefile_cv_prog_makeisgnu" = "xyes"; then
-        IF_GNU_MAKE=""
-    else
-        IF_GNU_MAKE="#"
-    fi
-
-
-
-    PLATFORM_UNIX=0
-    PLATFORM_WIN32=0
-    PLATFORM_MSDOS=0
-    PLATFORM_MAC=0
-    PLATFORM_MACOS=0
-    PLATFORM_MACOSX=0
-    PLATFORM_OS2=0
-    PLATFORM_BEOS=0
-
-    if test "x$BAKEFILE_FORCE_PLATFORM" = "x"; then
-        case "${BAKEFILE_HOST}" in
-            *-*-mingw32* )
-                PLATFORM_WIN32=1
-            ;;
-            *-pc-msdosdjgpp )
-                PLATFORM_MSDOS=1
-            ;;
-            *-pc-os2_emx | *-pc-os2-emx )
-                PLATFORM_OS2=1
-            ;;
-            *-*-darwin* )
-                PLATFORM_MAC=1
-                PLATFORM_MACOSX=1
-            ;;
-            *-*-beos* )
-                PLATFORM_BEOS=1
-            ;;
-            powerpc-apple-macos* )
-                PLATFORM_MAC=1
-                PLATFORM_MACOS=1
-            ;;
-            * )
-                PLATFORM_UNIX=1
-            ;;
-        esac
-    else
-        case "$BAKEFILE_FORCE_PLATFORM" in
-            win32 )
-                PLATFORM_WIN32=1
-            ;;
-            msdos )
-                PLATFORM_MSDOS=1
-            ;;
-            os2 )
-                PLATFORM_OS2=1
-            ;;
-            darwin )
-                PLATFORM_MAC=1
-                PLATFORM_MACOSX=1
-            ;;
-            unix )
-                PLATFORM_UNIX=1
-            ;;
-            beos )
-                PLATFORM_BEOS=1
-            ;;
-            * )
-                as_fn_error $? "Unknown platform: $BAKEFILE_FORCE_PLATFORM" "$LINENO" 5
-            ;;
-        esac
-    fi
-
-
-
-
-
-
-
-
-
-
-
-    # Check whether --enable-omf was given.
-if test "${enable_omf+set}" = set; then :
-  enableval=$enable_omf; bk_os2_use_omf="$enableval"
-fi
-
-
-    case "${BAKEFILE_HOST}" in
-      *-*-darwin* )
-                        if test "x$GCC" = "xyes"; then
-            CFLAGS="$CFLAGS -fno-common"
-            CXXFLAGS="$CXXFLAGS -fno-common"
-        fi
-        if test "x$XLCC" = "xyes"; then
-            CFLAGS="$CFLAGS -qnocommon"
-            CXXFLAGS="$CXXFLAGS -qnocommon"
-        fi
-        ;;
-
-      *-pc-os2_emx | *-pc-os2-emx )
-        if test "x$bk_os2_use_omf" = "xyes" ; then
-            AR=emxomfar
-            RANLIB=:
-            LDFLAGS="-Zomf $LDFLAGS"
-            CFLAGS="-Zomf $CFLAGS"
-            CXXFLAGS="-Zomf $CXXFLAGS"
-            OS2_LIBEXT="lib"
-        else
-            OS2_LIBEXT="a"
-        fi
-        ;;
-
-      i*86-*-beos* )
-        LDFLAGS="-L/boot/develop/lib/x86 $LDFLAGS"
-        ;;
-    esac
-
-
-    SO_SUFFIX="so"
-    SO_SUFFIX_MODULE="so"
-    EXEEXT=""
-    LIBPREFIX="lib"
-    LIBEXT=".a"
-    DLLPREFIX="lib"
-    DLLPREFIX_MODULE=""
-    DLLIMP_SUFFIX=""
-    dlldir="$libdir"
-
-    case "${BAKEFILE_HOST}" in
-                        ia64-hp-hpux* )
-        ;;
-        *-hp-hpux* )
-            SO_SUFFIX="sl"
-            SO_SUFFIX_MODULE="sl"
-        ;;
-        *-*-aix* )
-                                                                        SO_SUFFIX="a"
-            SO_SUFFIX_MODULE="a"
-        ;;
-        *-*-cygwin* )
-            SO_SUFFIX="dll"
-            SO_SUFFIX_MODULE="dll"
-            DLLIMP_SUFFIX="dll.a"
-            EXEEXT=".exe"
-            DLLPREFIX="cyg"
-            dlldir="$bindir"
-        ;;
-        *-*-mingw32* )
-            SO_SUFFIX="dll"
-            SO_SUFFIX_MODULE="dll"
-            DLLIMP_SUFFIX="dll.a"
-            EXEEXT=".exe"
-            DLLPREFIX=""
-            dlldir="$bindir"
-        ;;
-        *-pc-msdosdjgpp )
-            EXEEXT=".exe"
-            DLLPREFIX=""
-            dlldir="$bindir"
-        ;;
-        *-pc-os2_emx | *-pc-os2-emx )
-            SO_SUFFIX="dll"
-            SO_SUFFIX_MODULE="dll"
-            DLLIMP_SUFFIX=$OS2_LIBEXT
-            EXEEXT=".exe"
-            DLLPREFIX=""
-            LIBPREFIX=""
-            LIBEXT=".$OS2_LIBEXT"
-            dlldir="$bindir"
-        ;;
-        *-*-darwin* )
-            SO_SUFFIX="dylib"
-            SO_SUFFIX_MODULE="bundle"
-        ;;
-    esac
-
-    if test "x$DLLIMP_SUFFIX" = "x" ; then
-        DLLIMP_SUFFIX="$SO_SUFFIX"
-    fi
-
-
-
-
-
-
-
-
-
-
-
-
-        PIC_FLAG=""
-    if test "x$GCC" = "xyes"; then
-                PIC_FLAG="-fPIC"
-    fi
-
-        SHARED_LD_CC="\$(CC) -shared ${PIC_FLAG} -o"
-    SHARED_LD_CXX="\$(CXX) -shared ${PIC_FLAG} -o"
-    WINDOWS_IMPLIB=0
-
-    case "${BAKEFILE_HOST}" in
-      *-hp-hpux* )
-                if test "x$GCC" != "xyes"; then
-                        LDFLAGS="$LDFLAGS -L/usr/lib"
-
-            SHARED_LD_CC="${CC} -b -o"
-            SHARED_LD_CXX="${CXX} -b -o"
-            PIC_FLAG="+Z"
-        fi
-      ;;
-
-      *-*-linux* )
-                        if test "$INTELCC" = "yes" -a "$INTELCC8" != "yes"; then
-            PIC_FLAG="-KPIC"
-        elif test "x$SUNCXX" = "xyes"; then
-            SHARED_LD_CC="${CC} -G -o"
-            SHARED_LD_CXX="${CXX} -G -o"
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-solaris2* )
-        if test "x$SUNCXX" = xyes ; then
-            SHARED_LD_CC="${CC} -G -o"
-            SHARED_LD_CXX="${CXX} -G -o"
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-darwin* )
-
-D='$'
-cat <<EOF >shared-ld-sh
-#!/bin/sh
-#-----------------------------------------------------------------------------
-#-- Name:        distrib/mac/shared-ld-sh
-#-- Purpose:     Link a mach-o dynamic shared library for Darwin / Mac OS X
-#-- Author:      Gilles Depeyrot
-#-- Copyright:   (c) 2002 Gilles Depeyrot
-#-- Licence:     any use permitted
-#-----------------------------------------------------------------------------
-
-verbose=0
-args=""
-objects=""
-linking_flag="-dynamiclib"
-ldargs="-r -keep_private_externs -nostdlib"
-
-if test "x${D}CXX" = "x"; then
-    CXX="c++"
-fi
-
-while test ${D}# -gt 0; do
-    case ${D}1 in
-
-       -v)
-        verbose=1
-        ;;
-
-       -o|-compatibility_version|-current_version|-framework|-undefined|-install_name)
-        # collect these options and values
-        args="${D}{args} ${D}1 ${D}2"
-        shift
-        ;;
-
-       -arch|-isysroot)
-        # collect these options and values
-        ldargs="${D}{ldargs} ${D}1 ${D}2"
-        shift
-        ;;
-
-       -s|-Wl,*)
-        # collect these load args
-        ldargs="${D}{ldargs} ${D}1"
-        ;;
-
-       -l*|-L*|-flat_namespace|-headerpad_max_install_names)
-        # collect these options
-        args="${D}{args} ${D}1"
-        ;;
-
-       -dynamiclib|-bundle)
-        linking_flag="${D}1"
-        ;;
-
-       -*)
-        echo "shared-ld: unhandled option '${D}1'"
-        exit 1
-        ;;
-
-        *.o | *.a | *.dylib)
-        # collect object files
-        objects="${D}{objects} ${D}1"
-        ;;
-
-        *)
-        echo "shared-ld: unhandled argument '${D}1'"
-        exit 1
-        ;;
-
-    esac
-    shift
-done
-
-status=0
-
-#
-# Link one module containing all the others
-#
-if test ${D}{verbose} = 1; then
-    echo "${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o"
-fi
-${D}CXX ${D}{ldargs} ${D}{objects} -o master.${D}${D}.o
-status=${D}?
-
-#
-# Link the shared library from the single module created, but only if the
-# previous command didn't fail:
-#
-if test ${D}{status} = 0; then
-    if test ${D}{verbose} = 1; then
-        echo "${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}"
-    fi
-    ${D}CXX ${D}{linking_flag} master.${D}${D}.o ${D}{args}
-    status=${D}?
-fi
-
-#
-# Remove intermediate module
-#
-rm -f master.${D}${D}.o
-
-exit ${D}status
-EOF
-
-        chmod +x shared-ld-sh
-
-        SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o"
-        SHARED_LD_MODULE_CXX="CXX=\"\$(CXX)\" $SHARED_LD_MODULE_CC"
-
-
-                                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc 3.1 or later" >&5
-$as_echo_n "checking for gcc 3.1 or later... " >&6; }
-if ${bakefile_cv_gcc31+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-                   #if (__GNUC__ < 3) || \
-                       ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1))
-                       This is old gcc
-                   #endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-
-                   bakefile_cv_gcc31=yes
-
-else
-
-                   bakefile_cv_gcc31=no
-
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bakefile_cv_gcc31" >&5
-$as_echo "$bakefile_cv_gcc31" >&6; }
-        if test "$bakefile_cv_gcc31" = "no"; then
-                        SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o"
-            SHARED_LD_CXX="$SHARED_LD_CC"
-        else
-                        SHARED_LD_CC="\${CC} -dynamiclib -single_module -headerpad_max_install_names -o"
-            SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o"
-        fi
-
-        if test "x$GCC" == "xyes"; then
-            PIC_FLAG="-dynamic -fPIC"
-        fi
-        if test "x$XLCC" = "xyes"; then
-            PIC_FLAG="-dynamic -DPIC"
-        fi
-      ;;
-
-      *-*-aix* )
-        if test "x$GCC" = "xyes"; then
-                                                            PIC_FLAG=""
-
-                                                                                    case "${BAKEFILE_HOST}" in
-                *-*-aix5* )
-                    LD_EXPFULL="-Wl,-bexpfull"
-                    ;;
-            esac
-
-            SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o"
-            SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o"
-        else
-                                    # Extract the first word of "makeC++SharedLib", so it can be a program name with args.
-set dummy makeC++SharedLib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_AIX_CXX_LD+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$AIX_CXX_LD"; then
-  ac_cv_prog_AIX_CXX_LD="$AIX_CXX_LD" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AIX_CXX_LD="makeC++SharedLib"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_AIX_CXX_LD" && ac_cv_prog_AIX_CXX_LD="/usr/lpp/xlC/bin/makeC++SharedLib"
-fi
-fi
-AIX_CXX_LD=$ac_cv_prog_AIX_CXX_LD
-if test -n "$AIX_CXX_LD"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_CXX_LD" >&5
-$as_echo "$AIX_CXX_LD" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-            SHARED_LD_CC="$AIX_CC_LD -p 0 -o"
-            SHARED_LD_CXX="$AIX_CXX_LD -p 0 -o"
-        fi
-      ;;
-
-      *-*-beos* )
-                        SHARED_LD_CC="${LD} -nostart -o"
-        SHARED_LD_CXX="${LD} -nostart -o"
-      ;;
-
-      *-*-irix* )
-                if test "x$GCC" != "xyes"; then
-            PIC_FLAG="-KPIC"
-        fi
-      ;;
-
-      *-*-cygwin* | *-*-mingw32* )
-        PIC_FLAG=""
-        SHARED_LD_CC="\$(CC) -shared -o"
-        SHARED_LD_CXX="\$(CXX) -shared -o"
-        WINDOWS_IMPLIB=1
-      ;;
-
-      *-pc-os2_emx | *-pc-os2-emx )
-        SHARED_LD_CC="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
-        SHARED_LD_CXX="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
-        PIC_FLAG=""
-
-D='$'
-cat <<EOF >dllar.sh
-#!/bin/sh
-#
-# dllar - a tool to build both a .dll and an .a file
-# from a set of object (.o) files for EMX/OS2.
-#
-#  Written by Andrew Zabolotny, bit@freya.etu.ru
-#  Ported to Unix like shell by Stefan Neis, Stefan.Neis@t-online.de
-#
-#  This script will accept a set of files on the command line.
-#  All the public symbols from the .o files will be exported into
-#  a .DEF file, then linker will be run (through gcc) against them to
-#  build a shared library consisting of all given .o files. All libraries
-#  (.a) will be first decompressed into component .o files then act as
-#  described above. You can optionally give a description (-d "description")
-#  which will be put into .DLL. To see the list of accepted options (as well
-#  as command-line format) simply run this program without options. The .DLL
-#  is built to be imported by name (there is no guarantee that new versions
-#  of the library you build will have same ordinals for same symbols).
-#
-#  dllar is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2, or (at your option)
-#  any later version.
-#
-#  dllar is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with dllar; see the file COPYING.  If not, write to the Free
-#  Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-#  02111-1307, USA.
-
-# To successfully run this program you will need:
-#  - Current drive should have LFN support (HPFS, ext2, network, etc)
-#    (Sometimes dllar generates filenames which won't fit 8.3 scheme)
-#  - gcc
-#    (used to build the .dll)
-#  - emxexp
-#    (used to create .def file from .o files)
-#  - emximp
-#    (used to create .a file from .def file)
-#  - GNU text utilites (cat, sort, uniq)
-#    used to process emxexp output
-#  - GNU file utilities (mv, rm)
-#  - GNU sed
-#  - lxlite (optional, see flag below)
-#    (used for general .dll cleanup)
-#
-
-flag_USE_LXLITE=1;
-
-#
-# helper functions
-# basnam, variant of basename, which does _not_ remove the path, _iff_
-#                              second argument (suffix to remove) is given
-basnam(){
-    case ${D}# in
-    1)
-        echo ${D}1 | sed 's/.*\\///' | sed 's/.*\\\\//'
-        ;;
-    2)
-        echo ${D}1 | sed 's/'${D}2'${D}//'
-        ;;
-    *)
-        echo "error in basnam ${D}*"
-        exit 8
-        ;;
-    esac
-}
-
-# Cleanup temporary files and output
-CleanUp() {
-    cd ${D}curDir
-    for i in ${D}inputFiles ; do
-        case ${D}i in
-        *!)
-            rm -rf \`basnam ${D}i !\`
-            ;;
-        *)
-            ;;
-        esac
-    done
-
-    # Kill result in case of failure as there is just to many stupid make/nmake
-    # things out there which doesn't do this.
-    if [ ${D}# -eq 0 ]; then
-        rm -f ${D}arcFile ${D}arcFile2 ${D}defFile ${D}dllFile
-    fi
-}
-
-# Print usage and exit script with rc=1.
-PrintHelp() {
- echo 'Usage: dllar.sh [-o[utput] output_file] [-i[mport] importlib_name]'
- echo '       [-name-mangler-script script.sh]'
- echo '       [-d[escription] "dll descrption"] [-cc "CC"] [-f[lags] "CFLAGS"]'
- echo '       [-ord[inals]] -ex[clude] "symbol(s)"'
- echo '       [-libf[lags] "{INIT|TERM}{GLOBAL|INSTANCE}"] [-nocrt[dll]] [-nolxl[ite]]'
- echo '       [*.o] [*.a]'
- echo '*> "output_file" should have no extension.'
- echo '   If it has the .o, .a or .dll extension, it is automatically removed.'
- echo '   The import library name is derived from this and is set to "name".a,'
- echo '   unless overridden by -import'
- echo '*> "importlib_name" should have no extension.'
- echo '   If it has the .o, or .a extension, it is automatically removed.'
- echo '   This name is used as the import library name and may be longer and'
- echo '   more descriptive than the DLL name which has to follow the old '
- echo '   8.3 convention of FAT.'
- echo '*> "script.sh may be given to override the output_file name by a'
- echo '   different name. It is mainly useful if the regular make process'
- echo '   of some package does not take into account OS/2 restriction of'
- echo '   DLL name lengths. It takes the importlib name as input and is'
- echo '   supposed to procude a shorter name as output. The script should'
- echo '   expect to get importlib_name without extension and should produce'
- echo '   a (max.) 8 letter name without extension.'
- echo '*> "cc" is used to use another GCC executable.   (default: gcc.exe)'
- echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
- echo '   These flags will be put at the start of GCC command line.'
- echo '*> -ord[inals] tells dllar to export entries by ordinals. Be careful.'
- echo '*> -ex[clude] defines symbols which will not be exported. You can define'
- echo '   multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
- echo '   If the last character of a symbol is "*", all symbols beginning'
- echo '   with the prefix before "*" will be exclude, (see _GLOBAL* above).'
- echo '*> -libf[lags] can be used to add INITGLOBAL/INITINSTANCE and/or'
- echo '   TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
- echo '*> -nocrt[dll] switch will disable linking the library against emx''s'
- echo '   C runtime DLLs.'
- echo '*> -nolxl[ite] switch will disable running lxlite on the resulting DLL.'
- echo '*> All other switches (for example -L./ or -lmylib) will be passed'
- echo '   unchanged to GCC at the end of command line.'
- echo '*> If you create a DLL from a library and you do not specify -o,'
- echo '   the basename for DLL and import library will be set to library name,'
- echo '   the initial library will be renamed to 'name'_s.a (_s for static)'
- echo '   i.e. "dllar gcc.a" will create gcc.dll and gcc.a, and the initial'
- echo '   library will be renamed into gcc_s.a.'
- echo '--------'
- echo 'Example:'
- echo '   dllar -o gcc290.dll libgcc.a -d "GNU C runtime library" -ord'
- echo '    -ex "__main __ctordtor*" -libf "INITINSTANCE TERMINSTANCE"'
- CleanUp
- exit 1
-}
-
-# Execute a command.
-# If exit code of the command <> 0 CleanUp() is called and we'll exit the script.
-# @Uses    Whatever CleanUp() uses.
-doCommand() {
-    echo "${D}*"
-    eval ${D}*
-    rcCmd=${D}?
-
-    if [ ${D}rcCmd -ne 0 ]; then
-        echo "command failed, exit code="${D}rcCmd
-        CleanUp
-        exit ${D}rcCmd
-    fi
-}
-
-# main routine
-# setup globals
-cmdLine=${D}*
-outFile=""
-outimpFile=""
-inputFiles=""
-renameScript=""
-description=""
-CC=gcc.exe
-CFLAGS="-s -Zcrtdll"
-EXTRA_CFLAGS=""
-EXPORT_BY_ORDINALS=0
-exclude_symbols=""
-library_flags=""
-curDir=\`pwd\`
-curDirS=curDir
-case ${D}curDirS in
-*/)
-  ;;
-*)
-  curDirS=${D}{curDirS}"/"
-  ;;
-esac
-# Parse commandline
-libsToLink=0
-omfLinking=0
-while [ ${D}1 ]; do
-    case ${D}1 in
-    -ord*)
-        EXPORT_BY_ORDINALS=1;
-        ;;
-    -o*)
-	shift
-        outFile=${D}1
-	;;
-    -i*)
-        shift
-        outimpFile=${D}1
-        ;;
-    -name-mangler-script)
-        shift
-        renameScript=${D}1
-        ;;
-    -d*)
-        shift
-        description=${D}1
-        ;;
-    -f*)
-        shift
-        CFLAGS=${D}1
-        ;;
-    -c*)
-        shift
-        CC=${D}1
-        ;;
-    -h*)
-        PrintHelp
-        ;;
-    -ex*)
-        shift
-        exclude_symbols=${D}{exclude_symbols}${D}1" "
-        ;;
-    -libf*)
-        shift
-        library_flags=${D}{library_flags}${D}1" "
-        ;;
-    -nocrt*)
-        CFLAGS="-s"
-        ;;
-    -nolxl*)
-        flag_USE_LXLITE=0
-        ;;
-    -* | /*)
-        case ${D}1 in
-        -L* | -l*)
-            libsToLink=1
-            ;;
-        -Zomf)
-            omfLinking=1
-            ;;
-        *)
-            ;;
-        esac
-        EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
-        ;;
-    *.dll)
-        EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
-        if [ ${D}omfLinking -eq 1 ]; then
-            EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
-	else
-            EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
-        fi
-        ;;
-    *)
-        found=0;
-        if [ ${D}libsToLink -ne 0 ]; then
-            EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
-        else
-            for file in ${D}1 ; do
-                if [ -f ${D}file ]; then
-                    inputFiles="${D}{inputFiles} ${D}file"
-                    found=1
-                fi
-            done
-            if [ ${D}found -eq 0 ]; then
-                echo "ERROR: No file(s) found: "${D}1
-                exit 8
-            fi
-        fi
-      ;;
-    esac
-    shift
-done # iterate cmdline words
-
-#
-if [ -z "${D}inputFiles" ]; then
-    echo "dllar: no input files"
-    PrintHelp
-fi
-
-# Now extract all .o files from .a files
-newInputFiles=""
-for file in ${D}inputFiles ; do
-    case ${D}file in
-    *.a | *.lib)
-        case ${D}file in
-        *.a)
-            suffix=".a"
-            AR="ar"
-            ;;
-        *.lib)
-            suffix=".lib"
-            AR="emxomfar"
-            EXTRA_CFLAGS="${D}EXTRA_CFLAGS -Zomf"
-            ;;
-        *)
-            ;;
-        esac
-        dirname=\`basnam ${D}file ${D}suffix\`"_%"
-        mkdir ${D}dirname
-        if [ ${D}? -ne 0 ]; then
-            echo "Failed to create subdirectory ./${D}dirname"
-            CleanUp
-            exit 8;
-        fi
-        # Append '!' to indicate archive
-        newInputFiles="${D}newInputFiles ${D}{dirname}!"
-        doCommand "cd ${D}dirname; ${D}AR x ../${D}file"
-        cd ${D}curDir
-        found=0;
-        for subfile in ${D}dirname/*.o* ; do
-            if [ -f ${D}subfile ]; then
-                found=1
-                if [ -s ${D}subfile ]; then
-	            # FIXME: This should be: is file size > 32 byte, _not_ > 0!
-                    newInputFiles="${D}newInputFiles ${D}subfile"
-                fi
-            fi
-        done
-        if [ ${D}found -eq 0 ]; then
-            echo "WARNING: there are no files in archive \\'${D}file\\'"
-        fi
-        ;;
-    *)
-        newInputFiles="${D}{newInputFiles} ${D}file"
-        ;;
-    esac
-done
-inputFiles="${D}newInputFiles"
-
-# Output filename(s).
-do_backup=0;
-if [ -z ${D}outFile ]; then
-    do_backup=1;
-    set outFile ${D}inputFiles; outFile=${D}2
-fi
-
-# If it is an archive, remove the '!' and the '_%' suffixes
-case ${D}outFile in
-*_%!)
-    outFile=\`basnam ${D}outFile _%!\`
-    ;;
-*)
-    ;;
-esac
-case ${D}outFile in
-*.dll)
-    outFile=\`basnam ${D}outFile .dll\`
-    ;;
-*.DLL)
-    outFile=\`basnam ${D}outFile .DLL\`
-    ;;
-*.o)
-    outFile=\`basnam ${D}outFile .o\`
-    ;;
-*.obj)
-    outFile=\`basnam ${D}outFile .obj\`
-    ;;
-*.a)
-    outFile=\`basnam ${D}outFile .a\`
-    ;;
-*.lib)
-    outFile=\`basnam ${D}outFile .lib\`
-    ;;
-*)
-    ;;
-esac
-case ${D}outimpFile in
-*.a)
-    outimpFile=\`basnam ${D}outimpFile .a\`
-    ;;
-*.lib)
-    outimpFile=\`basnam ${D}outimpFile .lib\`
-    ;;
-*)
-    ;;
-esac
-if [ -z ${D}outimpFile ]; then
-    outimpFile=${D}outFile
-fi
-defFile="${D}{outFile}.def"
-arcFile="${D}{outimpFile}.a"
-arcFile2="${D}{outimpFile}.lib"
-
-#create ${D}dllFile as something matching 8.3 restrictions,
-if [ -z ${D}renameScript ] ; then
-    dllFile="${D}outFile"
-else
-    dllFile=\`${D}renameScript ${D}outimpFile\`
-fi
-
-if [ ${D}do_backup -ne 0 ] ; then
-    if [ -f ${D}arcFile ] ; then
-        doCommand "mv ${D}arcFile ${D}{outFile}_s.a"
-    fi
-    if [ -f ${D}arcFile2 ] ; then
-        doCommand "mv ${D}arcFile2 ${D}{outFile}_s.lib"
-    fi
-fi
-
-# Extract public symbols from all the object files.
-tmpdefFile=${D}{defFile}_%
-rm -f ${D}tmpdefFile
-for file in ${D}inputFiles ; do
-    case ${D}file in
-    *!)
-        ;;
-    *)
-        doCommand "emxexp -u ${D}file >> ${D}tmpdefFile"
-        ;;
-    esac
-done
-
-# Create the def file.
-rm -f ${D}defFile
-echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
-dllFile="${D}{dllFile}.dll"
-if [ ! -z ${D}description ]; then
-    echo "DESCRIPTION  \\"${D}{description}\\"" >> ${D}defFile
-fi
-echo "EXPORTS" >> ${D}defFile
-
-doCommand "cat ${D}tmpdefFile | sort.exe | uniq.exe > ${D}{tmpdefFile}%"
-grep -v "^ *;" < ${D}{tmpdefFile}% | grep -v "^ *${D}" >${D}tmpdefFile
-
-# Checks if the export is ok or not.
-for word in ${D}exclude_symbols; do
-    grep -v ${D}word < ${D}tmpdefFile >${D}{tmpdefFile}%
-    mv ${D}{tmpdefFile}% ${D}tmpdefFile
-done
-
-
-if [ ${D}EXPORT_BY_ORDINALS -ne 0 ]; then
-    sed "=" < ${D}tmpdefFile | \\
-    sed '
-      N
-      : loop
-      s/^\\([0-9]\\+\\)\\([^;]*\\)\\(;.*\\)\\?/\\2 @\\1 NONAME/
-      t loop
-    ' > ${D}{tmpdefFile}%
-    grep -v "^ *${D}" < ${D}{tmpdefFile}% > ${D}tmpdefFile
-else
-    rm -f ${D}{tmpdefFile}%
-fi
-cat ${D}tmpdefFile >> ${D}defFile
-rm -f ${D}tmpdefFile
-
-# Do linking, create implib, and apply lxlite.
-gccCmdl="";
-for file in ${D}inputFiles ; do
-    case ${D}file in
-    *!)
-        ;;
-    *)
-        gccCmdl="${D}gccCmdl ${D}file"
-        ;;
-    esac
-done
-doCommand "${D}CC ${D}CFLAGS -Zdll -o ${D}dllFile ${D}defFile ${D}gccCmdl ${D}EXTRA_CFLAGS"
-touch "${D}{outFile}.dll"
-
-doCommand "emximp -o ${D}arcFile ${D}defFile"
-if [ ${D}flag_USE_LXLITE -ne 0 ]; then
-    add_flags="";
-    if [ ${D}EXPORT_BY_ORDINALS -ne 0 ]; then
-        add_flags="-ynd"
-    fi
-    doCommand "lxlite -cs -t: -mrn -mln ${D}add_flags ${D}dllFile"
-fi
-doCommand "emxomf -s -l ${D}arcFile"
-
-# Successful exit.
-CleanUp 1
-exit 0
-EOF
-
-        chmod +x dllar.sh
-      ;;
-
-      powerpc-apple-macos* | \
-      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \
-      *-*-mirbsd* | \
-      *-*-sunos4* | \
-      *-*-osf* | \
-      *-*-dgux5* | \
-      *-*-sysv5* | \
-      *-pc-msdosdjgpp )
-              ;;
-
-      *)
-        as_fn_error $? "unknown system type $BAKEFILE_HOST." "$LINENO" 5
-    esac
-
-    if test "x$PIC_FLAG" != "x" ; then
-        PIC_FLAG="$PIC_FLAG -DPIC"
-    fi
-
-    if test "x$SHARED_LD_MODULE_CC" = "x" ; then
-        SHARED_LD_MODULE_CC="$SHARED_LD_CC"
-    fi
-    if test "x$SHARED_LD_MODULE_CXX" = "x" ; then
-        SHARED_LD_MODULE_CXX="$SHARED_LD_CXX"
-    fi
-
-
-
-
-
-
-
-
-
-    USE_SOVERSION=0
-    USE_SOVERLINUX=0
-    USE_SOVERSOLARIS=0
-    USE_SOVERCYGWIN=0
-    USE_SOTWOSYMLINKS=0
-    USE_MACVERSION=0
-    SONAME_FLAG=
-
-    case "${BAKEFILE_HOST}" in
-      *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-      *-*-k*bsd*-gnu | *-*-mirbsd* )
-        if test "x$SUNCXX" = "xyes"; then
-            SONAME_FLAG="-h "
-        else
-            SONAME_FLAG="-Wl,-soname,"
-        fi
-        USE_SOVERSION=1
-        USE_SOVERLINUX=1
-        USE_SOTWOSYMLINKS=1
-      ;;
-
-      *-*-solaris2* )
-        SONAME_FLAG="-h "
-        USE_SOVERSION=1
-        USE_SOVERSOLARIS=1
-      ;;
-
-      *-*-darwin* )
-        USE_MACVERSION=1
-        USE_SOVERSION=1
-        USE_SOTWOSYMLINKS=1
-      ;;
-
-      *-*-cygwin* )
-        USE_SOVERSION=1
-        USE_SOVERCYGWIN=1
-      ;;
-    esac
-
-
-
-
-
-
-
-
-
-
-    # Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
-  enableval=$enable_dependency_tracking; bk_use_trackdeps="$enableval"
-fi
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dependency tracking method" >&5
-$as_echo_n "checking for dependency tracking method... " >&6; }
-
-    BK_DEPS=""
-    if test "x$bk_use_trackdeps" = "xno" ; then
-        DEPS_TRACKING=0
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
-$as_echo "disabled" >&6; }
-    else
-        DEPS_TRACKING=1
-
-        if test "x$GCC" = "xyes"; then
-            DEPSMODE=gcc
-            case "${BAKEFILE_HOST}" in
-                *-*-darwin* )
-                                                            DEPSFLAG="-no-cpp-precomp -MMD"
-                ;;
-                * )
-                    DEPSFLAG="-MMD"
-                ;;
-            esac
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: gcc" >&5
-$as_echo "gcc" >&6; }
-        elif test "x$MWCC" = "xyes"; then
-            DEPSMODE=mwcc
-            DEPSFLAG="-MM"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: mwcc" >&5
-$as_echo "mwcc" >&6; }
-        elif test "x$SUNCC" = "xyes"; then
-            DEPSMODE=unixcc
-            DEPSFLAG="-xM1"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Sun cc" >&5
-$as_echo "Sun cc" >&6; }
-        elif test "x$SGICC" = "xyes"; then
-            DEPSMODE=unixcc
-            DEPSFLAG="-M"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: SGI cc" >&5
-$as_echo "SGI cc" >&6; }
-        elif test "x$HPCC" = "xyes"; then
-            DEPSMODE=unixcc
-            DEPSFLAG="+make"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: HP cc" >&5
-$as_echo "HP cc" >&6; }
-        elif test "x$COMPAQCC" = "xyes"; then
-            DEPSMODE=gcc
-            DEPSFLAG="-MD"
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: Compaq cc" >&5
-$as_echo "Compaq cc" >&6; }
-        else
-            DEPS_TRACKING=0
-            { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-        fi
-
-        if test $DEPS_TRACKING = 1 ; then
-
-D='$'
-cat <<EOF >bk-deps
-#!/bin/sh
-
-# This script is part of Bakefile (http://www.bakefile.org) autoconf
-# script. It is used to track C/C++ files dependencies in portable way.
-#
-# Permission is given to use this file in any way.
-
-DEPSMODE=${DEPSMODE}
-DEPSFLAG="${DEPSFLAG}"
-DEPSDIRBASE=.deps
-
-if test ${D}DEPSMODE = gcc ; then
-    ${D}* ${D}{DEPSFLAG}
-    status=${D}?
-
-    # determine location of created files:
-    while test ${D}# -gt 0; do
-        case "${D}1" in
-            -o )
-                shift
-                objfile=${D}1
-            ;;
-            -* )
-            ;;
-            * )
-                srcfile=${D}1
-            ;;
-        esac
-        shift
-    done
-    objfilebase=\`basename ${D}objfile\`
-    builddir=\`dirname ${D}objfile\`
-    depfile=\`basename ${D}srcfile | sed -e 's/\\..*${D}/.d/g'\`
-    depobjname=\`echo ${D}depfile |sed -e 's/\\.d/.o/g'\`
-    depsdir=${D}builddir/${D}DEPSDIRBASE
-    mkdir -p ${D}depsdir
-
-    # if the compiler failed, we're done:
-    if test ${D}{status} != 0 ; then
-        rm -f ${D}depfile
-        exit ${D}{status}
-    fi
-
-    # move created file to the location we want it in:
-    if test -f ${D}depfile ; then
-        sed -e "s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{depsdir}/${D}{objfilebase}.d
-        rm -f ${D}depfile
-    else
-        # "g++ -MMD -o fooobj.o foosrc.cpp" produces fooobj.d
-        depfile=\`echo "${D}objfile" | sed -e 's/\\..*${D}/.d/g'\`
-        if test ! -f ${D}depfile ; then
-            # "cxx -MD -o fooobj.o foosrc.cpp" creates fooobj.o.d (Compaq C++)
-            depfile="${D}objfile.d"
-        fi
-        if test -f ${D}depfile ; then
-            sed -e "\\,^${D}objfile,!s,${D}depobjname:,${D}objfile:,g" ${D}depfile >${D}{depsdir}/${D}{objfilebase}.d
-            rm -f ${D}depfile
-        fi
-    fi
-    exit 0
-
-elif test ${D}DEPSMODE = mwcc ; then
-    ${D}* || exit ${D}?
-    # Run mwcc again with -MM and redirect into the dep file we want
-    # NOTE: We can't use shift here because we need ${D}* to be valid
-    prevarg=
-    for arg in ${D}* ; do
-        if test "${D}prevarg" = "-o"; then
-            objfile=${D}arg
-        else
-            case "${D}arg" in
-                -* )
-                ;;
-                * )
-                    srcfile=${D}arg
-                ;;
-            esac
-        fi
-        prevarg="${D}arg"
-    done
-
-    objfilebase=\`basename ${D}objfile\`
-    builddir=\`dirname ${D}objfile\`
-    depsdir=${D}builddir/${D}DEPSDIRBASE
-    mkdir -p ${D}depsdir
-
-    ${D}* ${D}DEPSFLAG >${D}{depsdir}/${D}{objfilebase}.d
-    exit 0
-
-elif test ${D}DEPSMODE = unixcc; then
-    ${D}* || exit ${D}?
-    # Run compiler again with deps flag and redirect into the dep file.
-    # It doesn't work if the '-o FILE' option is used, but without it the
-    # dependency file will contain the wrong name for the object. So it is
-    # removed from the command line, and the dep file is fixed with sed.
-    cmd=""
-    while test ${D}# -gt 0; do
-        case "${D}1" in
-            -o )
-                shift
-                objfile=${D}1
-            ;;
-            * )
-                eval arg${D}#=\\${D}1
-                cmd="${D}cmd \\${D}arg${D}#"
-            ;;
-        esac
-        shift
-    done
-
-    objfilebase=\`basename ${D}objfile\`
-    builddir=\`dirname ${D}objfile\`
-    depsdir=${D}builddir/${D}DEPSDIRBASE
-    mkdir -p ${D}depsdir
-
-    eval "${D}cmd ${D}DEPSFLAG" | sed "s|.*:|${D}objfile:|" >${D}{depsdir}/${D}{objfilebase}.d
-    exit 0
-
-else
-    ${D}*
-    exit ${D}?
-fi
-EOF
-
-            chmod +x bk-deps
-                                    BK_DEPS="`pwd`/bk-deps"
-        fi
-    fi
-
-
-
-
-
-    case ${BAKEFILE_HOST} in
-        *-*-cygwin* | *-*-mingw32* )
-                        if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
-set dummy ${ac_tool_prefix}windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_WINDRES+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$WINDRES"; then
-  ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-WINDRES=$ac_cv_prog_WINDRES
-if test -n "$WINDRES"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
-$as_echo "$WINDRES" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_WINDRES"; then
-  ac_ct_WINDRES=$WINDRES
-  # Extract the first word of "windres", so it can be a program name with args.
-set dummy windres; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_WINDRES"; then
-  ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_WINDRES="windres"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
-if test -n "$ac_ct_WINDRES"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
-$as_echo "$ac_ct_WINDRES" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_WINDRES" = x; then
-    WINDRES=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    WINDRES=$ac_ct_WINDRES
-  fi
-else
-  WINDRES="$ac_cv_prog_WINDRES"
-fi
-
-         ;;
-
-      *-*-darwin* | powerpc-apple-macos* )
-            # Extract the first word of "Rez", so it can be a program name with args.
-set dummy Rez; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_REZ+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$REZ"; then
-  ac_cv_prog_REZ="$REZ" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_REZ="Rez"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_REZ" && ac_cv_prog_REZ="/Developer/Tools/Rez"
-fi
-fi
-REZ=$ac_cv_prog_REZ
-if test -n "$REZ"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $REZ" >&5
-$as_echo "$REZ" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-            # Extract the first word of "SetFile", so it can be a program name with args.
-set dummy SetFile; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_SETFILE+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$SETFILE"; then
-  ac_cv_prog_SETFILE="$SETFILE" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_SETFILE="SetFile"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  test -z "$ac_cv_prog_SETFILE" && ac_cv_prog_SETFILE="/Developer/Tools/SetFile"
-fi
-fi
-SETFILE=$ac_cv_prog_SETFILE
-if test -n "$SETFILE"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
-$as_echo "$SETFILE" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-        ;;
-    esac
-
-
-
-
-
-
-
-
-
-    BAKEFILE_BAKEFILE_M4_VERSION="0.2.9"
-
-
-BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.9"
-
-    COND_DEBUG_0="#"
-    if test "x$DEBUG" = "x0" ; then
-        COND_DEBUG_0=""
-    fi
-
-    COND_DEBUG_1="#"
-    if test "x$DEBUG" = "x1" ; then
-        COND_DEBUG_1=""
-    fi
-
-    COND_DEPS_TRACKING_0="#"
-    if test "x$DEPS_TRACKING" = "x0" ; then
-        COND_DEPS_TRACKING_0=""
-    fi
-
-    COND_DEPS_TRACKING_1="#"
-    if test "x$DEPS_TRACKING" = "x1" ; then
-        COND_DEPS_TRACKING_1=""
-    fi
-
-    COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1="#"
-    if test "x$PLATFORM_MACOSX" = "x0" -a "x$USE_SOVERCYGWIN" = "x0" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1=""
-    fi
-
-    COND_PLATFORM_MACOSX_0_USE_SOVERSION_1="#"
-    if test "x$PLATFORM_MACOSX" = "x0" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_PLATFORM_MACOSX_0_USE_SOVERSION_1=""
-    fi
-
-    COND_PLATFORM_MACOSX_1="#"
-    if test "x$PLATFORM_MACOSX" = "x1" ; then
-        COND_PLATFORM_MACOSX_1=""
-    fi
-
-    COND_PLATFORM_MACOSX_1_USE_SOVERSION_1="#"
-    if test "x$PLATFORM_MACOSX" = "x1" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_PLATFORM_MACOSX_1_USE_SOVERSION_1=""
-    fi
-
-    COND_PLATFORM_MAC_0="#"
-    if test "x$PLATFORM_MAC" = "x0" ; then
-        COND_PLATFORM_MAC_0=""
-    fi
-
-    COND_PLATFORM_MAC_1="#"
-    if test "x$PLATFORM_MAC" = "x1" ; then
-        COND_PLATFORM_MAC_1=""
-    fi
-
-    COND_PLATFORM_OS2_1="#"
-    if test "x$PLATFORM_OS2" = "x1" ; then
-        COND_PLATFORM_OS2_1=""
-    fi
-
-    COND_SAMPLES_1="#"
-    if test "x$SAMPLES" = "x1" ; then
-        COND_SAMPLES_1=""
-    fi
-
-    COND_SHARED_0="#"
-    if test "x$SHARED" = "x0" ; then
-        COND_SHARED_0=""
-    fi
-
-    COND_SHARED_1="#"
-    if test "x$SHARED" = "x1" ; then
-        COND_SHARED_1=""
-    fi
-
-    COND_USE_SOTWOSYMLINKS_1="#"
-    if test "x$USE_SOTWOSYMLINKS" = "x1" ; then
-        COND_USE_SOTWOSYMLINKS_1=""
-    fi
-
-    COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1="#"
-    if test "x$USE_SOVERCYGWIN" = "x1" -a "x$USE_SOVERSION" = "x1" ; then
-        COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1=""
-    fi
-
-    COND_USE_SOVERLINUX_1="#"
-    if test "x$USE_SOVERLINUX" = "x1" ; then
-        COND_USE_SOVERLINUX_1=""
-    fi
-
-    COND_USE_SOVERSION_0="#"
-    if test "x$USE_SOVERSION" = "x0" ; then
-        COND_USE_SOVERSION_0=""
-    fi
-
-    COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1="#"
-    if test "x$USE_SOVERSION" = "x1" -a "x$USE_SOVERSOLARIS" = "x1" ; then
-        COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1=""
-    fi
-
-    COND_USE_SOVERSOLARIS_1="#"
-    if test "x$USE_SOVERSOLARIS" = "x1" ; then
-        COND_USE_SOVERSOLARIS_1=""
-    fi
-
-    COND_WINDOWS_IMPLIB_1="#"
-    if test "x$WINDOWS_IMPLIB" = "x1" ; then
-        COND_WINDOWS_IMPLIB_1=""
-    fi
-
-
-
-    if test "$BAKEFILE_AUTOCONF_INC_M4_VERSION" = "" ; then
-        as_fn_error $? "No version found in autoconf_inc.m4 - bakefile macro was changed to take additional argument, perhaps configure.in wasn't updated (see the documentation)?" "$LINENO" 5
-    fi
-
-    if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then
-        as_fn_error $? "Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match." "$LINENO" 5
-    fi
-
-ac_config_files="$ac_config_files Makefile build/autoconf/muparser.pc"
-
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, we kill variables containing newlines.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(
-  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-
-  (set) 2>&1 |
-    case $as_nl`(ac_space=' '; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes: double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \.
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;; #(
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-) |
-  sed '
-     /^ac_cv_env_/b end
-     t clear
-     :clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     :end' >>confcache
-if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
-  if test -w "$cache_file"; then
-    if test "x$cache_file" != "x/dev/null"; then
-      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
-      if test ! -f "$cache_file" || test -h "$cache_file"; then
-	cat confcache >"$cache_file"
-      else
-        case $cache_file in #(
-        */* | ?:*)
-	  mv -f confcache "$cache_file"$$ &&
-	  mv -f "$cache_file"$$ "$cache_file" ;; #(
-        *)
-	  mv -f confcache "$cache_file" ;;
-	esac
-      fi
-    fi
-  else
-    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
-$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
-  fi
-fi
-rm -f confcache
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Transform confdefs.h into DEFS.
-# Protect against shell expansion while executing Makefile rules.
-# Protect against Makefile macro expansion.
-#
-# If the first sed substitution is executed (which looks for macros that
-# take arguments), then branch to the quote section.  Otherwise,
-# look for a macro that doesn't take arguments.
-ac_script='
-:mline
-/\\$/{
- N
- s,\\\n,,
- b mline
-}
-t clear
-:clear
-s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
-t quote
-s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
-t quote
-b any
-:quote
-s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
-s/\[/\\&/g
-s/\]/\\&/g
-s/\$/$$/g
-H
-:any
-${
-	g
-	s/^\n//
-	s/\n/ /g
-	p
-}
-'
-DEFS=`sed -n "$ac_script" confdefs.h`
-
-
-ac_libobjs=
-ac_ltlibobjs=
-U=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
-  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
-  #    will be set to the directory where LIBOBJS objects are built.
-  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
-
-: "${CONFIG_STATUS=./config.status}"
-ac_write_fail=0
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-
-SHELL=\${CONFIG_SHELL-$SHELL}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
-## -------------------- ##
-## M4sh Initialization. ##
-## -------------------- ##
-
-# Be more Bourne compatible
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in #(
-  *posix*) :
-    set -o posix ;; #(
-  *) :
-     ;;
-esac
-fi
-
-
-as_nl='
-'
-export as_nl
-# Printing a long string crashes Solaris 7 /usr/bin/printf.
-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='print -r --'
-  as_echo_n='print -rn --'
-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
-  as_echo='printf %s\n'
-  as_echo_n='printf %s'
-else
-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
-    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
-    as_echo_n='/usr/ucb/echo -n'
-  else
-    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
-    as_echo_n_body='eval
-      arg=$1;
-      case $arg in #(
-      *"$as_nl"*)
-	expr "X$arg" : "X\\(.*\\)$as_nl";
-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
-      esac;
-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
-    '
-    export as_echo_n_body
-    as_echo_n='sh -c $as_echo_n_body as_echo'
-  fi
-  export as_echo_body
-  as_echo='sh -c $as_echo_body as_echo'
-fi
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.  Quoting is
-# there to prevent editors from complaining about space-tab.
-# (If _AS_PATH_WALK were called with IFS unset, it would disable word
-# splitting by setting IFS to empty value.)
-IFS=" ""	$as_nl"
-
-# Find who we are.  Look in the path if we contain no directory separator.
-as_myself=
-case $0 in #((
-  *[\\/]* ) as_myself=$0 ;;
-  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-  done
-IFS=$as_save_IFS
-
-     ;;
-esac
-# We did not find ourselves, most probably we were run as `sh COMMAND'
-# in which case we are not to be found in the path.
-if test "x$as_myself" = x; then
-  as_myself=$0
-fi
-if test ! -f "$as_myself"; then
-  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  exit 1
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there.  '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
-  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error STATUS ERROR [LINENO LOG_FD]
-# ----------------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with STATUS, using 1 if that was 0.
-as_fn_error ()
-{
-  as_status=$1; test $as_status -eq 0 && as_status=1
-  if test "$4"; then
-    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
-  fi
-  $as_echo "$as_me: error: $2" >&2
-  as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
-  return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
-  set +e
-  as_fn_set_status $1
-  exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
-  { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
-  eval 'as_fn_append ()
-  {
-    eval $1+=\$2
-  }'
-else
-  as_fn_append ()
-  {
-    eval $1=\$$1\$2
-  }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
-  eval 'as_fn_arith ()
-  {
-    as_val=$(( $* ))
-  }'
-else
-  as_fn_arith ()
-  {
-    as_val=`expr "$@" || test $? -eq 1`
-  }
-fi # as_fn_arith
-
-
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
-if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
-as_me=`$as_basename -- "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\/\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
-  case `echo 'xy\c'` in
-  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  xy)  ECHO_C='\c';;
-  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
-       ECHO_T='	';;
-  esac;;
-*)
-  ECHO_N='-n';;
-esac
-
-rm -f conf$$ conf$$.exe conf$$.file
-if test -d conf$$.dir; then
-  rm -f conf$$.dir/conf$$.file
-else
-  rm -f conf$$.dir
-  mkdir conf$$.dir 2>/dev/null
-fi
-if (echo >conf$$.file) 2>/dev/null; then
-  if ln -s conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s='ln -s'
-    # ... but there are two gotchas:
-    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -pR'.
-    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -pR'
-  elif ln conf$$.file conf$$ 2>/dev/null; then
-    as_ln_s=ln
-  else
-    as_ln_s='cp -pR'
-  fi
-else
-  as_ln_s='cp -pR'
-fi
-rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
-rmdir conf$$.dir 2>/dev/null
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || eval $as_mkdir_p || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p='mkdir -p "$as_dir"'
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
-
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
-  test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-exec 6>&1
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# Save the log message, to keep $0 and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.
-ac_log="
-This file was extended by muparser $as_me 2.2.4, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
-
-on `(hostname || uname -n) 2>/dev/null | sed 1q`
-"
-
-_ACEOF
-
-case $ac_config_files in *"
-"*) set x $ac_config_files; shift; ac_config_files=$*;;
-esac
-
-
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-# Files that config.status was made for.
-config_files="$ac_config_files"
-
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-ac_cs_usage="\
-\`$as_me' instantiates files and other configuration actions
-from templates according to the current configuration.  Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
-  -h, --help       print this help, then exit
-  -V, --version    print version number and configuration settings, then exit
-      --config     print configuration, then exit
-  -q, --quiet, --silent
-                   do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-      --file=FILE[:TEMPLATE]
-                   instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Report bugs to <muparser@beltoforion.de>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-muparser config.status 2.2.4
-configured by $0, generated by GNU Autoconf 2.69,
-  with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-
-ac_pwd='$ac_pwd'
-srcdir='$srcdir'
-INSTALL='$INSTALL'
-AWK='$AWK'
-test -n "\$AWK" || AWK=awk
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# The default lists apply if the user does not specify any file.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=?*)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  --*=)
-    ac_option=`expr "X$1" : 'X\([^=]*\)='`
-    ac_optarg=
-    ac_shift=:
-    ;;
-  *)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  esac
-
-  case $ac_option in
-  # Handling of the options.
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    $as_echo "$ac_cs_version"; exit ;;
-  --config | --confi | --conf | --con | --co | --c )
-    $as_echo "$ac_cs_config"; exit ;;
-  --debug | --debu | --deb | --de | --d | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    case $ac_optarg in
-    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    '') as_fn_error $? "missing file argument" ;;
-    esac
-    as_fn_append CONFIG_FILES " '$ac_optarg'"
-    ac_need_defaults=false;;
-  --he | --h |  --help | --hel | -h )
-    $as_echo "$ac_cs_usage"; exit ;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
-
-  # This is an error.
-  -*) as_fn_error $? "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
-  *) as_fn_append ac_config_targets " $1"
-     ac_need_defaults=false ;;
-
-  esac
-  shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-if \$ac_cs_recheck; then
-  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-  shift
-  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
-  CONFIG_SHELL='$SHELL'
-  export CONFIG_SHELL
-  exec "\$@"
-fi
-
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-  $as_echo "$ac_log"
-} >&5
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-
-# Handling of arguments.
-for ac_config_target in $ac_config_targets
-do
-  case $ac_config_target in
-    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-    "build/autoconf/muparser.pc") CONFIG_FILES="$CONFIG_FILES build/autoconf/muparser.pc" ;;
-
-  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
-  esac
-done
-
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-fi
-
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason against having it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Hook for its removal unless debugging.
-# Note that there is a small window in which the directory will not be cleaned:
-# after its creation but before its name has been assigned to `$tmp'.
-$debug ||
-{
-  tmp= ac_tmp=
-  trap 'exit_status=$?
-  : "${ac_tmp:=$tmp}"
-  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
-' 0
-  trap 'as_fn_exit 1' 1 2 13 15
-}
-# Create a (secure) tmp directory for tmp files.
-
-{
-  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -d "$tmp"
-}  ||
-{
-  tmp=./conf$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
-} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
-
-# Set up the scripts for CONFIG_FILES section.
-# No need to generate them if there are no CONFIG_FILES.
-# This happens for instance with `./config.status config.h'.
-if test -n "$CONFIG_FILES"; then
-
-
-ac_cr=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
-  eval ac_cr=\$\'\\r\'
-fi
-ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
-if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\\r'
-else
-  ac_cs_awk_cr=$ac_cr
-fi
-
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
-_ACEOF
-
-
-{
-  echo "cat >conf$$subs.awk <<_ACEOF" &&
-  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
-  echo "_ACEOF"
-} >conf$$subs.sh ||
-  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
-ac_delim='%!_!# '
-for ac_last_try in false false false false false :; do
-  . ./conf$$subs.sh ||
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-
-  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
-  if test $ac_delim_n = $ac_delim_num; then
-    break
-  elif $ac_last_try; then
-    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
-  else
-    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
-  fi
-done
-rm -f conf$$subs.sh
-
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
-_ACEOF
-sed -n '
-h
-s/^/S["/; s/!.*/"]=/
-p
-g
-s/^[^!]*!//
-:repl
-t repl
-s/'"$ac_delim"'$//
-t delim
-:nl
-h
-s/\(.\{148\}\)..*/\1/
-t more1
-s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
-p
-n
-b repl
-:more1
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t nl
-:delim
-h
-s/\(.\{148\}\)..*/\1/
-t more2
-s/["\\]/\\&/g; s/^/"/; s/$/"/
-p
-b
-:more2
-s/["\\]/\\&/g; s/^/"/; s/$/"\\/
-p
-g
-s/.\{148\}//
-t delim
-' <conf$$subs.awk | sed '
-/^[^""]/{
-  N
-  s/\n//
-}
-' >>$CONFIG_STATUS || ac_write_fail=1
-rm -f conf$$subs.awk
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
-  for (key in S) S_is_set[key] = 1
-  FS = ""
-
-}
-{
-  line = $ 0
-  nfields = split(line, field, "@")
-  substed = 0
-  len = length(field[1])
-  for (i = 2; i < nfields; i++) {
-    key = field[i]
-    keylen = length(key)
-    if (S_is_set[key]) {
-      value = S[key]
-      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
-      len += length(value) + length(field[++i])
-      substed = 1
-    } else
-      len += 1 + keylen
-  }
-
-  print line
-}
-
-_ACAWK
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
-  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
-else
-  cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
-  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
-_ACEOF
-
-# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
-# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
-h
-s///
-s/^/:/
-s/[	 ]*$/:/
-s/:\$(srcdir):/:/g
-s/:\${srcdir}:/:/g
-s/:@srcdir@:/:/g
-s/^:*//
-s/:*$//
-x
-s/\(=[	 ]*\).*/\1/
-G
-s/\n//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-fi # test -n "$CONFIG_FILES"
-
-
-eval set X "  :F $CONFIG_FILES      "
-shift
-for ac_tag
-do
-  case $ac_tag in
-  :[FHLC]) ac_mode=$ac_tag; continue;;
-  esac
-  case $ac_mode$ac_tag in
-  :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
-  :[FH]-) ac_tag=-:-;;
-  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
-  esac
-  ac_save_IFS=$IFS
-  IFS=:
-  set x $ac_tag
-  IFS=$ac_save_IFS
-  shift
-  ac_file=$1
-  shift
-
-  case $ac_mode in
-  :L) ac_source=$1;;
-  :[FH])
-    ac_file_inputs=
-    for ac_f
-    do
-      case $ac_f in
-      -) ac_f="$ac_tmp/stdin";;
-      *) # Look for the file first in the build tree, then in the source tree
-	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
-	 # because $ac_f cannot contain `:'.
-	 test -f "$ac_f" ||
-	   case $ac_f in
-	   [\\/$]*) false;;
-	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
-	   esac ||
-	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
-      esac
-      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
-      as_fn_append ac_file_inputs " '$ac_f'"
-    done
-
-    # Let's still pretend it is `configure' which instantiates (i.e., don't
-    # use $as_me), people would be surprised to read:
-    #    /* config.h.  Generated by config.status.  */
-    configure_input='Generated from '`
-	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
-	`' by configure.'
-    if test x"$ac_file" != x-; then
-      configure_input="$ac_file.  $configure_input"
-      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
-$as_echo "$as_me: creating $ac_file" >&6;}
-    fi
-    # Neutralize special characters interpreted by sed in replacement strings.
-    case $configure_input in #(
-    *\&* | *\|* | *\\* )
-       ac_sed_conf_input=`$as_echo "$configure_input" |
-       sed 's/[\\\\&|]/\\\\&/g'`;; #(
-    *) ac_sed_conf_input=$configure_input;;
-    esac
-
-    case $ac_tag in
-    *:-:* | *:-) cat >"$ac_tmp/stdin" \
-      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
-    esac
-    ;;
-  esac
-
-  ac_dir=`$as_dirname -- "$ac_file" ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  as_dir="$ac_dir"; as_fn_mkdir_p
-  ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-
-  case $ac_mode in
-  :F)
-  #
-  # CONFIG_FILE
-  #
-
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
-  esac
-_ACEOF
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-# If the template does not know about datarootdir, expand it.
-# FIXME: This hack should be removed a few years after 2.60.
-ac_datarootdir_hack=; ac_datarootdir_seen=
-ac_sed_dataroot='
-/datarootdir/ {
-  p
-  q
-}
-/@datadir@/p
-/@docdir@/p
-/@infodir@/p
-/@localedir@/p
-/@mandir@/p'
-case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
-*datarootdir*) ac_datarootdir_seen=yes;;
-*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-  ac_datarootdir_hack='
-  s&@datadir@&$datadir&g
-  s&@docdir@&$docdir&g
-  s&@infodir@&$infodir&g
-  s&@localedir@&$localedir&g
-  s&@mandir@&$mandir&g
-  s&\\\${datarootdir}&$datarootdir&g' ;;
-esac
-_ACEOF
-
-# Neutralize VPATH when `$srcdir' = `.'.
-# Shell code in configure.ac might set extrasub.
-# FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_sed_extra="$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s|@configure_input@|$ac_sed_conf_input|;t t
-s&@top_builddir@&$ac_top_builddir_sub&;t t
-s&@top_build_prefix@&$ac_top_build_prefix&;t t
-s&@srcdir@&$ac_srcdir&;t t
-s&@abs_srcdir@&$ac_abs_srcdir&;t t
-s&@top_srcdir@&$ac_top_srcdir&;t t
-s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
-s&@builddir@&$ac_builddir&;t t
-s&@abs_builddir@&$ac_abs_builddir&;t t
-s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
-s&@INSTALL@&$ac_INSTALL&;t t
-$ac_datarootdir_hack
-"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
-  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
-
-test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
-      "$ac_tmp/out"`; test -z "$ac_out"; } &&
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&5
-$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined" >&2;}
-
-  rm -f "$ac_tmp/stdin"
-  case $ac_file in
-  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
-  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
-  esac \
-  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
- ;;
-
-
-
-  esac
-
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
-  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# configure is writing to config.log, and then calls config.status.
-# config.status does its own redirection, appending to config.log.
-# Unfortunately, on DOS this fails, as config.log is still kept open
-# by configure, so config.status won't be able to write to it; its
-# output is simply discarded.  So we exec the FD to /dev/null,
-# effectively closing config.log, so it can be properly (re)opened and
-# appended to by config.status.  When coming back to configure, we
-# need to make the FD available again.
-if test "$no_create" != yes; then
-  ac_cs_success=:
-  ac_config_status_args=
-  test "$silent" = yes &&
-    ac_config_status_args="$ac_config_status_args --quiet"
-  exec 5>/dev/null
-  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
-  exec 5>>config.log
-  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
-  # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit 1
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
-
-
-
-## CONFIGURE END MESSAGE
-#####################################################################
-
-echo
-echo " ----------------------------------------------------------------"
-echo "  Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed."
-echo "  Summary of main configuration settings for $PACKAGE_NAME:"
-
-    if [ "$SHARED" = "1" ]; then
-        echo "  - SHARED mode"
-    else
-        echo "  - STATIC mode"
-    fi
-
-
-    if [ "$DEBUG" = "1" ]; then
-        echo "  - DEBUG build"
-    else
-        echo "  - RELEASE build"
-    fi
-
-if [ "$SAMPLES" = "1" ]; then
-    echo "  - SAMPLES enabled"
-else
-    echo "  - SAMPLES disabled"
-fi
-echo "  Now, just run make."
-echo " ----------------------------------------------------------------"
-echo
diff --git a/debian/changelog b/debian/changelog
index c48b85d..4e59314 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+muparser (2.3.3-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New upstream release. (Closes: #1000714)
+  * Drop patches - no longer needed with upstream move to cmake.
+  * Update debian/watch and Homepage in debian/control.
+
+ -- Nicholas Breen <nbreen@debian.org>  Sat, 12 Mar 2022 14:13:16 -0800
+
 muparser (2.2.6.1+dfsg-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/control b/debian/control
index f4f7491..8febf57 100644
--- a/debian/control
+++ b/debian/control
@@ -4,12 +4,12 @@ Uploaders: Gudjon I. Gudjonsson <gudjon@gudjon.org>,
            Scott Howard <showard@debian.org>
 Section: libs
 Priority: optional
-Build-Depends: debhelper (>= 12~),
-               automake
+Build-Depends: cmake,
+               debhelper (>= 12~)
 Standards-Version: 4.3.0
 Vcs-Browser: https://salsa.debian.org/science-team/muparser
 Vcs-Git: https://salsa.debian.org/science-team/muparser.git
-Homepage: http://muparser.sourceforge.net
+Homepage: https://beltoforion.de/en/muparser/
 
 Package: libmuparser-dev
 Architecture: any
diff --git a/debian/copyright b/debian/copyright
index 21065bb..3f39d20 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -2,12 +2,9 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: muparser
 Upstream-Contact: Ingo Berg <ingo_berg@gmx.de>
 Source: http://muparser.sourceforge.net
-Files-Excluded: */*.dll
-                */*.lib
-                */vs
 
 Files: *
-Copyright: 2004-2007 Ingo Berg <ingo_berg@gmx.de>
+Copyright: 2004-2022 Ingo Berg <ingo_berg@gmx.de>
 License: Expat
   Permission is hereby granted, free of charge, to any person obtaining a copy
   of this software and associated documentation files (the "Software"), to deal
diff --git a/debian/libmuparser-dev.install b/debian/libmuparser-dev.install
index 7df81cd..f304b9d 100644
--- a/debian/libmuparser-dev.install
+++ b/debian/libmuparser-dev.install
@@ -1,3 +1,4 @@
 usr/include/*
 usr/lib/*/lib*.so
 usr/lib/*/pkgconfig/*
+usr/lib/*/cmake/muparser
diff --git a/debian/patches/FTBFS_hurd.patch b/debian/patches/FTBFS_hurd.patch
deleted file mode 100644
index e603046..0000000
--- a/debian/patches/FTBFS_hurd.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Description: Allow building on hurd
-Author: Scott Howard <showard@debian.org>
-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=533817
-
-Index: muparser/build/autoconf/aclocal.m4
-===================================================================
---- muparser.orig/build/autoconf/aclocal.m4	2013-01-26 23:30:49.773669077 -0500
-+++ muparser/build/autoconf/aclocal.m4	2013-01-26 23:30:53.421669002 -0500
-@@ -1258,7 +1258,7 @@
-       ;;
- 
-       powerpc-apple-macos* | \
--      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \
-+      *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | *-*-gnu* | \
-       *-*-mirbsd* | \
-       *-*-sunos4* | \
-       *-*-osf* | \
-@@ -1309,7 +1309,7 @@
-     SONAME_FLAG=
- 
-     case "${BAKEFILE_HOST}" in
--      *-*-linux* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-+      *-*-linux* | *-*-gnu* | *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | \
-       *-*-k*bsd*-gnu | *-*-mirbsd* )
-         if test "x$SUNCXX" = "xyes"; then
-             SONAME_FLAG="-h "
diff --git a/debian/patches/fix-versionnum.patch b/debian/patches/fix-versionnum.patch
deleted file mode 100644
index 1810865..0000000
--- a/debian/patches/fix-versionnum.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From: Teemu Ikonen <tpikonen@gmail.com>
-      Andreas Tille <tille@debian.org>
-Date: Sun, 13 Jan 2019 18:59:59 +0100
-Subject: [PATCH] Fix version number to 2.2.6 in build system.
-
----
- Makefile.in                 | 4 ++--
- build/autoconf/configure.ac | 2 +-
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 157be77..305167c 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -139,9 +139,9 @@ COND_WINDOWS_IMPLIB_1___muParser_dll___importlib = \
- @COND_USE_SOVERSION_0@__muParser_dll___targetsuf2 = .$(SO_SUFFIX)
- @COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
- @COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@	= \
--@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@	.$(SO_SUFFIX).2.2.4
-+@COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1@	.$(SO_SUFFIX).2.2.6
- @COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
--@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@	= .2.2.4.$(SO_SUFFIX)
-+@COND_PLATFORM_MACOSX_1_USE_SOVERSION_1@	= .2.2.6.$(SO_SUFFIX)
- @COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@__muParser_dll___targetsuf3 \
- @COND_USE_SOVERSION_1_USE_SOVERSOLARIS_1@	= .$(SO_SUFFIX).2
- @COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1@__muParser_dll___targetsuf3 \
-diff --git a/build/autoconf/configure.ac b/build/autoconf/configure.ac
-index 85ddd2a..6333a2b 100644
---- a/build/autoconf/configure.ac
-+++ b/build/autoconf/configure.ac
-@@ -6,7 +6,7 @@
- 
- # NOTE:
- #  the version of the project must be updated also in docs/Doxyfile !
--AC_INIT([muparser], [2.2.4], [muparser@beltoforion.de])
-+AC_INIT([muparser], [2.2.6], [muparser@beltoforion.de])
- 
- AC_PREREQ([2.57])
- AC_CONFIG_AUX_DIR([build/autoconf])
--- 
-2.11.0
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index df9d0cf..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-FTBFS_hurd.patch
-fix-versionnum.patch
diff --git a/debian/rules b/debian/rules
index 20a3f85..43f6419 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,24 +11,6 @@ SAVE_FILES = configure
 %:
 	dh $@
 
-override_dh_update_autotools_config:
-	# Save upstream configs
-	for f in $(SAVE_FILES) ; do                              \
-		if [ ! -f $$f-orig ] ; then mv $$f $$f-orig ; fi \
-	done
-	dh_update_autotools_config
-	bash build/autoconf/acregen.sh
-
-override_dh_auto_configure:
-	dh_auto_configure -- --disable-samples
-
-override_dh_clean:
-	dh_clean
-	# Restore upstream config
-	for f in $(SAVE_FILES) ; do                            \
-		if [ -f $$f-orig ] ; then mv $$f-orig $$f ; fi \
-        done
-
 override_dh_makeshlibs:
 	#pkgkde-symbols helper is managing the symbols file.
 	#Sometimes we'll FTBFS on other arch's toolchains that export or miss
diff --git a/debian/watch b/debian/watch
index ac66e52..c869838 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,4 +1,4 @@
 version=4
 
 opts="repacksuffix=+dfsg,dversionmangle=auto,repack,compression=xz" \
-  https://github.com/beltoforion/muparser/releases/latest .*/archive/v?@ANY_VERSION@@ARCHIVE_EXT@
+  https://github.com/beltoforion/muparser/releases/latest .*/archive/refs/tags/v?@ANY_VERSION@@ARCHIVE_EXT@
diff --git a/docs/muparser_doc.html b/docs/muparser_doc.html
index 09dbba1..c1dcc0c 100644
--- a/docs/muparser_doc.html
+++ b/docs/muparser_doc.html
@@ -6,8 +6,8 @@
 <body style="height:100%; overflow:hidden;"> 
 
   <div style="border: 0px; position:absolute; top:0px; left:0px; width:100%; bottom:0px; padding:0px; margin:0px;"> 
-    <iframe src="http://muparser.beltoforion.de" style="border: 0px; width:100%; height:100%;">
-    Sorry, your browser doesn't support IFrames. Click <a href="http://muparser.beltoforion.de">here</a> to load the muparser documentation directly.
+    <iframe src="https://beltoforion.de/en/muparser" style="border: 0px; width:100%; height:100%;">
+    Sorry, your browser doesn't support IFrames. Click <a href="https://beltoforion.de/en/muparser">here</a> to load the muparser documentation directly.
     </iframe>
   </div>
 </body>
diff --git a/include/muParser.h b/include/muParser.h
index 08d2926..62032aa 100644
--- a/include/muParser.h
+++ b/include/muParser.h
@@ -1,27 +1,31 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #ifndef MU_PARSER_H
 #define MU_PARSER_H
 
@@ -33,82 +37,34 @@
 #include "muParserTemplateMagic.h"
 
 /** \file
-    \brief Definition of the standard floating point parser.
+	\brief Definition of the standard floating point parser.
 */
 
 namespace mu
 {
-  /** \brief Mathematical expressions parser.
-    
-    Standard implementation of the mathematical expressions parser. 
-    Can be used as a reference implementation for subclassing the parser.
-
-    <small>
-    (C) 2011 Ingo Berg<br>
-    muparser(at)beltoforion.de
-    </small>
-  */
-  /* final */ class API_EXPORT_CXX Parser : public ParserBase
-  {
-  public:
-
-    Parser();
-
-    virtual void InitCharSets();
-    virtual void InitFun();
-    virtual void InitConst();
-    virtual void InitOprt();
-    virtual void OnDetectVar(string_type *pExpr, int &nStart, int &nEnd);
-
-    value_type Diff(value_type *a_Var, 
-                    value_type a_fPos, 
-                    value_type a_fEpsilon = 0) const;
-
-  protected:
-
-    // Trigonometric functions
-    static value_type  Sin(value_type);
-    static value_type  Cos(value_type);
-    static value_type  Tan(value_type);
-    static value_type  Tan2(value_type, value_type);
-    // arcus functions
-    static value_type  ASin(value_type);
-    static value_type  ACos(value_type);
-    static value_type  ATan(value_type);
-    static value_type  ATan2(value_type, value_type);
-
-    // hyperbolic functions
-    static value_type  Sinh(value_type);
-    static value_type  Cosh(value_type);
-    static value_type  Tanh(value_type);
-    // arcus hyperbolic functions
-    static value_type  ASinh(value_type);
-    static value_type  ACosh(value_type);
-    static value_type  ATanh(value_type);
-    // Logarithm functions
-    static value_type  Log2(value_type);  // Logarithm Base 2
-    static value_type  Log10(value_type); // Logarithm Base 10
-    static value_type  Ln(value_type);    // Logarithm Base e (natural logarithm)
-    // misc
-    static value_type  Exp(value_type);
-    static value_type  Abs(value_type);
-    static value_type  Sqrt(value_type);
-    static value_type  Rint(value_type);
-    static value_type  Sign(value_type);
-
-    // Prefix operators
-    // !!! Unary Minus is a MUST if you want to use negative signs !!!
-    static value_type  UnaryMinus(value_type);
-    static value_type  UnaryPlus(value_type);
-
-    // Functions with variable number of arguments
-    static value_type Sum(const value_type*, int);  // sum
-    static value_type Avg(const value_type*, int);  // mean value
-    static value_type Min(const value_type*, int);  // minimum
-    static value_type Max(const value_type*, int);  // maximum
-
-    static int IsVal(const char_type* a_szExpr, int *a_iPos, value_type *a_fVal);
-  };
+	/** \brief Mathematical expressions parser.
+
+	  Standard implementation of the mathematical expressions parser.
+	  Can be used as a reference implementation for subclassing the parser.
+	*/
+	class API_EXPORT_CXX Parser : public ParserBase
+	{
+	public:
+
+		Parser();
+
+		void InitCharSets() override;
+		void InitFun() override;
+		void InitConst() override;
+		void InitOprt() override;
+		void OnDetectVar(string_type* pExpr, int& nStart, int& nEnd) override;
+
+		value_type Diff(value_type* a_Var, value_type a_fPos, value_type a_fEpsilon = 0) const;
+
+	protected:
+
+		static int IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal);
+	};
 } // namespace mu
 
 #endif
diff --git a/include/muParserBase.h b/include/muParserBase.h
index d55e115..6d32f2f 100644
--- a/include/muParserBase.h
+++ b/include/muParserBase.h
@@ -1,27 +1,31 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #ifndef MU_PARSER_BASE_H
 #define MU_PARSER_BASE_H
 
@@ -36,281 +40,278 @@
 
 //--- Parser includes --------------------------------------------------------------------------
 #include "muParserDef.h"
-#include "muParserStack.h"
 #include "muParserTokenReader.h"
 #include "muParserBytecode.h"
 #include "muParserError.h"
 
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 4251)  // ...needs to have dll-interface to be used by clients of class ...
+#endif
+
 
 namespace mu
 {
-/** \file
-    \brief This file contains the class definition of the muparser engine.
-*/
+	/** \file
+		\brief This file contains the class definition of the muparser engine.
+	*/
+
+	/** \brief Mathematical expressions parser (base parser engine).
+
+		This is the implementation of a bytecode based mathematical expressions parser.
+		The formula will be parsed from string and converted into a bytecode.
+		Future calculations will be done with the bytecode instead the formula string
+		resulting in a significant performance increase.
+		Complementary to a set of internally implemented functions the parser is able to handle
+		user defined functions and variables.
+	*/
+	class API_EXPORT_CXX ParserBase
+	{
+		friend class ParserTokenReader;
+
+	private:
+
+		/** \brief Typedef for the parse functions.
+
+		  The parse function do the actual work. The parser exchanges
+		  the function pointer to the parser function depending on
+		  which state it is in. (i.e. bytecode parser vs. string parser)
+		*/
+		typedef value_type(ParserBase::* ParseFunction)() const;
+
+		/** \brief Type used for storing an array of values. */
+		typedef std::vector<value_type> valbuf_type;
+
+		/** \brief Type for a vector of strings. */
+		typedef std::vector<string_type> stringbuf_type;
+
+		/** \brief Typedef for the token reader. */
+		typedef ParserTokenReader token_reader_type;
+
+		/** \brief Type used for parser tokens. */
+		typedef ParserToken<value_type, string_type> token_type;
+
+		/** \brief Maximum number of threads spawned by OpenMP when using the bulk mode. */
+		static const int s_MaxNumOpenMPThreads;
+
+	public:
+
+		/** \brief Type of the error class.
+
+		  Included for backwards compatibility.
+		*/
+		typedef ParserError exception_type;
+
+		static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
+
+		ParserBase();
+		ParserBase(const ParserBase& a_Parser);
+		ParserBase& operator=(const ParserBase& a_Parser);
+
+		virtual ~ParserBase();
+
+		value_type Eval() const;
+		value_type* Eval(int& nStackSize) const;
+		void Eval(value_type* results, int nBulkSize);
+
+		int GetNumResults() const;
+
+		void SetExpr(const string_type& a_sExpr);
+		void SetVarFactory(facfun_type a_pFactory, void* pUserData = nullptr);
+
+		void SetDecSep(char_type cDecSep);
+		void SetThousandsSep(char_type cThousandsSep = 0);
+		void ResetLocale();
+
+		void EnableOptimizer(bool a_bIsOn = true);
+		void EnableBuiltInOprt(bool a_bIsOn = true);
+
+		bool HasBuiltInOprt() const;
+		void AddValIdent(identfun_type a_pCallback);
+
+		/** \fn void mu::ParserBase::DefineFun(const string_type &a_strName, fun_type0 a_pFun, bool a_bAllowOpt = true)
+			\brief Define a parser function without arguments.
+			\param a_strName Name of the function
+			\param a_pFun Pointer to the callback function
+			\param a_bAllowOpt A flag indicating this function may be optimized
+		*/
+		template<typename T>
+		void DefineFun(const string_type& a_strName, T a_pFun, bool a_bAllowOpt = true)
+		{
+			AddCallback(a_strName, ParserCallback(a_pFun, a_bAllowOpt), m_FunDef, ValidNameChars());
+		}
+
+		/** \fn void mu::ParserBase::DefineFunUserData
+			\brief Define a parser function with user data (not null).
+			\param a_strName Name of the function
+			\param a_pFun Pointer to the callback function
+			\param a_pUserData Pointer that will be passed back to callback (shall not be nullptr)
+			\param a_bAllowOpt A flag indicating this function may be optimized
+		*/
+		template<typename T>
+		void DefineFunUserData(const string_type& a_strName, T a_pFun, void* a_pUserData, bool a_bAllowOpt = true)
+		{
+			AddCallback(a_strName, ParserCallback(a_pFun, a_pUserData, a_bAllowOpt), m_FunDef, ValidNameChars());
+		}
+
+		void DefineOprt(const string_type& a_strName, fun_type2 a_pFun, unsigned a_iPri = 0, EOprtAssociativity a_eAssociativity = oaLEFT, bool a_bAllowOpt = false);
+		void DefineConst(const string_type& a_sName, value_type a_fVal);
+		void DefineStrConst(const string_type& a_sName, const string_type& a_strVal);
+		void DefineVar(const string_type& a_sName, value_type* a_fVar);
+		void DefinePostfixOprt(const string_type& a_strFun, fun_type1 a_pOprt, bool a_bAllowOpt = true);
+		void DefineInfixOprt(const string_type& a_strName, fun_type1 a_pOprt, int a_iPrec = prINFIX, bool a_bAllowOpt = true);
+
+		// Clear user defined variables, constants or functions
+		void ClearVar();
+		void ClearFun();
+		void ClearConst();
+		void ClearInfixOprt();
+		void ClearPostfixOprt();
+		void ClearOprt();
+
+		void RemoveVar(const string_type& a_strVarName);
+		const varmap_type& GetUsedVar() const;
+		const varmap_type& GetVar() const;
+		const valmap_type& GetConst() const;
+		const string_type& GetExpr() const;
+		const funmap_type& GetFunDef() const;
+		string_type GetVersion(EParserVersionInfo eInfo = pviFULL) const;
+		const ParserByteCode& GetByteCode() const;
+
+		const char_type** GetOprtDef() const;
+		void DefineNameChars(const char_type* a_szCharset);
+		void DefineOprtChars(const char_type* a_szCharset);
+		void DefineInfixOprtChars(const char_type* a_szCharset);
+
+		const char_type* ValidNameChars() const;
+		const char_type* ValidOprtChars() const;
+		const char_type* ValidInfixOprtChars() const;
+
+		void SetArgSep(char_type cArgSep);
+		char_type GetArgSep() const;
+
+	protected:
+
+		void Init();
+		void Error(EErrorCodes a_iErrc, int a_iPos = static_cast<int>(mu::string_type::npos), const string_type& a_strTok = string_type()) const;
+
+		virtual void InitCharSets() = 0;
+		virtual void InitFun() = 0;
+		virtual void InitConst() = 0;
+		virtual void InitOprt() = 0;
+
+		virtual void OnDetectVar(string_type* pExpr, int& nStart, int& nEnd);
+
+		static const char_type* c_DefaultOprt[];
+		static std::locale s_locale;  ///< The locale used by the parser
+		static bool g_DbgDumpCmdCode;
+		static bool g_DbgDumpStack;
+
+		/** \brief A facet class used to change decimal and thousands separator. */
+		template<class TChar>
+		class change_dec_sep : public std::numpunct<TChar>
+		{
+		public:
+
+			explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)
+				:std::numpunct<TChar>()
+				,m_nGroup(nGroup)
+				,m_cDecPoint(cDecSep)
+				,m_cThousandsSep(cThousandsSep)
+			{}
+
+		protected:
+
+			char_type do_decimal_point() const override
+			{
+				return m_cDecPoint;
+			}
+
+			char_type do_thousands_sep() const override
+			{
+				return m_cThousandsSep;
+			}
+
+			std::string do_grouping() const override
+			{
+				// fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4
+				// courtesy of Jens Bartsch
+				// original code:
+				//        return std::string(1, (char)m_nGroup); 
+				// new code:
+				return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
+			}
+
+		private:
+
+			int m_nGroup;
+			char_type m_cDecPoint;
+			char_type m_cThousandsSep;
+		};
+
+	private:
+
+		void Assign(const ParserBase& a_Parser);
+		void InitTokenReader();
+		void ReInit() const;
+
+		void AddCallback(const string_type& a_strName, const ParserCallback& a_Callback, funmap_type& a_Storage, const char_type* a_szCharSet);
+		void ApplyRemainingOprt(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const;
+		void ApplyBinOprt(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const;
+		void ApplyIfElse(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const;
+		void ApplyFunc(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal, int iArgCount) const;
+
+		token_type ApplyStrFunc(const token_type& a_FunTok, const std::vector<token_type>& a_vArg) const;
+
+		int GetOprtPrecedence(const token_type& a_Tok) const;
+		EOprtAssociativity GetOprtAssociativity(const token_type& a_Tok) const;
+
+		void CreateRPN() const;
+
+		value_type ParseString() const;
+		value_type ParseCmdCode() const;
+		value_type ParseCmdCodeShort() const;
+		value_type ParseCmdCodeBulk(int nOffset, int nThreadID) const;
+
+		void  CheckName(const string_type& a_strName, const string_type& a_CharSet) const;
+		void  CheckOprt(const string_type& a_sName, const ParserCallback& a_Callback, const string_type& a_szCharSet) const;
 
-//--------------------------------------------------------------------------------------------------
-/** \brief Mathematical expressions parser (base parser engine).
-    \author (C) 2013 Ingo Berg
+		void StackDump(const std::stack<token_type >& a_stVal, const std::stack<token_type >& a_stOprt) const;
 
-  This is the implementation of a bytecode based mathematical expressions parser. 
-  The formula will be parsed from string and converted into a bytecode. 
-  Future calculations will be done with the bytecode instead the formula string
-  resulting in a significant performance increase. 
-  Complementary to a set of internally implemented functions the parser is able to handle 
-  user defined functions and variables. 
-*/
-class API_EXPORT_CXX ParserBase
-{
-friend class ParserTokenReader;
-
-private:
-
-    /** \brief Typedef for the parse functions. 
-    
-      The parse function do the actual work. The parser exchanges
-      the function pointer to the parser function depending on 
-      which state it is in. (i.e. bytecode parser vs. string parser)
-    */
-    typedef value_type (ParserBase::*ParseFunction)() const;  
-
-    /** \brief Type used for storing an array of values. */
-    typedef std::vector<value_type> valbuf_type;
-
-    /** \brief Type for a vector of strings. */
-    typedef std::vector<string_type> stringbuf_type;
-
-    /** \brief Typedef for the token reader. */
-    typedef ParserTokenReader token_reader_type;
-    
-    /** \brief Type used for parser tokens. */
-    typedef ParserToken<value_type, string_type> token_type;
-
-    /** \brief Maximum number of threads spawned by OpenMP when using the bulk mode. */
-    static const int s_MaxNumOpenMPThreads;
-
- public:
-
-    /** \brief Type of the error class. 
-    
-      Included for backwards compatibility.
-    */
-    typedef ParserError exception_type;
-
-    static void EnableDebugDump(bool bDumpCmd, bool bDumpStack);
-
-    ParserBase(); 
-    ParserBase(const ParserBase &a_Parser);
-    ParserBase& operator=(const ParserBase &a_Parser);
-
-    virtual ~ParserBase();
-    
-	  value_type  Eval() const;
-    value_type* Eval(int &nStackSize) const;
-    void Eval(value_type *results, int nBulkSize);
-
-    int GetNumResults() const;
-
-    void SetExpr(const string_type &a_sExpr);
-    void SetVarFactory(facfun_type a_pFactory, void *pUserData = NULL);
-
-    void SetDecSep(char_type cDecSep);
-    void SetThousandsSep(char_type cThousandsSep = 0);
-    void ResetLocale();
-
-    void EnableOptimizer(bool a_bIsOn=true);
-    void EnableBuiltInOprt(bool a_bIsOn=true);
-
-    bool HasBuiltInOprt() const;
-    void AddValIdent(identfun_type a_pCallback);
-
-    /** \fn void mu::ParserBase::DefineFun(const string_type &a_strName, fun_type0 a_pFun, bool a_bAllowOpt = true) 
-        \brief Define a parser function without arguments.
-        \param a_strName Name of the function
-        \param a_pFun Pointer to the callback function
-        \param a_bAllowOpt A flag indicating this function may be optimized
-    */
-    template<typename T>
-    void DefineFun(const string_type &a_strName, T a_pFun, bool a_bAllowOpt = true)
-    {
-      AddCallback( a_strName, ParserCallback(a_pFun, a_bAllowOpt), m_FunDef, ValidNameChars() );
-    }
-
-    void DefineOprt(const string_type &a_strName, 
-                    fun_type2 a_pFun, 
-                    unsigned a_iPri=0, 
-                    EOprtAssociativity a_eAssociativity = oaLEFT,
-                    bool a_bAllowOpt = false);
-    void DefineConst(const string_type &a_sName, value_type a_fVal);
-    void DefineStrConst(const string_type &a_sName, const string_type &a_strVal);
-    void DefineVar(const string_type &a_sName, value_type *a_fVar);
-    void DefinePostfixOprt(const string_type &a_strFun, fun_type1 a_pOprt, bool a_bAllowOpt=true);
-    void DefineInfixOprt(const string_type &a_strName, fun_type1 a_pOprt, int a_iPrec=prINFIX, bool a_bAllowOpt=true);
-
-    // Clear user defined variables, constants or functions
-    void ClearVar();
-    void ClearFun();
-    void ClearConst();
-    void ClearInfixOprt();
-    void ClearPostfixOprt();
-    void ClearOprt();
-    
-    void RemoveVar(const string_type &a_strVarName);
-    const varmap_type& GetUsedVar() const;
-    const varmap_type& GetVar() const;
-    const valmap_type& GetConst() const;
-    const string_type& GetExpr() const;
-    const funmap_type& GetFunDef() const;
-    string_type GetVersion(EParserVersionInfo eInfo = pviFULL) const;
-
-    const char_type ** GetOprtDef() const;
-    void DefineNameChars(const char_type *a_szCharset);
-    void DefineOprtChars(const char_type *a_szCharset);
-    void DefineInfixOprtChars(const char_type *a_szCharset);
-
-    const char_type* ValidNameChars() const;
-    const char_type* ValidOprtChars() const;
-    const char_type* ValidInfixOprtChars() const;
-
-    void SetArgSep(char_type cArgSep);
-    char_type GetArgSep() const;
-    
-    void  Error(EErrorCodes a_iErrc, 
-                int a_iPos = (int)mu::string_type::npos, 
-                const string_type &a_strTok = string_type() ) const;
-
- protected:
-	  
-    void Init();
-
-    virtual void InitCharSets() = 0;
-    virtual void InitFun() = 0;
-    virtual void InitConst() = 0;
-    virtual void InitOprt() = 0; 
-
-    virtual void OnDetectVar(string_type *pExpr, int &nStart, int &nEnd);
-
-    static const char_type *c_DefaultOprt[]; 
-    static std::locale s_locale;  ///< The locale used by the parser
-    static bool g_DbgDumpCmdCode;
-    static bool g_DbgDumpStack;
-
-    /** \brief A facet class used to change decimal and thousands separator. */
-    template<class TChar>
-    class change_dec_sep : public std::numpunct<TChar>
-    {
-    public:
-      
-      explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)
-        :std::numpunct<TChar>()
-        ,m_nGroup(nGroup)
-        ,m_cDecPoint(cDecSep)
-        ,m_cThousandsSep(cThousandsSep)
-      {}
-      
-    protected:
-      
-      virtual char_type do_decimal_point() const
-      {
-        return m_cDecPoint;
-      }
-
-      virtual char_type do_thousands_sep() const
-      {
-        return m_cThousandsSep;
-      }
-
-      virtual std::string do_grouping() const 
-      { 
-		// fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4
-		// courtesy of Jens Bartsch
-		// original code:
-		//        return std::string(1, (char)m_nGroup); 
-		// new code:
-		return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
-      }
-
-    private:
-
-      int m_nGroup;
-      char_type m_cDecPoint;  
-      char_type m_cThousandsSep;
-    };
-
- private:
-
-    void Assign(const ParserBase &a_Parser);
-    void InitTokenReader();
-    void ReInit() const;
-
-    void AddCallback( const string_type &a_strName, 
-                      const ParserCallback &a_Callback, 
-                      funmap_type &a_Storage,
-                      const char_type *a_szCharSet );
-
-    void ApplyRemainingOprt(ParserStack<token_type> &a_stOpt,
-                                ParserStack<token_type> &a_stVal) const;
-    void ApplyBinOprt(ParserStack<token_type> &a_stOpt,
-                      ParserStack<token_type> &a_stVal) const;
-
-    void ApplyIfElse(ParserStack<token_type> &a_stOpt,
-                     ParserStack<token_type> &a_stVal) const;
-
-    void ApplyFunc(ParserStack<token_type> &a_stOpt,
-                   ParserStack<token_type> &a_stVal, 
-                   int iArgCount) const; 
-
-    token_type ApplyStrFunc(const token_type &a_FunTok,
-                            const std::vector<token_type> &a_vArg) const;
-
-    int GetOprtPrecedence(const token_type &a_Tok) const;
-    EOprtAssociativity GetOprtAssociativity(const token_type &a_Tok) const;
-
-    void CreateRPN() const;
-
-    value_type ParseString() const; 
-    value_type ParseCmdCode() const;
-    value_type ParseCmdCodeBulk(int nOffset, int nThreadID) const;
-
-    void  CheckName(const string_type &a_strName, const string_type &a_CharSet) const;
-    void  CheckOprt(const string_type &a_sName,
-                    const ParserCallback &a_Callback,
-                    const string_type &a_szCharSet) const;
-
-    void StackDump(const ParserStack<token_type > &a_stVal, 
-                   const ParserStack<token_type > &a_stOprt) const;
-
-    /** \brief Pointer to the parser function. 
-    
-      Eval() calls the function whose address is stored there.
-    */
-    mutable ParseFunction  m_pParseFormula;
-    mutable ParserByteCode m_vRPN;        ///< The Bytecode class.
-    mutable stringbuf_type  m_vStringBuf; ///< String buffer, used for storing string function arguments
-    stringbuf_type  m_vStringVarBuf;
-
-    std::unique_ptr<token_reader_type> m_pTokenReader; ///< Managed pointer to the token reader object.
-
-    funmap_type  m_FunDef;         ///< Map of function names and pointers.
-    funmap_type  m_PostOprtDef;    ///< Postfix operator callbacks
-    funmap_type  m_InfixOprtDef;   ///< unary infix operator.
-    funmap_type  m_OprtDef;        ///< Binary operator callbacks
-    valmap_type  m_ConstDef;       ///< user constants.
-    strmap_type  m_StrVarDef;      ///< user defined string constants
-    varmap_type  m_VarDef;         ///< user defind variables.
-
-    bool m_bBuiltInOp;             ///< Flag that can be used for switching built in operators on and off
-
-    string_type m_sNameChars;      ///< Charset for names
-    string_type m_sOprtChars;      ///< Charset for postfix/ binary operator tokens
-    string_type m_sInfixOprtChars; ///< Charset for infix operator tokens
-    
-    mutable int m_nIfElseCounter;  ///< Internal counter for keeping track of nested if-then-else clauses
-
-    // items merely used for caching state information
-    mutable valbuf_type m_vStackBuffer; ///< This is merely a buffer used for the stack in the cmd parsing routine
-    mutable int m_nFinalResultIdx;
-};
+		/** \brief Pointer to the parser function.
+
+		  Eval() calls the function whose address is stored there.
+		*/
+		mutable ParseFunction  m_pParseFormula;
+		mutable ParserByteCode m_vRPN;        ///< The Bytecode class.
+		mutable stringbuf_type  m_vStringBuf; ///< String buffer, used for storing string function arguments
+		stringbuf_type  m_vStringVarBuf;
+
+		std::unique_ptr<token_reader_type> m_pTokenReader; ///< Managed pointer to the token reader object.
+
+		funmap_type  m_FunDef;         ///< Map of function names and pointers.
+		funmap_type  m_PostOprtDef;    ///< Postfix operator callbacks
+		funmap_type  m_InfixOprtDef;   ///< unary infix operator.
+		funmap_type  m_OprtDef;        ///< Binary operator callbacks
+		valmap_type  m_ConstDef;       ///< user constants.
+		strmap_type  m_StrVarDef;      ///< user defined string constants
+		varmap_type  m_VarDef;         ///< user defind variables.
+
+		bool m_bBuiltInOp;             ///< Flag that can be used for switching built in operators on and off
+
+		string_type m_sNameChars;      ///< Charset for names
+		string_type m_sOprtChars;      ///< Charset for postfix/ binary operator tokens
+		string_type m_sInfixOprtChars; ///< Charset for infix operator tokens
+
+		// items merely used for caching state information
+		mutable valbuf_type m_vStackBuffer; ///< This is merely a buffer used for the stack in the cmd parsing routine
+		mutable int m_nFinalResultIdx;
+	};
 
 } // namespace mu
 
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
+
 #endif
diff --git a/include/muParserBytecode.h b/include/muParserBytecode.h
index 33e3c26..cf16e20 100644
--- a/include/muParserBytecode.h
+++ b/include/muParserBytecode.h
@@ -1,31 +1,34 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #ifndef MU_PARSER_BYTECODE_H
 #define MU_PARSER_BYTECODE_H
 
-#include <cassert>
 #include <string>
 #include <stack>
 #include <vector>
@@ -35,104 +38,112 @@
 #include "muParserToken.h"
 
 /** \file
-    \brief Definition of the parser bytecode class.
+	\brief Definition of the parser bytecode class.
 */
 
 
 namespace mu
 {
-  struct SToken
-  {
-    ECmdCode Cmd;
-    int StackPos;
-
-    union
-    {
-      struct //SValData
-      {
-        value_type *ptr;
-        value_type  data;
-        value_type  data2;
-      } Val;
-
-      struct //SFunData
-      {
-        // Note: generic_fun_type is merely a placeholder. The real type could be 
-        //       anything between gun_type1 and fun_type9. I can't use a void
-        //       pointer due to constraints in the ANSI standard which allows
-        //       data pointers and function pointers to differ in size.
-        generic_fun_type ptr;
-        int   argc;
-        int   idx;
-      } Fun;
-
-      struct //SOprtData
-      {
-        value_type *ptr;
-        int offset;
-      } Oprt;
-    };
-  };
-  
-  
-  /** \brief Bytecode implementation of the Math Parser.
-
-  The bytecode contains the formula converted to revers polish notation stored in a continious
-  memory area. Associated with this data are operator codes, variable pointers, constant 
-  values and function pointers. Those are necessary in order to calculate the result.
-  All those data items will be casted to the underlying datatype of the bytecode.
-
-  \author (C) 2004-2013 Ingo Berg 
-*/
-class ParserByteCode
-{
-private:
-
-    /** \brief Token type for internal use only. */
-    typedef ParserToken<value_type, string_type> token_type;
-
-    /** \brief Token vector for storing the RPN. */
-    typedef std::vector<SToken> rpn_type;
-
-    /** \brief Position in the Calculation array. */
-    unsigned m_iStackPos;
-
-    /** \brief Maximum size needed for the stack. */
-    std::size_t m_iMaxStackSize;
-    
-    /** \brief The actual rpn storage. */
-    rpn_type  m_vRPN;
-
-    bool m_bEnableOptimizer;
-
-    void ConstantFolding(ECmdCode a_Oprt);
-
-public:
-
-    ParserByteCode();
-    ParserByteCode(const ParserByteCode &a_ByteCode);
-    ParserByteCode& operator=(const ParserByteCode &a_ByteCode);
-    void Assign(const ParserByteCode &a_ByteCode);
-
-    void AddVar(value_type *a_pVar);
-    void AddVal(value_type a_fVal);
-    void AddOp(ECmdCode a_Oprt);
-    void AddIfElse(ECmdCode a_Oprt);
-    void AddAssignOp(value_type *a_pVar);
-    void AddFun(generic_fun_type a_pFun, int a_iArgc);
-    void AddBulkFun(generic_fun_type a_pFun, int a_iArgc);
-    void AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx);
-
-    void EnableOptimizer(bool bStat);
-
-    void Finalize();
-    void clear();
-    std::size_t GetMaxStackSize() const;
-    std::size_t GetSize() const;
-
-    const SToken* GetBase() const;
-    void AsciiDump();
-};
+	struct SToken
+	{
+		ECmdCode Cmd;
+
+		union
+		{
+			struct // SValData
+			{
+				value_type* ptr;
+				value_type  data;
+				value_type  data2;
+			} Val;
+
+			struct // SFunData
+			{
+				// Note: the type is erased in generic_callable_type and the signature of the
+				//       function to call is tracked elsewhere in regard with the number of
+				//       parameters (args) and the general kind of function (Cmd: cmFUNC,
+				//       cmFUNC_STR, or cmFUNC_BULK)
+				generic_callable_type cb;
+				int   argc;
+				int   idx;
+			} Fun;
+
+			struct // SOprtData
+			{
+				value_type* ptr;
+				int offset;
+			} Oprt;
+		};
+	};
+
+
+	/** \brief Bytecode implementation of the Math Parser.
+
+		The bytecode contains the formula converted to revers polish notation stored in a continious
+		memory area. Associated with this data are operator codes, variable pointers, constant
+		values and function pointers. Those are necessary in order to calculate the result.
+		All those data items will be casted to the underlying datatype of the bytecode.
+	*/
+	class ParserByteCode final
+	{
+	private:
+
+		/** \brief Token type for internal use only. */
+		typedef ParserToken<value_type, string_type> token_type;
+
+		/** \brief Token vector for storing the RPN. */
+		typedef std::vector<SToken> rpn_type;
+
+		/** \brief Position in the Calculation array. */
+		unsigned m_iStackPos;
+
+		/** \brief Maximum size needed for the stack. */
+		std::size_t m_iMaxStackSize;
+
+		/** \brief The actual rpn storage. */
+		rpn_type  m_vRPN;
+
+		bool m_bEnableOptimizer;
+
+		void ConstantFolding(ECmdCode a_Oprt);
+
+	public:
+
+		ParserByteCode();
+		ParserByteCode(const ParserByteCode& a_ByteCode);
+		ParserByteCode& operator=(const ParserByteCode& a_ByteCode);
+		void Assign(const ParserByteCode& a_ByteCode);
+
+		void AddVar(value_type* a_pVar);
+		void AddVal(value_type a_fVal);
+		void AddOp(ECmdCode a_Oprt);
+		void AddIfElse(ECmdCode a_Oprt);
+		void AddAssignOp(value_type* a_pVar);
+		void AddFun(generic_callable_type a_pFun, int a_iArgc, bool isOptimizable);
+		void AddBulkFun(generic_callable_type a_pFun, int a_iArgc);
+		void AddStrFun(generic_callable_type a_pFun, int a_iArgc, int a_iIdx);
+
+		void EnableOptimizer(bool bStat);
+
+		void Finalize();
+		void clear();
+		std::size_t GetMaxStackSize() const;
+
+		std::size_t GetSize() const
+		{
+			return m_vRPN.size();
+		}
+
+		inline const SToken* GetBase() const
+		{
+			if (m_vRPN.size() == 0)
+				throw ParserError(ecINTERNAL_ERROR);
+			else
+				return &m_vRPN[0];
+		}
+
+		void AsciiDump();
+	};
 
 } // namespace mu
 
diff --git a/include/muParserCallback.h b/include/muParserCallback.h
index 81ec3eb..1e53f14 100644
--- a/include/muParserCallback.h
+++ b/include/muParserCallback.h
@@ -1,116 +1,159 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2022 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+
 #ifndef MU_PARSER_CALLBACK_H
 #define MU_PARSER_CALLBACK_H
 
 #include "muParserDef.h"
 
 /** \file
-    \brief Definition of the parser callback class.
+	\brief Definition of the parser callback class.
 */
 
 namespace mu
 {
 
-/** \brief Encapsulation of prototypes for a numerical parser function.
-
-    Encapsulates the prototyp for numerical parser functions. The class
-    stores the number of arguments for parser functions as well
-    as additional flags indication the function is non optimizeable.
-    The pointer to the callback function pointer is stored as void* 
-    and needs to be casted according to the argument count.
-    Negative argument counts indicate a parser function with a variable number
-    of arguments. 
-
-    \author (C) 2004-2011 Ingo Berg
-*/
-class API_EXPORT_CXX ParserCallback
-{
-public:
-    ParserCallback(fun_type0  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type1  a_pFun, bool a_bAllowOpti, int a_iPrec = -1, ECmdCode a_iCode=cmFUNC);
-    ParserCallback(fun_type2  a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity);
-    ParserCallback(fun_type2  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type3  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type4  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type5  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type6  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type7  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type8  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type9  a_pFun, bool a_bAllowOpti);
-    ParserCallback(fun_type10 a_pFun, bool a_bAllowOpti);
-
-    ParserCallback(bulkfun_type0  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type1  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type2  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type3  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type4  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type5  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type6  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type7  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type8  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type9  a_pFun, bool a_bAllowOpti);
-    ParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti);
-
-    ParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
-    ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
-    ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
-    ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
-    ParserCallback();
-    ParserCallback(const ParserCallback &a_Fun);
-    
-    ParserCallback* Clone() const;
-
-    bool  IsOptimizable() const;
-    void* GetAddr() const;
-    ECmdCode  GetCode() const;
-    ETypeCode GetType() const;
-    int GetPri()  const;
-    EOprtAssociativity GetAssociativity() const;
-    int GetArgc() const;
-
-private:
-    void *m_pFun;                   ///< Pointer to the callback function, casted to void
-    
-    /** \brief Number of numeric function arguments
-    
-        This number is negative for functions with variable number of arguments. in this cases
-        they represent the actual number of arguments found.
-    */
-    int   m_iArgc;      
-    int   m_iPri;                   ///< Valid only for binary and infix operators; Operator precedence.
-    EOprtAssociativity m_eOprtAsct; ///< Operator associativity; Valid only for binary operators 
-    ECmdCode  m_iCode;
-    ETypeCode m_iType;
-    bool  m_bAllowOpti;             ///< Flag indication optimizeability 
-};
-
-//------------------------------------------------------------------------------
-/** \brief Container for Callback objects. */
-typedef std::map<string_type, ParserCallback> funmap_type; 
+	/** \brief Encapsulation of prototypes for a numerical parser function.
+
+		Encapsulates the prototyp for numerical parser functions. The class
+		stores the number of arguments for parser functions as well
+		as additional flags indication the function is non optimizeable.
+		The pointer to the callback function pointer is stored as void*
+		and needs to be casted according to the argument count.
+		Negative argument counts indicate a parser function with a variable number
+		of arguments.
+	*/
+	class API_EXPORT_CXX ParserCallback final
+	{
+	public:
+		ParserCallback(fun_type0  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type1  a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode);
+		ParserCallback(fun_type1  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type2  a_pFun, bool a_bAllowOpti, int a_iPrec, EOprtAssociativity a_eAssociativity);
+		ParserCallback(fun_type2  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type3  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type4  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type5  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type6  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type7  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type8  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type9  a_pFun, bool a_bAllowOpti);
+		ParserCallback(fun_type10 a_pFun, bool a_bAllowOpti);
+
+		ParserCallback(bulkfun_type0  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type1  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type2  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type3  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type4  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type5  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type6  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type7  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type8  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type9  a_pFun, bool a_bAllowOpti);
+		ParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti);
+
+		ParserCallback(multfun_type a_pFun, bool a_bAllowOpti);
+
+		ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti);
+		ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti);
+		ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti);
+		ParserCallback(strfun_type4 a_pFun, bool a_bAllowOpti);
+		ParserCallback(strfun_type5 a_pFun, bool a_bAllowOpti);
+		ParserCallback(strfun_type6 a_pFun, bool a_bAllowOpti);
+
+		// note: a_pUserData shall not be nullptr
+		ParserCallback(fun_userdata_type0  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type1  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type2  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type3  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type4  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type5  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type6  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type7  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type8  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type9  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(fun_userdata_type10 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+
+		ParserCallback(bulkfun_userdata_type0  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type1  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type2  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type3  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type4  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type5  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type6  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type7  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type8  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type9  a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(bulkfun_userdata_type10 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+
+		ParserCallback(multfun_userdata_type a_pFun, void* a_pUserData, bool a_bAllowOpti);
+
+		ParserCallback(strfun_userdata_type1 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(strfun_userdata_type2 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(strfun_userdata_type3 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(strfun_userdata_type4 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(strfun_userdata_type5 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+		ParserCallback(strfun_userdata_type6 a_pFun, void* a_pUserData, bool a_bAllowOpti);
+
+		ParserCallback();
+		ParserCallback(const ParserCallback& a_Fun);
+		ParserCallback & operator=(const ParserCallback& a_Fun);
+		~ParserCallback();
+
+		ParserCallback* Clone() const;
+
+		bool  IsOptimizable() const;
+		bool  IsValid() const;
+		void* GetAddr() const;
+		void* GetUserData() const;
+		ECmdCode  GetCode() const;
+		ETypeCode GetType() const;
+		int GetPri()  const;
+		EOprtAssociativity GetAssociativity() const;
+		int GetArgc() const;
+
+	private:
+		void Assign(const ParserCallback& ref);
+
+		void* m_pFun;                   ///< Pointer to the callback function or internal data, casted to void
+
+		int   m_iArgc;                  ///< Internal representation of number of numeric function arguments
+		int   m_iPri;                   ///< Valid only for binary and infix operators; Operator precedence.
+		EOprtAssociativity m_eOprtAsct; ///< Operator associativity; Valid only for binary operators 
+		ECmdCode  m_iCode;
+		ETypeCode m_iType;
+		bool  m_bAllowOpti;             ///< Flag indication optimizeability 
+	};
+
+
+	/** \brief Container for Callback objects. */
+	typedef std::map<string_type, ParserCallback> funmap_type;
 
 } // namespace mu
 
diff --git a/include/muParserDLL.h b/include/muParserDLL.h
index 2c45b6d..00eea9f 100644
--- a/include/muParserDLL.h
+++ b/include/muParserDLL.h
@@ -1,27 +1,31 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #ifndef MU_PARSER_DLL_H
 #define MU_PARSER_DLL_H
 
@@ -32,198 +36,270 @@ extern "C"
 {
 #endif
 
-/** \file 
-    \brief This file contains the DLL interface of muparser.
-*/
+	/** \file
+		\brief This file contains the DLL interface of muparser.
+	*/
 
-// Basic types
-typedef void*  muParserHandle_t;    // parser handle
+	// Basic types
+	typedef void* muParserHandle_t;    // parser handle
 
 #ifndef _UNICODE
-    typedef char   muChar_t;            // character type
+	typedef char   muChar_t;            // character type
 #else
-    typedef wchar_t   muChar_t;            // character type
+	typedef wchar_t   muChar_t;            // character type
 #endif
 
-typedef int    muBool_t;            // boolean type
-typedef int    muInt_t;             // integer type 
-typedef double muFloat_t;           // floating point type
-
-// function types for calculation
-typedef muFloat_t (*muFun0_t )(); 
-typedef muFloat_t (*muFun1_t )(muFloat_t); 
-typedef muFloat_t (*muFun2_t )(muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun3_t )(muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun4_t )(muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun5_t )(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun6_t )(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun7_t )(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun8_t )(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun9_t )(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muFun10_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-
-// Function prototypes for bulkmode functions
-typedef muFloat_t (*muBulkFun0_t )(int, int); 
-typedef muFloat_t (*muBulkFun1_t )(int, int, muFloat_t); 
-typedef muFloat_t (*muBulkFun2_t )(int, int, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun3_t )(int, int, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun4_t )(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun5_t )(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun6_t )(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun7_t )(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun8_t )(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun9_t )(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-typedef muFloat_t (*muBulkFun10_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t); 
-
-typedef muFloat_t (*muMultFun_t)(const muFloat_t*, muInt_t);
-typedef muFloat_t (*muStrFun1_t)(const muChar_t*);
-typedef muFloat_t (*muStrFun2_t)(const muChar_t*, muFloat_t);
-typedef muFloat_t (*muStrFun3_t)(const muChar_t*, muFloat_t, muFloat_t);
-
-// Functions for parser management
-typedef void (*muErrorHandler_t)(muParserHandle_t a_hParser);           // [optional] callback to an error handler
-typedef muFloat_t* (*muFacFun_t)(const muChar_t*, void*);               // [optional] callback for creating new variables
-typedef muInt_t (*muIdentFun_t)(const muChar_t*, muInt_t*, muFloat_t*); // [optional] value identification callbacks
-
-//-----------------------------------------------------------------------------------------------------
-// Constants
-static const int muOPRT_ASCT_LEFT  = 0;
-static const int muOPRT_ASCT_RIGHT = 1;
-
-static const int muBASETYPE_FLOAT  = 0;
-static const int muBASETYPE_INT    = 1;
-
-//-----------------------------------------------------------------------------------------------------
-//
-//
-// muParser C compatible bindings
-//
-//
-//-----------------------------------------------------------------------------------------------------
-
-
-// Basic operations / initialization  
-API_EXPORT(muParserHandle_t) mupCreate(int nBaseType);
-API_EXPORT(void) mupRelease(muParserHandle_t a_hParser);
-API_EXPORT(const muChar_t*) mupGetExpr(muParserHandle_t a_hParser);
-API_EXPORT(void) mupSetExpr(muParserHandle_t a_hParser, const muChar_t *a_szExpr);
-API_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void* pUserData);
-API_EXPORT(const muChar_t*) mupGetVersion(muParserHandle_t a_hParser);
-API_EXPORT(muFloat_t) mupEval(muParserHandle_t a_hParser);
-API_EXPORT(muFloat_t*) mupEvalMulti(muParserHandle_t a_hParser, int *nNum);
-API_EXPORT(void) mupEvalBulk(muParserHandle_t a_hParser, muFloat_t *a_fResult, int nSize);
-
-// Defining callbacks / variables / constants
-API_EXPORT(void) mupDefineFun0(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun0_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun1_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun2_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun3_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun4_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun5_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun6(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun6_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun7(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun7_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun8(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun8_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun9(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun9_t a_pFun, muBool_t a_bOptimize);
-API_EXPORT(void) mupDefineFun10(muParserHandle_t a_hParser, const muChar_t *a_szName, muFun10_t a_pFun, muBool_t a_bOptimize);
-
-// Defining bulkmode functions
-API_EXPORT(void) mupDefineBulkFun0(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun0_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun1(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun1_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun2(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun2_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun3(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun3_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun4(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun4_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun5(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun5_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun6(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun6_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun7(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun7_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun8(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun8_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun9(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun9_t a_pFun);
-API_EXPORT(void) mupDefineBulkFun10(muParserHandle_t a_hParser, const muChar_t *a_szName, muBulkFun10_t a_pFun);
-
-// string functions
-API_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser, const muChar_t *a_szName, muStrFun1_t a_pFun);
-API_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser, const muChar_t *a_szName, muStrFun2_t a_pFun);
-API_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser, const muChar_t *a_szName, muStrFun3_t a_pFun);
-
-API_EXPORT(void) mupDefineMultFun( muParserHandle_t a_hParser, 
-                                   const muChar_t* a_szName, 
-                                   muMultFun_t a_pFun, 
-                                   muBool_t a_bOptimize);
-
-API_EXPORT(void) mupDefineOprt( muParserHandle_t a_hParser, 
-                                const muChar_t* a_szName, 
-                                muFun2_t a_pFun, 
-                                muInt_t a_nPrec, 
-                                muInt_t a_nOprtAsct,
-                                muBool_t a_bOptimize);
-
-API_EXPORT(void) mupDefineConst( muParserHandle_t a_hParser, 
-                                 const muChar_t* a_szName, 
-                                 muFloat_t a_fVal );
-
-API_EXPORT(void) mupDefineStrConst( muParserHandle_t a_hParser, 
-                                    const muChar_t* a_szName, 
-                                    const muChar_t *a_sVal );
-
-API_EXPORT(void) mupDefineVar( muParserHandle_t a_hParser, 
-                               const muChar_t* a_szName, 
-                               muFloat_t *a_fVar);
-
-API_EXPORT(void) mupDefineBulkVar( muParserHandle_t a_hParser, 
-                               const muChar_t* a_szName, 
-                               muFloat_t *a_fVar);
-
-API_EXPORT(void) mupDefinePostfixOprt( muParserHandle_t a_hParser, 
-                                       const muChar_t* a_szName, 
-                                       muFun1_t a_pOprt, 
-                                       muBool_t a_bOptimize);
-
-
-API_EXPORT(void) mupDefineInfixOprt( muParserHandle_t a_hParser, 
-                                     const muChar_t* a_szName, 
-                                     muFun1_t a_pOprt, 
-                                     muBool_t a_bOptimize);
-
-// Define character sets for identifiers
-API_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
-API_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
-API_EXPORT(void) mupDefineInfixOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
-
-// Remove all / single variables
-API_EXPORT(void) mupRemoveVar(muParserHandle_t a_hParser, const muChar_t* a_szName);
-API_EXPORT(void) mupClearVar(muParserHandle_t a_hParser);
-API_EXPORT(void) mupClearConst(muParserHandle_t a_hParser);
-API_EXPORT(void) mupClearOprt(muParserHandle_t a_hParser);
-API_EXPORT(void) mupClearFun(muParserHandle_t a_hParser);
-
-// Querying variables / expression variables / constants
-API_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser);
-API_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser);
-API_EXPORT(int) mupGetConstNum(muParserHandle_t a_hParser);
-API_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);
-API_EXPORT(void) mupGetVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);
-API_EXPORT(void) mupGetConst(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t* a_pVar);
-API_EXPORT(void) mupSetArgSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
-API_EXPORT(void) mupSetDecSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
-API_EXPORT(void) mupSetThousandsSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
-API_EXPORT(void) mupResetLocale(muParserHandle_t a_hParser);
-
-// Add value recognition callbacks
-API_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser, muIdentFun_t);
-
-// Error handling
-API_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser);
-API_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser);
-API_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pErrHandler);
-API_EXPORT(const muChar_t*) mupGetErrorMsg(muParserHandle_t a_hParser);
-API_EXPORT(muInt_t) mupGetErrorCode(muParserHandle_t a_hParser);
-API_EXPORT(muInt_t) mupGetErrorPos(muParserHandle_t a_hParser);
-API_EXPORT(const muChar_t*) mupGetErrorToken(muParserHandle_t a_hParser);
-//API_EXPORT(const muChar_t*) mupGetErrorExpr(muParserHandle_t a_hParser);
-
-// This is used for .NET only. It creates a new variable allowing the dll to
-// manage the variable rather than the .NET garbage collector.
-API_EXPORT(muFloat_t*) mupCreateVar();
-API_EXPORT(void) mupReleaseVar(muFloat_t*);
+	typedef int    muBool_t;            // boolean type
+	typedef int    muInt_t;             // integer type 
+	typedef double muFloat_t;           // floating point type
+
+	// function types for calculation
+	typedef muFloat_t(*muFun0_t)(void);
+	typedef muFloat_t(*muFun1_t)(muFloat_t);
+	typedef muFloat_t(*muFun2_t)(muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun3_t)(muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun4_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun5_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun6_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun7_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun8_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun9_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFun10_t)(muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	// with user data (not null)
+	typedef muFloat_t(*muFunUserData0_t)(void*);
+	typedef muFloat_t(*muFunUserData1_t)(void*, muFloat_t);
+	typedef muFloat_t(*muFunUserData2_t)(void*, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData3_t)(void*, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData4_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData5_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData6_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData7_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData8_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData9_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muFunUserData10_t)(void*, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+
+	// Function prototypes for bulkmode functions
+	typedef muFloat_t(*muBulkFun0_t)(int, int);
+	typedef muFloat_t(*muBulkFun1_t)(int, int, muFloat_t);
+	typedef muFloat_t(*muBulkFun2_t)(int, int, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun3_t)(int, int, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun4_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun5_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun6_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun7_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun8_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun9_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFun10_t)(int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	// with user data (not null)
+	typedef muFloat_t(*muBulkFunUserData0_t)(void*, int, int);
+	typedef muFloat_t(*muBulkFunUserData1_t)(void*, int, int, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData2_t)(void*, int, int, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData3_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData4_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData5_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData6_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData7_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData8_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData9_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muBulkFunUserData10_t)(void*, int, int, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+
+	typedef muFloat_t(*muMultFun_t)(const muFloat_t*, muInt_t);
+	typedef muFloat_t(*muMultFunUserData_t)(void*, const muFloat_t*, muInt_t); // with user data (not null)
+
+	typedef muFloat_t(*muStrFun1_t)(const muChar_t*);
+	typedef muFloat_t(*muStrFun2_t)(const muChar_t*, muFloat_t);
+	typedef muFloat_t(*muStrFun3_t)(const muChar_t*, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muStrFun4_t)(const muChar_t*, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muStrFun5_t)(const muChar_t*, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+	// with user data (not null)
+	typedef muFloat_t(*muStrFunUserData1_t)(void*, const muChar_t*);
+	typedef muFloat_t(*muStrFunUserData2_t)(void*, const muChar_t*, muFloat_t);
+	typedef muFloat_t(*muStrFunUserData3_t)(void*, const muChar_t*, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muStrFunUserData4_t)(void*, const muChar_t*, muFloat_t, muFloat_t, muFloat_t);
+	typedef muFloat_t(*muStrFunUserData5_t)(void*, const muChar_t*, muFloat_t, muFloat_t, muFloat_t, muFloat_t);
+
+	// Functions for parser management
+	typedef void (*muErrorHandler_t)(muParserHandle_t a_hParser);           // [optional] callback to an error handler
+	typedef muFloat_t* (*muFacFun_t)(const muChar_t*, void*);               // [optional] callback for creating new variables
+	typedef muInt_t(*muIdentFun_t)(const muChar_t*, muInt_t*, muFloat_t*); // [optional] value identification callbacks
+
+	//-----------------------------------------------------------------------------------------------------
+	// Constants
+	static const int muOPRT_ASCT_LEFT = 0;
+	static const int muOPRT_ASCT_RIGHT = 1;
+
+	static const int muBASETYPE_FLOAT = 0;
+	static const int muBASETYPE_INT = 1;
+
+	//-----------------------------------------------------------------------------------------------------
+	//
+	//
+	// muParser C compatible bindings
+	//
+	//
+	//-----------------------------------------------------------------------------------------------------
+
+
+	// Basic operations / initialization  
+	API_EXPORT(muParserHandle_t) mupCreate(int nBaseType);
+	API_EXPORT(void) mupRelease(muParserHandle_t a_hParser);
+	API_EXPORT(const muChar_t*) mupGetExpr(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupSetExpr(muParserHandle_t a_hParser, const muChar_t* a_szExpr);
+	API_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void* pUserData);
+	API_EXPORT(const muChar_t*) mupGetVersion(muParserHandle_t a_hParser);
+	API_EXPORT(muFloat_t) mupEval(muParserHandle_t a_hParser);
+	API_EXPORT(muFloat_t*) mupEvalMulti(muParserHandle_t a_hParser, int* nNum);
+	API_EXPORT(void) mupEvalBulk(muParserHandle_t a_hParser, muFloat_t* a_fResult, int nSize);
+
+	// Defining callbacks / variables / constants
+	API_EXPORT(void) mupDefineFun0(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun0_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun2_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun3_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun4_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun5_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun6_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun7_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun8_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun9_t a_pFun, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun10_t a_pFun, muBool_t a_bOptimize);
+	// with user data (not null)
+	API_EXPORT(void) mupDefineFunUserData0(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData0_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData1(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData1_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData2(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData2_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData3(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData3_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData4(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData4_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData5(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData5_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData6(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData6_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData7(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData7_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData8(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData8_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData9(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData9_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+	API_EXPORT(void) mupDefineFunUserData10(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData10_t a_pFun, void* a_pUserData, muBool_t a_bOptimize);
+
+	// Defining bulkmode functions
+	API_EXPORT(void) mupDefineBulkFun0(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun0_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun1_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun2_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun3_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun4_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun5_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun6_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun7_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun8_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun9_t a_pFun);
+	API_EXPORT(void) mupDefineBulkFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun10_t a_pFun);
+	// with user data (not null)
+	API_EXPORT(void) mupDefineBulkFunUserData0(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData0_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData1(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData1_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData2(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData2_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData3(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData3_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData4(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData4_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData5(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData5_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData6(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData6_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData7(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData7_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData8(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData8_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData9(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData9_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineBulkFunUserData10(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData10_t a_pFun, void* a_pUserData);
+
+	// string functions
+	API_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun1_t a_pFun);
+	API_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun2_t a_pFun);
+	API_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun3_t a_pFun);
+	API_EXPORT(void) mupDefineStrFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun4_t a_pFun);
+	API_EXPORT(void) mupDefineStrFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun5_t a_pFun);
+	// with user data (not null)
+	API_EXPORT(void) mupDefineStrFunUserData1(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData1_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineStrFunUserData2(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData2_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineStrFunUserData3(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData3_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineStrFunUserData4(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData4_t a_pFun, void* a_pUserData);
+	API_EXPORT(void) mupDefineStrFunUserData5(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData5_t a_pFun, void* a_pUserData);
+
+	API_EXPORT(void) mupDefineMultFun(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muMultFun_t a_pFun,
+		muBool_t a_bOptimize);
+	// with user data (not null)
+	API_EXPORT(void) mupDefineMultFunUserData(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muMultFunUserData_t a_pFun,
+		void* a_pUserData,
+		muBool_t a_bOptimize);
+
+	API_EXPORT(void) mupDefineOprt(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muFun2_t a_pFun,
+		muInt_t a_nPrec,
+		muInt_t a_nOprtAsct,
+		muBool_t a_bOptimize);
+
+	API_EXPORT(void) mupDefineConst(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muFloat_t a_fVal);
+
+	API_EXPORT(void) mupDefineStrConst(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		const muChar_t* a_sVal);
+
+	API_EXPORT(void) mupDefineVar(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muFloat_t* a_fVar);
+
+	API_EXPORT(void) mupDefineBulkVar(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muFloat_t* a_fVar);
+
+	API_EXPORT(void) mupDefinePostfixOprt(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muFun1_t a_pOprt,
+		muBool_t a_bOptimize);
+
+
+	API_EXPORT(void) mupDefineInfixOprt(muParserHandle_t a_hParser,
+		const muChar_t* a_szName,
+		muFun1_t a_pOprt,
+		muBool_t a_bOptimize);
+
+	// Define character sets for identifiers
+	API_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
+	API_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
+	API_EXPORT(void) mupDefineInfixOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset);
+
+	// Remove all / single variables
+	API_EXPORT(void) mupRemoveVar(muParserHandle_t a_hParser, const muChar_t* a_szName);
+	API_EXPORT(void) mupClearVar(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupClearConst(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupClearOprt(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupClearFun(muParserHandle_t a_hParser);
+
+	// Querying variables / expression variables / constants
+	API_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser);
+	API_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser);
+	API_EXPORT(int) mupGetConstNum(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);
+	API_EXPORT(void) mupGetVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t** a_pVar);
+	API_EXPORT(void) mupGetConst(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t* a_pVar);
+	API_EXPORT(void) mupSetArgSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
+	API_EXPORT(void) mupSetDecSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
+	API_EXPORT(void) mupSetThousandsSep(muParserHandle_t a_hParser, const muChar_t cArgSep);
+	API_EXPORT(void) mupResetLocale(muParserHandle_t a_hParser);
+
+	// Add value recognition callbacks
+	API_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser, muIdentFun_t);
+
+	// Error handling
+	API_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser);
+	API_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pErrHandler);
+	API_EXPORT(const muChar_t*) mupGetErrorMsg(muParserHandle_t a_hParser);
+	API_EXPORT(muInt_t) mupGetErrorCode(muParserHandle_t a_hParser);
+	API_EXPORT(muInt_t) mupGetErrorPos(muParserHandle_t a_hParser);
+	API_EXPORT(const muChar_t*) mupGetErrorToken(muParserHandle_t a_hParser);
+	//API_EXPORT(const muChar_t*) mupGetErrorExpr(muParserHandle_t a_hParser);
+
+	// This is used for .NET only. It creates a new variable allowing the dll to
+	// manage the variable rather than the .NET garbage collector.
+	API_EXPORT(muFloat_t*) mupCreateVar(void);
+	API_EXPORT(void) mupReleaseVar(muFloat_t*);
 
 #ifdef __cplusplus
 }
diff --git a/include/muParserDef.h b/include/muParserDef.h
index d76aae6..13a15c8 100644
--- a/include/muParserDef.h
+++ b/include/muParserDef.h
@@ -1,27 +1,31 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2014 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #ifndef MUP_DEF_H
 #define MUP_DEF_H
 
@@ -33,17 +37,9 @@
 #include "muParserFixes.h"
 
 /** \file
-    \brief This file contains standard definitions used by the parser.
+	\brief This file contains standard definitions used by the parser.
 */
 
-#define MUP_VERSION _T("2.2.6")
-#define MUP_VERSION_DATE _T("20181004")
-
-#define MUP_CHARS _T("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
-
-/** \brief If this macro is defined mathematical exceptions (div by zero) will be thrown as exceptions. */
-//#define MUP_MATH_EXCEPTIONS
-
 /** \brief Define the base datatype for values.
 
   This datatype must be a built in value type. You can not use custom classes.
@@ -51,54 +47,46 @@
 */
 #define MUP_BASETYPE double
 
-/** \brief Activate this option in order to compile with OpenMP support. 
+/** \brief Activate this option in order to compile with OpenMP support.
 
-  OpenMP is used only in the bulk mode it may increase the performance a bit. 
+  OpenMP is used only in the bulk mode it may increase the performance a bit.
+
+  !!! DO NOT ACTIVATE THIS MACRO HERE IF YOU USE CMAKE FOR BUILDING !!!
+
+  use the cmake option instead!
 */
 //#define MUP_USE_OPENMP
 
 #if defined(_UNICODE)
-  /** \brief Definition of the basic parser string type. */
-  #define MUP_STRING_TYPE std::wstring
+	/** \brief Definition of the basic parser string type. */
+	#define MUP_STRING_TYPE std::wstring
 
-  #if !defined(_T)
-    #define _T(x) L##x
-  #endif // not defined _T
+	#if !defined(_T)
+		#define _T(x) L##x
+	#endif // not defined _T
 #else
-  #ifndef _T
-  #define _T(x) x
-  #endif
-  
-  /** \brief Definition of the basic parser string type. */
-  #define MUP_STRING_TYPE std::string
+	#ifndef _T
+		#define _T(x) x
+	#endif
+
+	/** \brief Definition of the basic parser string type. */
+	#define MUP_STRING_TYPE std::string
 #endif
 
-#if defined(_DEBUG)
-  /** \brief Debug macro to force an abortion of the programm with a certain message.
-  */
-  #define MUP_FAIL(MSG)     \
-          {                 \
-            bool MSG=false; \
-            assert(MSG);    \
-          }
-
-    /** \brief An assertion that does not kill the program.
-
-        This macro is neutralised in UNICODE builds. It's
-        too difficult to translate.
-    */
-    #define MUP_ASSERT(COND)                         \
-            if (!(COND))                             \
-            {                                        \
-              stringstream_type ss;                  \
-              ss << _T("Assertion \"") _T(#COND) _T("\" failed: ") \
-                 << __FILE__ << _T(" line ")         \
-                 << __LINE__ << _T(".");             \
-              throw ParserError( ss.str() );         \
+/** \brief An assertion that does not kill the program. */
+#define MUP_ASSERT(COND)											\
+            if (!(COND))											\
+            {														\
+              stringstream_type ss;									\
+              ss << _T("Assertion \"") _T(#COND) _T("\" failed: ")	\
+                 << __FILE__ << _T(" line ")						\
+                 << __LINE__ << _T(".");							\
+              throw ParserError( ecINTERNAL_ERROR, -1, ss.str());   \
             }
-#else
-  #define MUP_FAIL(MSG)
-  #define MUP_ASSERT(COND)
+
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
 #endif
 
 
@@ -106,263 +94,425 @@ namespace mu
 {
 #if defined(_UNICODE)
 
-  //------------------------------------------------------------------------------
-  /** \brief Encapsulate wcout. */
-  inline std::wostream& console()
-  {
-    return std::wcout;
-  }
+	/** \brief Encapsulate wcout. */
+	inline std::wostream& console()
+	{
+		return std::wcout;
+	}
 
-  /** \brief Encapsulate cin. */
-  inline std::wistream& console_in()
-  {
-    return std::wcin;
-  }
+	/** \brief Encapsulate cin. */
+	inline std::wistream& console_in()
+	{
+		return std::wcin;
+	}
 
 #else
 
-  /** \brief Encapsulate cout. 
-  
-    Used for supporting UNICODE more easily.
-  */
-  inline std::ostream& console()
-  {
-    return std::cout;
-  }
+	/** \brief Encapsulate cout.
+
+	  Used for supporting UNICODE more easily.
+	*/
+	inline std::ostream& console()
+	{
+		return std::cout;
+	}
 
-  /** \brief Encapsulate cin. 
+	/** \brief Encapsulate cin.
 
-    Used for supporting UNICODE more easily.
-  */
-  inline std::istream& console_in()
-  {
-    return std::cin;
-  }
+	  Used for supporting UNICODE more easily.
+	*/
+	inline std::istream& console_in()
+	{
+		return std::cin;
+	}
 
 #endif
 
-  //------------------------------------------------------------------------------
-  /** \brief Bytecode values.
-
-      \attention The order of the operator entries must match the order in ParserBase::c_DefaultOprt!
-  */
-  enum ECmdCode
-  {
-    // The following are codes for built in binary operators
-    // apart from built in operators the user has the opportunity to
-    // add user defined operators.
-    cmLE            = 0,   ///< Operator item:  less or equal
-    cmGE            = 1,   ///< Operator item:  greater or equal
-    cmNEQ           = 2,   ///< Operator item:  not equal
-    cmEQ            = 3,   ///< Operator item:  equals
-    cmLT            = 4,   ///< Operator item:  less than
-    cmGT            = 5,   ///< Operator item:  greater than
-    cmADD           = 6,   ///< Operator item:  add
-    cmSUB           = 7,   ///< Operator item:  subtract
-    cmMUL           = 8,   ///< Operator item:  multiply
-    cmDIV           = 9,   ///< Operator item:  division
-    cmPOW           = 10,  ///< Operator item:  y to the power of ...
-    cmLAND          = 11,
-    cmLOR           = 12,
-    cmASSIGN        = 13,  ///< Operator item:  Assignment operator
-    cmBO            = 14,  ///< Operator item:  opening bracket
-    cmBC            = 15,  ///< Operator item:  closing bracket
-    cmIF            = 16,  ///< For use in the ternary if-then-else operator
-    cmELSE          = 17,  ///< For use in the ternary if-then-else operator
-    cmENDIF         = 18,  ///< For use in the ternary if-then-else operator
-    cmARG_SEP       = 19,  ///< function argument separator
-    cmVAR           = 20,  ///< variable item
-    cmVAL           = 21,  ///< value item
-
-    // For optimization purposes
-    cmVARPOW2,
-    cmVARPOW3,
-    cmVARPOW4,
-    cmVARMUL,
-    cmPOW2,
-
-    // operators and functions
-    cmFUNC,                ///< Code for a generic function item
-    cmFUNC_STR,            ///< Code for a function with a string parameter
-    cmFUNC_BULK,           ///< Special callbacks for Bulk mode with an additional parameter for the bulk index 
-    cmSTRING,              ///< Code for a string token
-    cmOPRT_BIN,            ///< user defined binary operator
-    cmOPRT_POSTFIX,        ///< code for postfix operators
-    cmOPRT_INFIX,          ///< code for infix operators
-    cmEND,                 ///< end of formula
-    cmUNKNOWN              ///< uninitialized item
-  };
-
-  //------------------------------------------------------------------------------
-  /** \brief Types internally used by the parser.
-  */
-  enum ETypeCode
-  {
-    tpSTR  = 0,     ///< String type (Function arguments and constants only, no string variables)
-    tpDBL  = 1,     ///< Floating point variables
-    tpVOID = 2      ///< Undefined type.
-  };
-
-  //------------------------------------------------------------------------------
-  enum EParserVersionInfo
-  {
-    pviBRIEF,
-    pviFULL
-  };
-
-  //------------------------------------------------------------------------------
-  /** \brief Parser operator precedence values. */
-  enum EOprtAssociativity
-  {
-    oaLEFT  = 0,
-    oaRIGHT = 1,
-    oaNONE  = 2
-  };
-
-  //------------------------------------------------------------------------------
-  /** \brief Parser operator precedence values. */
-  enum EOprtPrecedence
-  {
-    // binary operators
-    prLOR     = 1,
-    prLAND    = 2,
-    prLOGIC   = 3,  ///< logic operators
-    prCMP     = 4,  ///< comparsion operators
-    prADD_SUB = 5,  ///< addition
-    prMUL_DIV = 6,  ///< multiplication/division
-    prPOW     = 7,  ///< power operator priority (highest)
-
-    // infix operators
-    prINFIX   = 6, ///< Signs have a higher priority than ADD_SUB, but lower than power operator
-    prPOSTFIX = 6  ///< Postfix operator priority (currently unused)
-  };
-
-  //------------------------------------------------------------------------------
-  // basic types
-
-  /** \brief The numeric datatype used by the parser. 
-  
-    Normally this is a floating point type either single or double precision.
-  */
-  typedef MUP_BASETYPE value_type;
-
-  /** \brief The stringtype used by the parser. 
-
-    Depends on whether UNICODE is used or not.
-  */
-  typedef MUP_STRING_TYPE string_type;
-
-  /** \brief The character type used by the parser. 
-  
-    Depends on whether UNICODE is used or not.
-  */
-  typedef string_type::value_type char_type;
-
-  /** \brief Typedef for easily using stringstream that respect the parser stringtype. */
-  typedef std::basic_stringstream<char_type,
-                                  std::char_traits<char_type>,
-                                  std::allocator<char_type> > stringstream_type;
-
-  // Data container types
-
-  /** \brief Type used for storing variables. */
-  typedef std::map<string_type, value_type*> varmap_type;
-  
-  /** \brief Type used for storing constants. */
-  typedef std::map<string_type, value_type> valmap_type;
-  
-  /** \brief Type for assigning a string name to an index in the internal string table. */
-  typedef std::map<string_type, std::size_t> strmap_type;
-
-  // Parser callbacks
-  
-  /** \brief Callback type used for functions without arguments. */
-  typedef value_type (*generic_fun_type)();
-
-  /** \brief Callback type used for functions without arguments. */
-  typedef value_type (*fun_type0)();
-
-  /** \brief Callback type used for functions with a single arguments. */
-  typedef value_type (*fun_type1)(value_type);
-
-  /** \brief Callback type used for functions with two arguments. */
-  typedef value_type (*fun_type2)(value_type, value_type);
-
-  /** \brief Callback type used for functions with three arguments. */
-  typedef value_type (*fun_type3)(value_type, value_type, value_type);
-
-  /** \brief Callback type used for functions with four arguments. */
-  typedef value_type (*fun_type4)(value_type, value_type, value_type, value_type);
-
-  /** \brief Callback type used for functions with five arguments. */
-  typedef value_type (*fun_type5)(value_type, value_type, value_type, value_type, value_type);
+	/** \brief Bytecode values.
+
+		\attention The order of the operator entries must match the order in ParserBase::c_DefaultOprt!
+	*/
+	enum ECmdCode
+	{
+		// The following are codes for built in binary operators
+		// apart from built in operators the user has the opportunity to
+		// add user defined operators.
+		cmLE = 0,			///< Operator item:  less or equal
+		cmGE = 1,			///< Operator item:  greater or equal
+		cmNEQ = 2,			///< Operator item:  not equal
+		cmEQ = 3,			///< Operator item:  equals
+		cmLT = 4,			///< Operator item:  less than
+		cmGT = 5,			///< Operator item:  greater than
+		cmADD = 6,			///< Operator item:  add
+		cmSUB = 7,			///< Operator item:  subtract
+		cmMUL = 8,			///< Operator item:  multiply
+		cmDIV = 9,			///< Operator item:  division
+		cmPOW = 10,			///< Operator item:  y to the power of ...
+		cmLAND = 11,
+		cmLOR = 12,
+		cmASSIGN = 13,		///< Operator item:  Assignment operator
+		cmBO = 14,			///< Operator item:  opening bracket
+		cmBC = 15,			///< Operator item:  closing bracket
+		cmIF = 16,			///< For use in the ternary if-then-else operator
+		cmELSE = 17,		///< For use in the ternary if-then-else operator
+		cmENDIF = 18,		///< For use in the ternary if-then-else operator
+		cmARG_SEP = 19,		///< function argument separator
+		cmVAR = 20,			///< variable item
+		cmVAL = 21,			///< value item
+
+		// For optimization purposes
+		cmVARPOW2 = 22,
+		cmVARPOW3 = 23,
+		cmVARPOW4 = 24,
+		cmVARMUL = 25,
+
+		// operators and functions
+		cmFUNC = 26,		///< Code for a generic function item
+		cmFUNC_STR,			///< Code for a function with a string parameter
+		cmFUNC_BULK,		///< Special callbacks for Bulk mode with an additional parameter for the bulk index 
+		cmSTRING,			///< Code for a string token
+		cmOPRT_BIN,			///< user defined binary operator
+		cmOPRT_POSTFIX,		///< code for postfix operators
+		cmOPRT_INFIX,		///< code for infix operators
+		cmEND,				///< end of formula
+		cmUNKNOWN			///< uninitialized item
+	};
+
+	/** \brief Types internally used by the parser.
+	*/
+	enum ETypeCode
+	{
+		tpSTR = 0,     ///< String type (Function arguments and constants only, no string variables)
+		tpDBL = 1,     ///< Floating point variables
+		tpVOID = 2      ///< Undefined type.
+	};
+
+
+	enum EParserVersionInfo
+	{
+		pviBRIEF,
+		pviFULL
+	};
+
+
+	/** \brief Parser operator precedence values. */
+	enum EOprtAssociativity
+	{
+		oaLEFT = 0,
+		oaRIGHT = 1,
+		oaNONE = 2
+	};
+
+
+	/** \brief Parser operator precedence values. */
+	enum EOprtPrecedence
+	{
+		// binary operators
+		prLOR = 1,
+		prLAND = 2,
+		prLOGIC = 3,	///< logic operators
+		prCMP = 4,		///< comparsion operators
+		prADD_SUB = 5,	///< addition
+		prMUL_DIV = 6,	///< multiplication/division
+		prPOW = 7,		///< power operator priority (highest)
+
+		// infix operators
+		prINFIX = 6,	///< Signs have a higher priority than ADD_SUB, but lower than power operator
+		prPOSTFIX = 6	///< Postfix operator priority (currently unused)
+	};
+
+
+	/** \brief Error codes. */
+	enum EErrorCodes
+	{
+		// Formula syntax errors
+		ecUNEXPECTED_OPERATOR = 0,	///< Unexpected binary operator found
+		ecUNASSIGNABLE_TOKEN = 1,	///< Token can't be identified.
+		ecUNEXPECTED_EOF = 2,		///< Unexpected end of formula. (Example: "2+sin(")
+		ecUNEXPECTED_ARG_SEP = 3,	///< An unexpected comma has been found. (Example: "1,23")
+		ecUNEXPECTED_ARG = 4,		///< An unexpected argument has been found
+		ecUNEXPECTED_VAL = 5,		///< An unexpected value token has been found
+		ecUNEXPECTED_VAR = 6,		///< An unexpected variable token has been found
+		ecUNEXPECTED_PARENS = 7,	///< Unexpected Parenthesis, opening or closing
+		ecUNEXPECTED_STR = 8,		///< A string has been found at an inapropriate position
+		ecSTRING_EXPECTED = 9,		///< A string function has been called with a different type of argument
+		ecVAL_EXPECTED = 10,		///< A numerical function has been called with a non value type of argument
+		ecMISSING_PARENS = 11,		///< Missing parens. (Example: "3*sin(3")
+		ecUNEXPECTED_FUN = 12,		///< Unexpected function found. (Example: "sin(8)cos(9)")
+		ecUNTERMINATED_STRING = 13,	///< unterminated string constant. (Example: "3*valueof("hello)")
+		ecTOO_MANY_PARAMS = 14,		///< Too many function parameters
+		ecTOO_FEW_PARAMS = 15,		///< Too few function parameters. (Example: "ite(1<2,2)")
+		ecOPRT_TYPE_CONFLICT = 16,	///< binary operators may only be applied to value items of the same type
+		ecSTR_RESULT = 17,			///< result is a string
+
+		// Invalid Parser input Parameters
+		ecINVALID_NAME = 18,			///< Invalid function, variable or constant name.
+		ecINVALID_BINOP_IDENT = 19,		///< Invalid binary operator identifier
+		ecINVALID_INFIX_IDENT = 20,		///< Invalid function, variable or constant name.
+		ecINVALID_POSTFIX_IDENT = 21,	///< Invalid function, variable or constant name.
+
+		ecBUILTIN_OVERLOAD = 22, ///< Trying to overload builtin operator
+		ecINVALID_FUN_PTR = 23, ///< Invalid callback function pointer 
+		ecINVALID_VAR_PTR = 24, ///< Invalid variable pointer 
+		ecEMPTY_EXPRESSION = 25, ///< The Expression is empty
+		ecNAME_CONFLICT = 26, ///< Name conflict
+		ecOPT_PRI = 27, ///< Invalid operator priority
+		// 
+		ecDOMAIN_ERROR = 28, ///< catch division by zero, sqrt(-1), log(0) (currently unused)
+		ecDIV_BY_ZERO = 29, ///< Division by zero (currently unused)
+		ecGENERIC = 30, ///< Generic error
+		ecLOCALE = 31, ///< Conflict with current locale
+
+		ecUNEXPECTED_CONDITIONAL = 32,
+		ecMISSING_ELSE_CLAUSE = 33,
+		ecMISPLACED_COLON = 34,
+
+		ecUNREASONABLE_NUMBER_OF_COMPUTATIONS = 35,
+
+		ecIDENTIFIER_TOO_LONG = 36, ///< Thrown when an identifier with more then 255 characters is used.
+
+		ecEXPRESSION_TOO_LONG = 37, ///< Throw an exception if the expression has more than 10000 characters. (an arbitrary limit)
+
+		ecINVALID_CHARACTERS_FOUND = 38,///< The expression or identifier contains invalid non printable characters
+
+		// internal errors
+		ecINTERNAL_ERROR = 39,    ///< Internal error of any kind.
+
+		// The last two are special entries 
+		ecCOUNT,                      ///< This is no error code, It just stores just the total number of error codes
+		ecUNDEFINED = -1  ///< Undefined message, placeholder to detect unassigned error messages
+	};
+
+	//------------------------------------------------------------------------------
+	// Basic Types
+	//------------------------------------------------------------------------------
+
+	/** \brief The numeric datatype used by the parser.
+
+	  Normally this is a floating point type either single or double precision.
+	*/
+	typedef MUP_BASETYPE value_type;
+
+	/** \brief The stringtype used by the parser.
+
+	  Depends on whether UNICODE is used or not.
+	*/
+	typedef MUP_STRING_TYPE string_type;
+
+	/** \brief The character type used by the parser.
+
+	  Depends on whether UNICODE is used or not.
+	*/
+	typedef string_type::value_type char_type;
+
+	/** \brief Typedef for easily using stringstream that respect the parser stringtype. */
+	typedef std::basic_stringstream<char_type, std::char_traits<char_type>, std::allocator<char_type> > stringstream_type;
+
+	// Data container types
+
+	/** \brief Type used for storing variables. */
+	typedef std::map<string_type, value_type*> varmap_type;
+
+	/** \brief Type used for storing constants. */
+	typedef std::map<string_type, value_type> valmap_type;
+
+	/** \brief Type for assigning a string name to an index in the internal string table. */
+	typedef std::map<string_type, std::size_t> strmap_type;
+
+	// Parser callbacks
+
+	/** \brief Function type used to erase type.  Voluntarily needs explicit cast with all other *fun_type*. */
+	typedef void(*erased_fun_type)();
+
+	/** \brief Callback type used for functions without arguments. */
+	typedef value_type(*fun_type0)();
+
+	/** \brief Callback type used for functions with a single arguments. */
+	typedef value_type(*fun_type1)(value_type);
+
+	/** \brief Callback type used for functions with two arguments. */
+	typedef value_type(*fun_type2)(value_type, value_type);
+
+	/** \brief Callback type used for functions with three arguments. */
+	typedef value_type(*fun_type3)(value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with four arguments. */
+	typedef value_type(*fun_type4)(value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with five arguments. */
+	typedef value_type(*fun_type5)(value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with six arguments. */
+	typedef value_type(*fun_type6)(value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with six arguments. */
-  typedef value_type (*fun_type6)(value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type used for functions with seven arguments. */
+	typedef value_type(*fun_type7)(value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with seven arguments. */
-  typedef value_type (*fun_type7)(value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type used for functions with eight arguments. */
+	typedef value_type(*fun_type8)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with eight arguments. */
-  typedef value_type (*fun_type8)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type used for functions with nine arguments. */
+	typedef value_type(*fun_type9)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with nine arguments. */
-  typedef value_type (*fun_type9)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type used for functions with ten arguments. */
+	typedef value_type(*fun_type10)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with ten arguments. */
-  typedef value_type (*fun_type10)(value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions without arguments. */
+	typedef value_type(*fun_userdata_type0)(void*);
 
-  /** \brief Callback type used for functions without arguments. */
-  typedef value_type (*bulkfun_type0)(int, int);
+	/** \brief Callback type with user data (not null) used for functions with a single arguments. */
+	typedef value_type(*fun_userdata_type1)(void*, value_type);
 
-  /** \brief Callback type used for functions with a single arguments. */
-  typedef value_type (*bulkfun_type1)(int, int, value_type);
+	/** \brief Callback type with user data (not null) used for functions with two arguments. */
+	typedef value_type(*fun_userdata_type2)(void*, value_type, value_type);
 
-  /** \brief Callback type used for functions with two arguments. */
-  typedef value_type (*bulkfun_type2)(int, int, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with three arguments. */
+	typedef value_type(*fun_userdata_type3)(void*, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with three arguments. */
-  typedef value_type (*bulkfun_type3)(int, int, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with four arguments. */
+	typedef value_type(*fun_userdata_type4)(void*, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with four arguments. */
-  typedef value_type (*bulkfun_type4)(int, int, value_type, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with five arguments. */
+	typedef value_type(*fun_userdata_type5)(void*, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with five arguments. */
-  typedef value_type (*bulkfun_type5)(int, int, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with six arguments. */
+	typedef value_type(*fun_userdata_type6)(void*, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with six arguments. */
-  typedef value_type (*bulkfun_type6)(int, int, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with seven arguments. */
+	typedef value_type(*fun_userdata_type7)(void*, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with seven arguments. */
-  typedef value_type (*bulkfun_type7)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with eight arguments. */
+	typedef value_type(*fun_userdata_type8)(void*, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with eight arguments. */
-  typedef value_type (*bulkfun_type8)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+	/** \brief Callback type with user data (not null) used for functions with nine arguments. */
+	typedef value_type(*fun_userdata_type9)(void*, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with nine arguments. */
-  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);
+	/** \brief Callback type with user data (not null) used for functions with ten arguments. */
+	typedef value_type(*fun_userdata_type10)(void*, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions with ten arguments. */
-  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);
+	/** \brief Callback type used for functions without arguments. */
+	typedef value_type(*bulkfun_type0)(int, int);
 
-  /** \brief Callback type used for functions with a variable argument list. */
-  typedef value_type (*multfun_type)(const value_type*, int);
+	/** \brief Callback type used for functions with a single arguments. */
+	typedef value_type(*bulkfun_type1)(int, int, value_type);
 
-  /** \brief Callback type used for functions taking a string as an argument. */
-  typedef value_type (*strfun_type1)(const char_type*);
+	/** \brief Callback type used for functions with two arguments. */
+	typedef value_type(*bulkfun_type2)(int, int, value_type, value_type);
 
-  /** \brief Callback type used for functions taking a string and a value as arguments. */
-  typedef value_type (*strfun_type2)(const char_type*, value_type);
+	/** \brief Callback type used for functions with three arguments. */
+	typedef value_type(*bulkfun_type3)(int, int, value_type, value_type, value_type);
 
-  /** \brief Callback type used for functions taking a string and two values as arguments. */
-  typedef value_type (*strfun_type3)(const char_type*, value_type, value_type);
+	/** \brief Callback type used for functions with four arguments. */
+	typedef value_type(*bulkfun_type4)(int, int, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback used for functions that identify values in a string. */
-  typedef int (*identfun_type)(const char_type *sExpr, int *nPos, value_type *fVal);
+	/** \brief Callback type used for functions with five arguments. */
+	typedef value_type(*bulkfun_type5)(int, int, value_type, value_type, value_type, value_type, value_type);
 
-  /** \brief Callback used for variable creation factory functions. */
-  typedef value_type* (*facfun_type)(const char_type*, void*);
+	/** \brief Callback type used for functions with six arguments. */
+	typedef value_type(*bulkfun_type6)(int, int, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with seven arguments. */
+	typedef value_type(*bulkfun_type7)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with eight arguments. */
+	typedef value_type(*bulkfun_type8)(int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with nine arguments. */
+	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);
+
+	/** \brief Callback type used for functions with ten arguments. */
+	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);
+
+	/** \brief Callback type with user data (not null) used for functions without arguments. */
+	typedef value_type(*bulkfun_userdata_type0)(void*, int, int);
+
+	/** \brief Callback type with user data (not null) used for functions with a single arguments. */
+	typedef value_type(*bulkfun_userdata_type1)(void*, int, int, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with two arguments. */
+	typedef value_type(*bulkfun_userdata_type2)(void*, int, int, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with three arguments. */
+	typedef value_type(*bulkfun_userdata_type3)(void*, int, int, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with four arguments. */
+	typedef value_type(*bulkfun_userdata_type4)(void*, int, int, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with five arguments. */
+	typedef value_type(*bulkfun_userdata_type5)(void*, int, int, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with six arguments. */
+	typedef value_type(*bulkfun_userdata_type6)(void*, int, int, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with seven arguments. */
+	typedef value_type(*bulkfun_userdata_type7)(void*, int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with eight arguments. */
+	typedef value_type(*bulkfun_userdata_type8)(void*, int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with nine arguments. */
+	typedef value_type(*bulkfun_userdata_type9)(void*, int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions with ten arguments. */
+	typedef value_type(*bulkfun_userdata_type10)(void*, int, int, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions with a variable argument list. */
+	typedef value_type(*multfun_type)(const value_type*, int);
+
+	/** \brief Callback type with user data (not null) used for functions and a variable argument list. */
+	typedef value_type(*multfun_userdata_type)(void*, const value_type*, int);
+
+	/** \brief Callback type used for functions taking a string as an argument. */
+	typedef value_type(*strfun_type1)(const char_type*);
+
+	/** \brief Callback type used for functions taking a string and a value as arguments. */
+	typedef value_type(*strfun_type2)(const char_type*, value_type);
+
+	/** \brief Callback type used for functions taking a string and two values as arguments. */
+	typedef value_type(*strfun_type3)(const char_type*, value_type, value_type);
+
+	/** \brief Callback type used for functions taking a string and three values as arguments. */
+	typedef value_type(*strfun_type4)(const char_type*, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions taking a string and four values as arguments. */
+	typedef value_type(*strfun_type5)(const char_type*, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type used for functions taking a string and five values as arguments. */
+	typedef value_type(*strfun_type6)(const char_type*, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions taking a string as an argument. */
+	typedef value_type(*strfun_userdata_type1)(void*, const char_type*);
+
+	/** \brief Callback type with user data (not null) used for functions taking a string and a value as arguments. */
+	typedef value_type(*strfun_userdata_type2)(void*, const char_type*, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions taking a string and two values as arguments. */
+	typedef value_type(*strfun_userdata_type3)(void*, const char_type*, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions taking a string and a value as arguments. */
+	typedef value_type(*strfun_userdata_type4)(void*, const char_type*, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions taking a string and two values as arguments. */
+	typedef value_type(*strfun_userdata_type5)(void*, const char_type*, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback type with user data (not null) used for functions taking a string and five values as arguments. */
+	typedef value_type(*strfun_userdata_type6)(void*, const char_type*, value_type, value_type, value_type, value_type, value_type);
+
+	/** \brief Callback used for functions that identify values in a string. */
+	typedef int (*identfun_type)(const char_type* sExpr, int* nPos, value_type* fVal);
+
+	/** \brief Callback used for variable creation factory functions. */
+	typedef value_type* (*facfun_type)(const char_type*, void*);
+
+	static const int MaxLenExpression = 20000;
+	static const int MaxLenIdentifier = 100;
+	static const string_type ParserVersion = string_type(_T("2.3.3 (Release)"));
+	static const string_type ParserVersionDate = string_type(_T("20220122"));
 } // end of namespace
 
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
+
 #endif
 
diff --git a/include/muParserError.h b/include/muParserError.h
index 2185217..90fbfdf 100644
--- a/include/muParserError.h
+++ b/include/muParserError.h
@@ -1,32 +1,34 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef MU_PARSER_ERROR_H
 #define MU_PARSER_ERROR_H
 
-#include <cassert>
 #include <stdexcept>
 #include <string>
 #include <sstream>
@@ -35,139 +37,81 @@
 
 #include "muParserDef.h"
 
-/** \file 
-    \brief This file defines the error class used by the parser.
-*/
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 4251)  // ...needs to have dll-interface to be used by clients of class ...
+#endif
 
-namespace mu
-{
 
-/** \brief Error codes. */
-enum EErrorCodes
-{
-  // Formula syntax errors
-  ecUNEXPECTED_OPERATOR    = 0,  ///< Unexpected binary operator found
-  ecUNASSIGNABLE_TOKEN     = 1,  ///< Token can't be identified.
-  ecUNEXPECTED_EOF         = 2,  ///< Unexpected end of formula. (Example: "2+sin(")
-  ecUNEXPECTED_ARG_SEP     = 3,  ///< An unexpected comma has been found. (Example: "1,23")
-  ecUNEXPECTED_ARG         = 4,  ///< An unexpected argument has been found
-  ecUNEXPECTED_VAL         = 5,  ///< An unexpected value token has been found
-  ecUNEXPECTED_VAR         = 6,  ///< An unexpected variable token has been found
-  ecUNEXPECTED_PARENS      = 7,  ///< Unexpected Parenthesis, opening or closing
-  ecUNEXPECTED_STR         = 8,  ///< A string has been found at an inapropriate position
-  ecSTRING_EXPECTED        = 9,  ///< A string function has been called with a different type of argument
-  ecVAL_EXPECTED           = 10, ///< A numerical function has been called with a non value type of argument
-  ecMISSING_PARENS         = 11, ///< Missing parens. (Example: "3*sin(3")
-  ecUNEXPECTED_FUN         = 12, ///< Unexpected function found. (Example: "sin(8)cos(9)")
-  ecUNTERMINATED_STRING    = 13, ///< unterminated string constant. (Example: "3*valueof("hello)")
-  ecTOO_MANY_PARAMS        = 14, ///< Too many function parameters
-  ecTOO_FEW_PARAMS         = 15, ///< Too few function parameters. (Example: "ite(1<2,2)")
-  ecOPRT_TYPE_CONFLICT     = 16, ///< binary operators may only be applied to value items of the same type
-  ecSTR_RESULT             = 17, ///< result is a string
-
-  // Invalid Parser input Parameters
-  ecINVALID_NAME           = 18, ///< Invalid function, variable or constant name.
-  ecINVALID_BINOP_IDENT    = 19, ///< Invalid binary operator identifier
-  ecINVALID_INFIX_IDENT    = 20, ///< Invalid function, variable or constant name.
-  ecINVALID_POSTFIX_IDENT  = 21, ///< Invalid function, variable or constant name.
-
-  ecBUILTIN_OVERLOAD       = 22, ///< Trying to overload builtin operator
-  ecINVALID_FUN_PTR        = 23, ///< Invalid callback function pointer 
-  ecINVALID_VAR_PTR        = 24, ///< Invalid variable pointer 
-  ecEMPTY_EXPRESSION       = 25, ///< The Expression is empty
-  ecNAME_CONFLICT          = 26, ///< Name conflict
-  ecOPT_PRI                = 27, ///< Invalid operator priority
-  // 
-  ecDOMAIN_ERROR           = 28, ///< catch division by zero, sqrt(-1), log(0) (currently unused)
-  ecDIV_BY_ZERO            = 29, ///< Division by zero (currently unused)
-  ecGENERIC                = 30, ///< Generic error
-  ecLOCALE                 = 31, ///< Conflict with current locale
-
-  ecUNEXPECTED_CONDITIONAL = 32,
-  ecMISSING_ELSE_CLAUSE    = 33, 
-  ecMISPLACED_COLON        = 34,
-
-  ecUNREASONABLE_NUMBER_OF_COMPUTATIONS = 35,
-
-  // internal errors
-  ecINTERNAL_ERROR         = 36, ///< Internal error of any kind.
-  
-  // The last two are special entries 
-  ecCOUNT,                      ///< This is no error code, It just stores just the total number of error codes
-  ecUNDEFINED              = -1  ///< Undefined message, placeholder to detect unassigned error messages
-};
-
-//---------------------------------------------------------------------------
-/** \brief A class that handles the error messages.
+/** \file
+	\brief This file defines the error class used by the parser.
 */
-class ParserErrorMsg
-{
-public:
-    static const ParserErrorMsg& Instance();
-    string_type operator[](unsigned a_iIdx) const;
-
-private:
-    ParserErrorMsg& operator=(const ParserErrorMsg &) = delete;
-    ParserErrorMsg(const ParserErrorMsg&) = delete;
-    ParserErrorMsg();
 
-   ~ParserErrorMsg() = default;
-
-    std::vector<string_type>  m_vErrMsg;  ///< A vector with the predefined error messages
-};
-
-//---------------------------------------------------------------------------
-/** \brief Error class of the parser. 
-    \author Ingo Berg
-
-  Part of the math parser package.
-*/
-class API_EXPORT_CXX ParserError
+namespace mu
 {
-private:
-
-    /** \brief Replace all ocuurences of a substring with another string. */
-    void ReplaceSubString( string_type &strSource, 
-                           const string_type &strFind,
-                           const string_type &strReplaceWith);
-    void Reset();
-
-public:
-
-    ParserError();
-    explicit ParserError(EErrorCodes a_iErrc);
-    explicit ParserError(const string_type &sMsg);
-    ParserError( EErrorCodes a_iErrc,
-                 const string_type &sTok,
-                 const string_type &sFormula = string_type(),
-                 int a_iPos = -1);
-    ParserError( EErrorCodes a_iErrc, 
-                 int a_iPos, 
-                 const string_type &sTok);
-    ParserError( const char_type *a_szMsg, 
-                 int a_iPos = -1, 
-                 const string_type &sTok = string_type());
-    ParserError(const ParserError &a_Obj);
-    ParserError& operator=(const ParserError &a_Obj);
-   ~ParserError();
-
-    void SetFormula(const string_type &a_strFormula);
-    const string_type& GetExpr() const;
-    const string_type& GetMsg() const;
-    int GetPos() const;
-    const string_type& GetToken() const;
-    EErrorCodes GetCode() const;
-
-private:
-    string_type m_strMsg;     ///< The message string
-    string_type m_strFormula; ///< Formula string
-    string_type m_strTok;     ///< Token related with the error
-    int m_iPos;               ///< Formula position related to the error 
-    EErrorCodes m_iErrc;      ///< Error code
-    const ParserErrorMsg &m_ErrMsg;
-};		
-
+	/** \brief A class that handles the error messages.	*/
+	class ParserErrorMsg final
+	{
+	public:
+		static const ParserErrorMsg& Instance();
+		string_type operator[](unsigned a_iIdx) const;
+
+	private:
+		ParserErrorMsg& operator=(const ParserErrorMsg&) = delete;
+		ParserErrorMsg(const ParserErrorMsg&) = delete;
+		ParserErrorMsg();
+
+		~ParserErrorMsg() = default;
+
+		std::vector<string_type>  m_vErrMsg;  ///< A vector with the predefined error messages
+	};
+
+
+	/** \brief Error class of the parser.
+
+	  Part of the math parser package.
+	*/
+	class API_EXPORT_CXX ParserError
+	{
+	private:
+
+		/** \brief Replace all ocuurences of a substring with another string. */
+		void ReplaceSubString(string_type& strSource, const string_type& strFind, const string_type& strReplaceWith);
+		void Reset();
+
+	public:
+
+		ParserError();
+		explicit ParserError(EErrorCodes a_iErrc);
+		explicit ParserError(const string_type& sMsg);
+		ParserError(EErrorCodes a_iErrc, const string_type& sTok, const string_type& sFormula = string_type(), int a_iPos = -1);
+		ParserError(EErrorCodes a_iErrc, int a_iPos, const string_type& sTok);
+		ParserError(const char_type* a_szMsg, int a_iPos = -1, const string_type& sTok = string_type());
+		ParserError(const ParserError& a_Obj);
+
+		ParserError& operator=(const ParserError& a_Obj);
+		~ParserError();
+
+		void SetFormula(const string_type& a_strFormula);
+		const string_type& GetExpr() const;
+		const string_type& GetMsg() const;
+		int GetPos() const;
+		const string_type& GetToken() const;
+		EErrorCodes GetCode() const;
+
+	private:
+		string_type m_strMsg;     ///< The message string
+		string_type m_strFormula; ///< Formula string
+		string_type m_strTok;     ///< Token related with the error
+		int m_iPos;               ///< Formula position related to the error 
+		EErrorCodes m_iErrc;      ///< Error code
+		const ParserErrorMsg& m_ErrMsg;
+	};
 } // namespace mu
 
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
+
 #endif
 
diff --git a/include/muParserFixes.h b/include/muParserFixes.h
index 10369be..8042d28 100644
--- a/include/muParserFixes.h
+++ b/include/muParserFixes.h
@@ -1,102 +1,87 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef MU_PARSER_FIXES_H
 #define MU_PARSER_FIXES_H
 
 /** \file
-    \brief This file contains compatibility fixes for some platforms.
+	\brief This file contains compatibility fixes for some platforms.
 */
 
 //
 // Compatibility fixes
 //
 
-//---------------------------------------------------------------------------
-//
-// Intel Compiler
-//
-//---------------------------------------------------------------------------
-
-#ifdef __INTEL_COMPILER
-
-// remark #981: operands are evaluated in unspecified order
-// disabled -> completely pointless if the functions do not have side effects
-//
-#pragma warning(disable:981)
-
-// remark #383: value copied to temporary, reference to temporary used
-#pragma warning(disable:383)
-
-// remark #1572: floating-point equality and inequality comparisons are unreliable
-// disabled -> everyone knows it, the parser passes this problem
-//             deliberately to the user
-#pragma warning(disable:1572)
-
-#endif
-
-
 /* From http://gcc.gnu.org/wiki/Visibility */
 /* Generic helper definitions for shared library support */
 #if defined _WIN32 || defined __CYGWIN__
-#define MUPARSER_HELPER_DLL_IMPORT __declspec(dllimport)
-#define MUPARSER_HELPER_DLL_EXPORT __declspec(dllexport)
-#define MUPARSER_HELPER_DLL_LOCAL
-#else
-#if __GNUC__ >= 4
-#define MUPARSER_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
-#define MUPARSER_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
-#define MUPARSER_HELPER_DLL_LOCAL  __attribute__ ((visibility ("hidden")))
+	#define MUPARSER_HELPER_DLL_IMPORT __declspec(dllimport)
+	#define MUPARSER_HELPER_DLL_EXPORT __declspec(dllexport)
+	#define MUPARSER_HELPER_DLL_LOCAL
 #else
-#define MUPARSER_HELPER_DLL_IMPORT
-#define MUPARSER_HELPER_DLL_EXPORT
-#define MUPARSER_HELPER_DLL_LOCAL
-#endif
+	#if __GNUC__ >= 4
+		#define MUPARSER_HELPER_DLL_IMPORT __attribute__ ((visibility ("default")))
+		#define MUPARSER_HELPER_DLL_EXPORT __attribute__ ((visibility ("default")))
+		#define MUPARSER_HELPER_DLL_LOCAL  __attribute__ ((visibility ("hidden")))
+	#else
+		#define MUPARSER_HELPER_DLL_IMPORT
+		#define MUPARSER_HELPER_DLL_EXPORT
+		#define MUPARSER_HELPER_DLL_LOCAL
+	#endif
 #endif
 
-/* Now we use the generic helper definitions above to define API_EXPORT_CXX and MUPARSER_LOCAL.
- * API_EXPORT_CXX is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
- * MUPARSER_LOCAL is used for non-api symbols. */
+/* 
+	Now we use the generic helper definitions above to define API_EXPORT_CXX and MUPARSER_LOCAL.
+	API_EXPORT_CXX is used for the public API symbols. It either DLL imports or DLL exports (or does nothing for static build)
+	MUPARSER_LOCAL is used for non-api symbols.
+*/
 
 #ifndef MUPARSER_STATIC /* defined if muParser is compiled as a DLL */
-#ifdef MUPARSERLIB_EXPORTS /* defined if we are building the muParser DLL (instead of using it) */
-#define API_EXPORT_CXX MUPARSER_HELPER_DLL_EXPORT
-#else
-#define API_EXPORT_CXX MUPARSER_HELPER_DLL_IMPORT
-#endif /* MUPARSER_DLL_EXPORTS */
-#define MUPARSER_LOCAL MUPARSER_HELPER_DLL_LOCAL
+
+	#ifdef MUPARSERLIB_EXPORTS /* defined if we are building the muParser DLL (instead of using it) */
+		#define API_EXPORT_CXX MUPARSER_HELPER_DLL_EXPORT
+	#else
+		#define API_EXPORT_CXX MUPARSER_HELPER_DLL_IMPORT
+	#endif /* MUPARSER_DLL_EXPORTS */
+	#define MUPARSER_LOCAL MUPARSER_HELPER_DLL_LOCAL
+
 #else /* MUPARSER_STATIC is defined: this means muParser is a static lib. */
-#define API_EXPORT_CXX
-#define MUPARSER_LOCAL
+
+	#define API_EXPORT_CXX
+	#define MUPARSER_LOCAL
+
 #endif /* !MUPARSER_STATIC */
 
 
 #ifdef _WIN32
-#define API_EXPORT(TYPE) API_EXPORT_CXX TYPE __cdecl
+	#define API_EXPORT(TYPE) API_EXPORT_CXX TYPE __cdecl
 #else
-#define API_EXPORT(TYPE) TYPE
+	#define API_EXPORT(TYPE) TYPE
 #endif
 
 
diff --git a/include/muParserInt.h b/include/muParserInt.h
index 01bfb9a..513f092 100644
--- a/include/muParserInt.h
+++ b/include/muParserInt.h
@@ -1,26 +1,29 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef MU_PARSER_INT_H
@@ -31,108 +34,108 @@
 
 
 /** \file
-    \brief Definition of a parser using integer value.
+	\brief Definition of a parser using integer value.
 */
 
 
 namespace mu
 {
 
-/** \brief Mathematical expressions parser.
-  
-  This version of the parser handles only integer numbers. It disables the built in operators thus it is 
-  slower than muParser. Integer values are stored in the double value_type and converted if needed.
-*/
-class ParserInt : public ParserBase
-{
-private:
-    static int  Round(value_type v) { return (int)(v + ((v>=0) ? 0.5 : -0.5) ); };
-  
-    static value_type  Abs(value_type);
-    static value_type  Sign(value_type);
-    static value_type  Ite(value_type, value_type, value_type);
-    // !! The unary Minus is a MUST, otherwise you can't use negative signs !!
-    static value_type  UnaryMinus(value_type);
-    // Functions with variable number of arguments
-    static value_type  Sum(const value_type* a_afArg, int a_iArgc);  // sum
-    static value_type  Min(const value_type* a_afArg, int a_iArgc);  // minimum
-    static value_type  Max(const value_type* a_afArg, int a_iArgc);  // maximum
-    // binary operator callbacks
-    static value_type  Add(value_type v1, value_type v2);
-    static value_type  Sub(value_type v1, value_type v2);
-    static value_type  Mul(value_type v1, value_type v2);
-    static value_type  Div(value_type v1, value_type v2);
-    static value_type  Mod(value_type v1, value_type v2);
-    static value_type  Pow(value_type v1, value_type v2);
-    static value_type  Shr(value_type v1, value_type v2);
-    static value_type  Shl(value_type v1, value_type v2);
-    static value_type  LogAnd(value_type v1, value_type v2);
-    static value_type  LogOr(value_type v1, value_type v2);
-    static value_type  And(value_type v1, value_type v2);
-    static value_type  Or(value_type v1, value_type v2);
-    static value_type  Xor(value_type v1, value_type v2);
-    static value_type  Less(value_type v1, value_type v2);
-    static value_type  Greater(value_type v1, value_type v2);
-    static value_type  LessEq(value_type v1, value_type v2);
-    static value_type  GreaterEq(value_type v1, value_type v2);
-    static value_type  Equal(value_type v1, value_type v2);
-    static value_type  NotEqual(value_type v1, value_type v2);
-    static value_type  Not(value_type v1);
-
-    static int IsHexVal(const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);
-    static int IsBinVal(const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);
-    static int IsVal   (const char_type* a_szExpr, int *a_iPos, value_type *a_iVal);
-
-    /** \brief A facet class used to change decimal and thousands separator. */
-    template<class TChar>
-    class change_dec_sep : public std::numpunct<TChar>
-    {
-    public:
-      
-      explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)
-        :std::numpunct<TChar>()
-        ,m_cDecPoint(cDecSep)
-        ,m_cThousandsSep(cThousandsSep)
-        ,m_nGroup(nGroup)
-      {}
-      
-    protected:
-      
-      virtual char_type do_decimal_point() const
-      {
-        return m_cDecPoint;
-      }
-
-      virtual char_type do_thousands_sep() const
-      {
-        return m_cThousandsSep;
-      }
-
-      virtual std::string do_grouping() const 
-      { 
-        // fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4
-        // courtesy of Jens Bartsch
-        // original code:
-        //        return std::string(1, (char)m_nGroup); 
-        // new code:
-        return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
-      }
-
-    private:
-
-      int m_nGroup;
-      char_type m_cDecPoint;  
-      char_type m_cThousandsSep;
-    };
-
-public:
-    ParserInt();
-
-    virtual void InitFun();
-    virtual void InitOprt();
-    virtual void InitConst();
-    virtual void InitCharSets();
-};
+	/** \brief Mathematical expressions parser.
+
+	  This version of the parser handles only integer numbers. It disables the built in operators thus it is
+	  slower than muParser. Integer values are stored in the double value_type and converted if needed.
+	*/
+	class ParserInt : public ParserBase
+	{
+	private:
+		static int  Round(value_type v) { return (int)(v + ((v >= 0) ? 0.5 : -0.5)); };
+
+		static value_type  Abs(value_type);
+		static value_type  Sign(value_type);
+		static value_type  Ite(value_type, value_type, value_type);
+		// !! The unary Minus is a MUST, otherwise you can't use negative signs !!
+		static value_type  UnaryMinus(value_type);
+		// Functions with variable number of arguments
+		static value_type  Sum(const value_type* a_afArg, int a_iArgc);  // sum
+		static value_type  Min(const value_type* a_afArg, int a_iArgc);  // minimum
+		static value_type  Max(const value_type* a_afArg, int a_iArgc);  // maximum
+		// binary operator callbacks
+		static value_type  Add(value_type v1, value_type v2);
+		static value_type  Sub(value_type v1, value_type v2);
+		static value_type  Mul(value_type v1, value_type v2);
+		static value_type  Div(value_type v1, value_type v2);
+		static value_type  Mod(value_type v1, value_type v2);
+		static value_type  Pow(value_type v1, value_type v2);
+		static value_type  Shr(value_type v1, value_type v2);
+		static value_type  Shl(value_type v1, value_type v2);
+		static value_type  LogAnd(value_type v1, value_type v2);
+		static value_type  LogOr(value_type v1, value_type v2);
+		static value_type  And(value_type v1, value_type v2);
+		static value_type  Or(value_type v1, value_type v2);
+		static value_type  Xor(value_type v1, value_type v2);
+		static value_type  Less(value_type v1, value_type v2);
+		static value_type  Greater(value_type v1, value_type v2);
+		static value_type  LessEq(value_type v1, value_type v2);
+		static value_type  GreaterEq(value_type v1, value_type v2);
+		static value_type  Equal(value_type v1, value_type v2);
+		static value_type  NotEqual(value_type v1, value_type v2);
+		static value_type  Not(value_type v1);
+
+		static int IsHexVal(const char_type* a_szExpr, int* a_iPos, value_type* a_iVal);
+		static int IsBinVal(const char_type* a_szExpr, int* a_iPos, value_type* a_iVal);
+		static int IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_iVal);
+
+		/** \brief A facet class used to change decimal and thousands separator. */
+		template<class TChar>
+		class change_dec_sep : public std::numpunct<TChar>
+		{
+		public:
+
+			explicit change_dec_sep(char_type cDecSep, char_type cThousandsSep = 0, int nGroup = 3)
+				:std::numpunct<TChar>()
+				, m_cDecPoint(cDecSep)
+				, m_cThousandsSep(cThousandsSep)
+				, m_nGroup(nGroup)
+			{}
+
+		protected:
+
+			virtual char_type do_decimal_point() const
+			{
+				return m_cDecPoint;
+			}
+
+			virtual char_type do_thousands_sep() const
+			{
+				return m_cThousandsSep;
+			}
+
+			virtual std::string do_grouping() const
+			{
+				// fix for issue 4: https://code.google.com/p/muparser/issues/detail?id=4
+				// courtesy of Jens Bartsch
+				// original code:
+				//        return std::string(1, (char)m_nGroup); 
+				// new code:
+				return std::string(1, (char)(m_cThousandsSep > 0 ? m_nGroup : CHAR_MAX));
+			}
+
+		private:
+
+			int m_nGroup;
+			char_type m_cDecPoint;
+			char_type m_cThousandsSep;
+		};
+
+	public:
+		ParserInt();
+
+		void InitFun() override;
+		void InitOprt() override;
+		void InitConst() override;
+		void InitCharSets() override;
+	};
 
 } // namespace mu
 
diff --git a/include/muParserStack.h b/include/muParserStack.h
deleted file mode 100644
index a4c20a5..0000000
--- a/include/muParserStack.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
-*/
-
-#ifndef MU_PARSER_STACK_H
-#define MU_PARSER_STACK_H
-
-#include <cassert>
-#include <string>
-#include <stack>
-#include <vector>
-
-#include "muParserError.h"
-#include "muParserToken.h"
-
-/** \file 
-    \brief This file defines the stack used by muparser.
-*/
-
-namespace mu
-{
-
-  /** \brief Parser stack implementation. 
-
-      Stack implementation based on a std::stack. The behaviour of pop() had been
-      slightly changed in order to get an error code if the stack is empty.
-      The stack is used within the Parser both as a value stack and as an operator stack.
-
-      \author (C) 2004-2011 Ingo Berg 
-  */
-  template <typename TValueType>
-  class ParserStack 
-  {
-    private:
-
-      /** \brief Type of the underlying stack implementation. */
-      typedef std::stack<TValueType, std::vector<TValueType> > impl_type;
-      
-      impl_type m_Stack;  ///< This is the actual stack.
-
-    public:	
-  	 
-      //---------------------------------------------------------------------------
-      ParserStack()
-        :m_Stack()
-      {}
-
-      //---------------------------------------------------------------------------
-      virtual ~ParserStack()
-      {}
-
-      //---------------------------------------------------------------------------
-      /** \brief Pop a value from the stack.
-       
-        Unlike the standard implementation this function will return the value that
-        is going to be taken from the stack.
-
-        \throw ParserException in case the stack is empty.
-        \sa pop(int &a_iErrc)
-      */
-	    TValueType pop()
-      {
-        if (empty())
-          throw ParserError( _T("stack is empty.") );
-
-        TValueType el = top();
-        m_Stack.pop();
-        return el;
-      }
-
-      /** \brief Push an object into the stack. 
-
-          \param a_Val object to push into the stack.
-          \throw nothrow
-      */
-      void push(const TValueType& a_Val) 
-      { 
-        m_Stack.push(a_Val); 
-      }
-
-      /** \brief Return the number of stored elements. */
-      unsigned size() const
-      { 
-        return (unsigned)m_Stack.size(); 
-      }
-
-      /** \brief Returns true if stack is empty false otherwise. */
-      bool empty() const
-      {
-        return m_Stack.empty(); 
-      }
-       
-      /** \brief Return reference to the top object in the stack. 
-       
-          The top object is the one pushed most recently.
-      */
-      TValueType& top() 
-      { 
-        return m_Stack.top(); 
-      }
-  };
-} // namespace MathUtils
-
-#endif
diff --git a/include/muParserTemplateMagic.h b/include/muParserTemplateMagic.h
index 1caeb4b..77fe549 100644
--- a/include/muParserTemplateMagic.h
+++ b/include/muParserTemplateMagic.h
@@ -1,3 +1,31 @@
+/*
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
 #ifndef MU_PARSER_TEMPLATE_MAGIC_H
 #define MU_PARSER_TEMPLATE_MAGIC_H
 
@@ -7,107 +35,164 @@
 
 namespace mu
 {
-  //-----------------------------------------------------------------------------------------------
-  //
-  // Compile time type detection
-  //
-  //-----------------------------------------------------------------------------------------------
-
-  /** \brief A class singling out integer types at compile time using 
-             template meta programming.
-  */
-  template<typename T>
-  struct TypeInfo
-  {
-    static bool IsInteger() { return false; }
-  };
-
-  template<>
-  struct TypeInfo<char>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<short>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<int>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<long>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<unsigned char>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<unsigned short>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<unsigned int>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-  template<>
-  struct TypeInfo<unsigned long>
-  {
-    static bool IsInteger() { return true;  }
-  };
-
-
-  //-----------------------------------------------------------------------------------------------
-  //
-  // Standard math functions with dummy overload for integer types
-  //
-  //-----------------------------------------------------------------------------------------------
-
-  /** \brief A template class for providing wrappers for essential math functions.
-
-    This template is spezialized for several types in order to provide a unified interface
-    for parser internal math function calls regardless of the data type.
-  */
-  template<typename T>
-  struct MathImpl
-  {
-    static T Sin(T v)   { return sin(v);  }
-    static T Cos(T v)   { return cos(v);  }
-    static T Tan(T v)   { return tan(v);  }
-    static T ASin(T v)  { return asin(v); }
-    static T ACos(T v)  { return acos(v); }
-    static T ATan(T v)  { return atan(v); }
-    static T ATan2(T v1, T v2) { return atan2(v1, v2); }
-    static T Sinh(T v)  { return sinh(v); }
-    static T Cosh(T v)  { return cosh(v); }
-    static T Tanh(T v)  { return tanh(v); }
-    static T ASinh(T v) { return log(v + sqrt(v * v + 1)); }
-    static T ACosh(T v) { return log(v + sqrt(v * v - 1)); }
-    static T ATanh(T v) { return ((T)0.5 * log((1 + v) / (1 - v))); }
-    static T Log(T v)   { return log(v); } 
-    static T Log2(T v)  { return log(v)/log((T)2); } // Logarithm base 2
-    static T Log10(T v) { return log10(v); }         // Logarithm base 10
-    static T Exp(T v)   { return exp(v);   }
-    static T Abs(T v)   { return (v>=0) ? v : -v; }
-    static T Sqrt(T v)  { return sqrt(v); }
-    static T Rint(T v)  { return floor(v + (T)0.5); }
-    static T Sign(T v)  { return (T)((v<0) ? -1 : (v>0) ? 1 : 0); }
-    static T Pow(T v1, T v2) { return std::pow(v1, v2); }
-  };
+	//-----------------------------------------------------------------------------------------------
+	//
+	// Compile time type detection
+	//
+	//-----------------------------------------------------------------------------------------------
+
+	/** \brief A class singling out integer types at compile time using
+			   template meta programming.
+	*/
+	template<typename T>
+	struct TypeInfo
+	{
+		static bool IsInteger() { return false; }
+	};
+
+	template<>
+	struct TypeInfo<char>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<short>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<int>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<long>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<unsigned char>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<unsigned short>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<unsigned int>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+	template<>
+	struct TypeInfo<unsigned long>
+	{
+		static bool IsInteger() { return true; }
+	};
+
+
+	//-----------------------------------------------------------------------------------------------
+	//
+	// Standard math functions with dummy overload for integer types
+	//
+	//-----------------------------------------------------------------------------------------------
+
+	/** \brief A template class for providing wrappers for essential math functions.
+
+	  This template is spezialized for several types in order to provide a unified interface
+	  for parser internal math function calls regardless of the data type.
+	*/
+	template<typename T>
+	struct MathImpl
+	{
+		static T Sin(T v) { return sin(v); }
+		static T Cos(T v) { return cos(v); }
+		static T Tan(T v) { return tan(v); }
+		static T ASin(T v) { return asin(v); }
+		static T ACos(T v) { return acos(v); }
+		static T ATan(T v) { return atan(v); }
+		static T ATan2(T v1, T v2) { return atan2(v1, v2); }
+		static T Sinh(T v) { return sinh(v); }
+		static T Cosh(T v) { return cosh(v); }
+		static T Tanh(T v) { return tanh(v); }
+		static T ASinh(T v) { return log(v + sqrt(v * v + 1)); }
+		static T ACosh(T v) { return log(v + sqrt(v * v - 1)); }
+		static T ATanh(T v) { return ((T)0.5 * log((1 + v) / (1 - v))); }
+		static T Log(T v) { return log(v); }
+		static T Log2(T v) { return log(v) / log((T)2); } // Logarithm base 2
+		static T Log10(T v) { return log10(v); }         // Logarithm base 10
+		static T Exp(T v) { return exp(v); }
+		static T Abs(T v) { return (v >= 0) ? v : -v; }
+		static T Sqrt(T v) { return sqrt(v); }
+		static T Rint(T v) { return floor(v + (T)0.5); }
+		static T Sign(T v) { return (T)((v < 0) ? -1 : (v > 0) ? 1 : 0); }
+		static T Pow(T v1, T v2) { return std::pow(v1, v2); }
+
+		static T UnaryMinus(T v) { return -v; }
+		static T UnaryPlus(T v) { return v; }
+
+		static T Sum(const T *a_afArg, int a_iArgc)
+		{
+			if (!a_iArgc)
+				throw ParserError(_T("too few arguments for function sum."));
+
+			T fRes = 0;
+			for (int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
+			return fRes;
+		}
+
+		static T Avg(const T *a_afArg, int a_iArgc)
+		{
+			if (!a_iArgc)
+				throw ParserError(_T("too few arguments for function avg."));
+
+			T fRes = 0;
+			for (int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
+			return fRes / (T)a_iArgc;
+		}
+
+		static T Min(const T *a_afArg, int a_iArgc)
+		{
+			if (!a_iArgc)
+				throw ParserError(_T("too few arguments for function min."));
+
+			T fRes = a_afArg[0];
+			for (int i = 0; i < a_iArgc; ++i)
+				fRes = std::min(fRes, a_afArg[i]);
+
+			return fRes;
+		}
+
+		static T Max(const T *a_afArg, int a_iArgc)
+		{
+			if (!a_iArgc)
+				throw ParserError(_T("too few arguments for function max."));
+
+			T fRes = a_afArg[0];
+			for (int i = 0; i < a_iArgc; ++i) fRes = std::max(fRes, a_afArg[i]);
+
+			return fRes;
+		}
+
+
+#if defined (__GNUG__)
+		// Bei zu genauer definition von pi kann die Berechnung von
+		// sin(pi*a) mit a=1 10 x langsamer sein! 
+		static constexpr T CONST_PI = (T)3.141592653589;
+#else
+		static constexpr T CONST_PI = (T)3.141592653589793238462643;
+#endif
+
+		static constexpr T CONST_E = (T)2.718281828459045235360287;
+	};
 }
 
 #endif
diff --git a/include/muParserTest.h b/include/muParserTest.h
index 30c2c6e..22d2075 100644
--- a/include/muParserTest.h
+++ b/include/muParserTest.h
@@ -1,26 +1,29 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef MU_PARSER_TEST_H
@@ -28,187 +31,266 @@
 
 #include <string>
 #include <cstdlib>
+#include <cstdint>
 #include <numeric> // for accumulate
 #include "muParser.h"
 #include "muParserInt.h"
 
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 4251)  // ...needs to have dll-interface to be used by clients of class ...
+#endif
+
 /** \file
-    \brief This file contains the parser test class.
+	\brief This file contains the parser test class.
 */
 
 namespace mu
 {
-  /** \brief Namespace for test cases. */
-  namespace Test
-  {
-    //------------------------------------------------------------------------------
-    /** \brief Test cases for unit testing.
-
-      (C) 2004-2011 Ingo Berg
-    */
-    class API_EXPORT_CXX ParserTester // final
-    {
-    private:
-        static int c_iCount;
-
-        // Multiarg callbacks
-        static value_type f1of1(value_type v) { return v;};
-      	
-        static value_type f1of2(value_type v, value_type  ) {return v;};
-        static value_type f2of2(value_type  , value_type v) {return v;};
-
-        static value_type f1of3(value_type v, value_type  , value_type  ) {return v;};
-        static value_type f2of3(value_type  , value_type v, value_type  ) {return v;};
-        static value_type f3of3(value_type  , value_type  , value_type v) {return v;};
-      	
-        static value_type f1of4(value_type v, value_type,   value_type  , value_type  ) {return v;}
-        static value_type f2of4(value_type  , value_type v, value_type  , value_type  ) {return v;}
-        static value_type f3of4(value_type  , value_type,   value_type v, value_type  ) {return v;}
-        static value_type f4of4(value_type  , value_type,   value_type  , value_type v) {return v;}
-
-        static value_type f1of5(value_type v, value_type,   value_type  , value_type  , value_type  ) { return v; }
-        static value_type f2of5(value_type  , value_type v, value_type  , value_type  , value_type  ) { return v; }
-        static value_type f3of5(value_type  , value_type,   value_type v, value_type  , value_type  ) { return v; }
-        static value_type f4of5(value_type  , value_type,   value_type  , value_type v, value_type  ) { return v; }
-        static value_type f5of5(value_type  , value_type,   value_type  , value_type  , value_type v) { return v; }
-
-        static value_type Min(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1<a_fVal2) ? a_fVal1 : a_fVal2; }
-  	    static value_type Max(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1>a_fVal2) ? a_fVal1 : a_fVal2; }
-
-        static value_type plus2(value_type v1) { return v1+2; }
-        static value_type times3(value_type v1) { return v1*3; }
-        static value_type sqr(value_type v1) { return v1*v1; }
-        static value_type sign(value_type v) { return -v; }
-        static value_type add(value_type v1, value_type v2) { return v1+v2; }
-        static value_type land(value_type v1, value_type v2) { return (int)v1 & (int)v2; }
-        
-
-        static value_type FirstArg(const value_type* a_afArg, int a_iArgc)
-        {
-          if (!a_iArgc)	
-            throw mu::Parser::exception_type( _T("too few arguments for function FirstArg.") );
-
-          return  a_afArg[0];
-        }
-
-        static value_type LastArg(const value_type* a_afArg, int a_iArgc)
-        {
-          if (!a_iArgc)	
-            throw mu::Parser::exception_type( _T("too few arguments for function LastArg.") );
-
-          return  a_afArg[a_iArgc-1];
-        }
-
-        static value_type Sum(const value_type* a_afArg, int a_iArgc)
-        { 
-          if (!a_iArgc)	
-            throw mu::Parser::exception_type( _T("too few arguments for function sum.") );
-
-          value_type fRes=0;
-          for (int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];
-          return fRes;
-        }
-
-        static value_type Rnd(value_type v)
-        {
-          return (value_type)(1+(v*std::rand()/(RAND_MAX+1.0)));
-        }
-
-        static value_type RndWithString(const char_type*)
-        {
-          return (value_type)( 1 + (1000.0f * std::rand() / (RAND_MAX + 1.0) ) );
-        }
-
-        static value_type Ping()
-        { 
-          return 10; 
-        }
-
-        static value_type ValueOf(const char_type*)      
-        { 
-          return 123; 
-        }
-
-        static value_type StrFun1(const char_type* v1)                               
-        { 
-          int val(0);
-          stringstream_type(v1) >> val;
-          return (value_type)val;
-        }
-
-        static value_type StrFun2(const char_type* v1, value_type v2)                
-        { 
-          int val(0);
-          stringstream_type(v1) >> val;
-          return (value_type)(val + v2);
-        }
-        
-        static value_type StrFun3(const char_type* v1, value_type v2, value_type v3) 
-        { 
-          int val(0);
-          stringstream_type(v1) >> val;
-          return val + v2 + v3;
-        }
-
-        static value_type StrToFloat(const char_type* a_szMsg)
-        {
-          value_type val(0);
-          stringstream_type(a_szMsg) >> val;
-          return val;
-        }
-
-        // postfix operator callback
-        static value_type Mega(value_type a_fVal)  { return a_fVal * (value_type)1e6; }
-        static value_type Micro(value_type a_fVal) { return a_fVal * (value_type)1e-6; }
-        static value_type Milli(value_type a_fVal) { return a_fVal / (value_type)1e3; }
-
-        // Custom value recognition
-        static int IsHexVal(const char_type *a_szExpr, int *a_iPos, value_type *a_fVal);
-
-        int TestNames();
-        int TestSyntax();
-        int TestMultiArg();
-        int TestPostFix();
-        int TestExpression();
-        int TestInfixOprt();
-        int TestBinOprt();
-        int TestVarConst();
-        int TestInterface();
-        int TestException();
-        int TestStrArg();
-        int TestIfThenElse();
-        int TestBulkMode();
-
-        void Abort() const;
-
-    public:
-        typedef int (ParserTester::*testfun_type)();
-
-	      ParserTester();
-	      void Run();
-
-    private:
-        std::vector<testfun_type> m_vTestFun;
-	      void AddTest(testfun_type a_pFun);
-
-        // Test Double Parser
-        int EqnTest(const string_type& a_str, double a_fRes, bool a_fPass);
-        int EqnTestWithVarChange(const string_type& a_str, 
-                                 double a_fRes1, 
-                                 double a_fVar1, 
-                                 double a_fRes2, 
-                                 double a_fVar2);
-        int ThrowTest(const string_type& a_str, int a_iErrc, bool a_bFail = true);
-
-        // Test Int Parser
-        int EqnTestInt(const string_type& a_str, double a_fRes, bool a_fPass);
-
-        // Test Bulkmode
-        int EqnTestBulk(const string_type& a_str, double a_fRes[4], bool a_fPass);
-    };
-  } // namespace Test
+	/** \brief Namespace for test cases. */
+	namespace Test
+	{
+		/** \brief Test cases for unit testing.	*/
+		class API_EXPORT_CXX ParserTester final
+		{
+		private:
+			static int c_iCount;
+
+			static value_type f0() { return 42; };
+
+			// Multiarg callbacks
+			static value_type f1of1(value_type v) { return v; };
+
+			static value_type f1of2(value_type v, value_type) { return v; };
+			static value_type f2of2(value_type, value_type v) { return v; };
+
+			static value_type f1of3(value_type v, value_type, value_type) { return v; };
+			static value_type f2of3(value_type, value_type v, value_type) { return v; };
+			static value_type f3of3(value_type, value_type, value_type v) { return v; };
+
+			static value_type f1of4(value_type v, value_type, value_type, value_type) { return v; }
+			static value_type f2of4(value_type, value_type v, value_type, value_type) { return v; }
+			static value_type f3of4(value_type, value_type, value_type v, value_type) { return v; }
+			static value_type f4of4(value_type, value_type, value_type, value_type v) { return v; }
+
+			static value_type f1of5(value_type v, value_type, value_type, value_type, value_type) { return v; }
+			static value_type f2of5(value_type, value_type v, value_type, value_type, value_type) { return v; }
+			static value_type f3of5(value_type, value_type, value_type v, value_type, value_type) { return v; }
+			static value_type f4of5(value_type, value_type, value_type, value_type v, value_type) { return v; }
+			static value_type f5of5(value_type, value_type, value_type, value_type, value_type v) { return v; }
+
+			static value_type Min(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1 < a_fVal2) ? a_fVal1 : a_fVal2; }
+			static value_type Max(value_type a_fVal1, value_type a_fVal2) { return (a_fVal1 > a_fVal2) ? a_fVal1 : a_fVal2; }
+
+			static value_type plus2(value_type v1) { return v1 + 2; }
+			static value_type times3(value_type v1) { return v1 * 3; }
+			static value_type sqr(value_type v1) { return v1 * v1; }
+			static value_type sign(value_type v) { return -v; }
+			static value_type add(value_type v1, value_type v2) { return v1 + v2; }
+			static value_type land(value_type v1, value_type v2) { return (int)v1 & (int)v2; }
+
+
+			static value_type FirstArg(const value_type* a_afArg, int a_iArgc)
+			{
+				if (!a_iArgc)
+					throw mu::Parser::exception_type(_T("too few arguments for function FirstArg."));
+
+				return  a_afArg[0];
+			}
+
+			static value_type LastArg(const value_type* a_afArg, int a_iArgc)
+			{
+				if (!a_iArgc)
+					throw mu::Parser::exception_type(_T("too few arguments for function LastArg."));
+
+				return  a_afArg[a_iArgc - 1];
+			}
+
+			static value_type Sum(const value_type* a_afArg, int a_iArgc)
+			{
+				if (!a_iArgc)
+					throw mu::Parser::exception_type(_T("too few arguments for function sum."));
+
+				value_type fRes = 0;
+				for (int i = 0; i < a_iArgc; ++i) fRes += a_afArg[i];
+				return fRes;
+			}
+
+			static value_type Rnd(value_type v)
+			{
+				return (value_type)(1 + (v * std::rand() / (RAND_MAX + 1.0)));
+			}
+
+			static value_type RndWithString(const char_type*)
+			{
+				return (value_type)(1.0 + (1000.0 * std::rand() / (RAND_MAX + 1.0)));
+			}
+
+			static value_type Ping()
+			{
+				return 10;
+			}
+
+			static value_type ValueOf(const char_type*)
+			{
+				return 123;
+			}
+
+			static value_type StrFun1(const char_type* v1)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return (value_type)val;
+			}
+
+			static value_type StrFun2(const char_type* v1, value_type v2)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return (value_type)(val + v2);
+			}
+
+			static value_type StrFun3(const char_type* v1, value_type v2, value_type v3)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return val + v2 + v3;
+			}
+
+			static value_type StrFun4(const char_type* v1, value_type v2, value_type v3, value_type v4)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return val + v2 + v3 + v4;
+			}
+
+			static value_type StrFun5(const char_type* v1, value_type v2, value_type v3, value_type v4, value_type v5)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return val + v2 + v3 + v4 + v5;
+			}
+
+			static value_type StrFun6(const char_type* v1, value_type v2, value_type v3, value_type v4, value_type v5, value_type v6)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return val + v2 + v3 + v4 + v5 + v6;
+			}
+
+			static value_type StrToFloat(const char_type* a_szMsg)
+			{
+				value_type val(0);
+				stringstream_type(a_szMsg) >> val;
+				return val;
+			}
+
+			// postfix operator callback
+			static value_type Mega(value_type a_fVal) 
+			{
+				return a_fVal * (value_type)1e6; 
+			}
+			
+			static value_type Micro(value_type a_fVal)
+			{
+				return a_fVal * (value_type)1e-6; 
+			}
+
+			static value_type Milli(value_type a_fVal) 
+			{
+				return a_fVal / (value_type)1e3; 
+			}
+
+			// Custom value recognition
+			static int IsHexVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal);
+
+			// With user data
+			static value_type FunUd0(void* data) 
+			{
+				return reinterpret_cast<std::intptr_t>(data); 
+			}
+
+			static value_type FunUd1(void* data, value_type v) 
+			{
+				return reinterpret_cast<std::intptr_t>(data) + v; 
+			}
+			
+			static value_type FunUd2(void* data, value_type v1, value_type v2) 
+			{
+				return reinterpret_cast<std::intptr_t>(data) + v1 + v2; 
+			}
+
+			static value_type FunUd10(void* data, value_type v1, value_type v2, value_type v3, value_type v4, value_type v5, value_type v6, value_type v7, value_type v8, value_type v9, value_type v10)
+			{
+				return reinterpret_cast<std::intptr_t>(data) + v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10;
+			}
+
+			static value_type StrFunUd3(void* data, const char_type* v1, value_type v2, value_type v3)
+			{
+				int val(0);
+				stringstream_type(v1) >> val;
+				return reinterpret_cast<std::intptr_t>(data) + val + v2 + v3;
+			}
+
+			static value_type SumUd(void* data, const value_type* a_afArg, int a_iArgc)
+			{
+				if (!a_iArgc)
+					throw mu::Parser::exception_type(_T("too few arguments for function sum."));
+
+				value_type fRes = 0;
+				for (int i = 0; i < a_iArgc; ++i) 
+					fRes += a_afArg[i];
+
+				return reinterpret_cast<std::intptr_t>(data) + fRes;
+			}
+
+			int TestNames();
+			int TestSyntax();
+			int TestMultiArg();
+			int TestPostFix();
+			int TestExpression();
+			int TestInfixOprt();
+			int TestBinOprt();
+			int TestVarConst();
+			int TestInterface();
+			int TestException();
+			int TestStrArg();
+			int TestIfThenElse();
+			int TestBulkMode();
+			int TestOssFuzzTestCases();
+			int TestOptimizer();
+
+			void Abort() const;
+
+		public:
+			typedef int (ParserTester::* testfun_type)();
+
+			ParserTester();
+			int Run();
+
+		private:
+			std::vector<testfun_type> m_vTestFun;
+			void AddTest(testfun_type a_pFun);
+
+			// Test Double Parser
+			int EqnTest(const string_type& a_str, double a_fRes, bool a_fPass);
+			int EqnTestWithVarChange(const string_type& a_str, double a_fRes1, double a_fVar1,	double a_fRes2,	double a_fVar2);
+			int ThrowTest(const string_type& a_str, int a_iErrc, bool a_bFail = true);
+
+			// Test Int Parser
+			int EqnTestInt(const string_type& a_str, double a_fRes, bool a_fPass);
+
+			// Test Bulkmode
+			int EqnTestBulk(const string_type& a_str, double a_fRes[4], bool a_fPass);
+
+		};
+	} // namespace Test
 } // namespace mu
 
+
+#if defined(_MSC_VER)
+	#pragma warning(pop)
 #endif
 
+#endif
 
diff --git a/include/muParserToken.h b/include/muParserToken.h
index 9060e63..7410a65 100644
--- a/include/muParserToken.h
+++ b/include/muParserToken.h
@@ -1,401 +1,524 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef MU_PARSER_TOKEN_H
 #define MU_PARSER_TOKEN_H
 
-#include <cassert>
 #include <string>
 #include <stack>
 #include <vector>
 #include <memory>
+#include <utility>
+#include <type_traits>
+#include <cstddef>
+
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
+#endif
 
 #include "muParserError.h"
 #include "muParserCallback.h"
 
 /** \file
-    \brief This file contains the parser token definition.
+	\brief This file contains the parser token definition.
 */
 
 namespace mu
 {
-  /** \brief Encapsulation of the data for a single formula token. 
-
-    Formula token implementation. Part of the Math Parser Package.
-    Formula tokens can be either one of the following:
-    <ul>
-      <li>value</li>
-      <li>variable</li>
-      <li>function with numerical arguments</li>
-      <li>functions with a string as argument</li>
-      <li>prefix operators</li>
-      <li>infix operators</li>
-	    <li>binary operator</li>
-    </ul>
-
-   \author (C) 2004-2013 Ingo Berg 
-  */
-  template<typename TBase, typename TString>
-  class ParserToken
-  {
-  private:
-
-      ECmdCode  m_iCode;  ///< Type of the token; The token type is a constant of type #ECmdCode.
-      ETypeCode m_iType;
-      void  *m_pTok;      ///< Stores Token pointer; not applicable for all tokens
-      int  m_iIdx;        ///< An otional index to an external buffer storing the token data
-      TString m_strTok;   ///< Token string
-      TString m_strVal;   ///< Value for string variables
-      value_type m_fVal;  ///< the value 
-      std::unique_ptr<ParserCallback> m_pCallback;
-
-  public:
-
-      //---------------------------------------------------------------------------
-      /** \brief Constructor (default).
-        
-          Sets token to an neutral state of type cmUNKNOWN.
-          \throw nothrow
-          \sa ECmdCode
-      */
-      ParserToken()
-        :m_iCode(cmUNKNOWN)
-        ,m_iType(tpVOID)
-        ,m_pTok(0)
-        ,m_iIdx(-1)
-        ,m_strTok()
-		,m_strVal()
-		,m_fVal(0)
-        ,m_pCallback()
-      {}
-
-      //------------------------------------------------------------------------------
-      /** \brief Create token from another one.
-      
-          Implemented by calling Assign(...)
-          \throw nothrow
-          \post m_iType==cmUNKNOWN
-          \sa #Assign
-      */
-      ParserToken(const ParserToken &a_Tok)
-      {
-        Assign(a_Tok);
-      }
-      
-      //------------------------------------------------------------------------------
-      /** \brief Assignment operator. 
-      
-          Copy token state from another token and return this.
-          Implemented by calling Assign(...).
-          \throw nothrow
-      */
-      ParserToken& operator=(const ParserToken &a_Tok)
-      {
-        Assign(a_Tok);
-        return *this;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Copy token information from argument.
-      
-          \throw nothrow
-      */
-      void Assign(const ParserToken &a_Tok)
-      {
-        m_iCode = a_Tok.m_iCode;
-        m_pTok = a_Tok.m_pTok;
-        m_strTok = a_Tok.m_strTok;
-        m_iIdx = a_Tok.m_iIdx;
-        m_strVal = a_Tok.m_strVal;
-        m_iType = a_Tok.m_iType;
-        m_fVal = a_Tok.m_fVal;
-        // create new callback object if a_Tok has one 
-        m_pCallback.reset(a_Tok.m_pCallback.get() ? a_Tok.m_pCallback->Clone() : 0);
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Assign a token type. 
-
-        Token may not be of type value, variable or function. Those have separate set functions. 
-
-        \pre [assert] a_iType!=cmVAR
-        \pre [assert] a_iType!=cmVAL
-        \pre [assert] a_iType!=cmFUNC
-        \post m_fVal = 0
-        \post m_pTok = 0
-      */
-      ParserToken& Set(ECmdCode a_iType, const TString &a_strTok=TString())
-      {
-        // The following types can't be set this way, they have special Set functions
-        assert(a_iType!=cmVAR);
-        assert(a_iType!=cmVAL);
-        assert(a_iType!=cmFUNC);
-
-        m_iCode = a_iType;
-        m_iType = tpVOID;
-        m_pTok = 0;
-        m_strTok = a_strTok;
-        m_iIdx = -1;
-
-        return *this;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Set Callback type. */
-      ParserToken& Set(const ParserCallback &a_pCallback, const TString &a_sTok)
-      {
-        assert(a_pCallback.GetAddr());
-
-        m_iCode = a_pCallback.GetCode();
-        m_iType = tpVOID;
-        m_strTok = a_sTok;
-        m_pCallback.reset(new ParserCallback(a_pCallback));
-
-        m_pTok = 0;
-        m_iIdx = -1;
-        
-        return *this;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Make this token a value token. 
-      
-          Member variables not necessary for value tokens will be invalidated.
-          \throw nothrow
-      */
-      ParserToken& SetVal(TBase a_fVal, const TString &a_strTok=TString())
-      {
-        m_iCode = cmVAL;
-        m_iType = tpDBL;
-        m_fVal = a_fVal;
-        m_strTok = a_strTok;
-        m_iIdx = -1;
-        
-        m_pTok = 0;
-        m_pCallback.reset(0);
-
-        return *this;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief make this token a variable token. 
-      
-          Member variables not necessary for variable tokens will be invalidated.
-          \throw nothrow
-      */
-      ParserToken& SetVar(TBase *a_pVar, const TString &a_strTok)
-      {
-        m_iCode = cmVAR;
-        m_iType = tpDBL;
-        m_strTok = a_strTok;
-        m_iIdx = -1;
-        m_pTok = (void*)a_pVar;
-        m_pCallback.reset(0);
-        return *this;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Make this token a variable token. 
-      
-          Member variables not necessary for variable tokens will be invalidated.
-          \throw nothrow
-      */
-      ParserToken& SetString(const TString &a_strTok, std::size_t a_iSize)
-      {
-        m_iCode = cmSTRING;
-        m_iType = tpSTR;
-        m_strTok = a_strTok;
-        m_iIdx = static_cast<int>(a_iSize);
-
-        m_pTok = 0;
-        m_pCallback.reset(0);
-        return *this;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Set an index associated with the token related data. 
-      
-          In cmSTRFUNC - This is the index to a string table in the main parser.
-          \param a_iIdx The index the string function result will take in the bytecode parser.
-          \throw exception_type if #a_iIdx<0 or #m_iType!=cmSTRING
-      */
-      void SetIdx(int a_iIdx)
-      {
-        if (m_iCode!=cmSTRING || a_iIdx<0)
-	        throw ParserError(ecINTERNAL_ERROR);
-        
-        m_iIdx = a_iIdx;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Return Index associated with the token related data. 
-      
-          In cmSTRFUNC - This is the index to a string table in the main parser.
-
-          \throw exception_type if #m_iIdx<0 or #m_iType!=cmSTRING
-          \return The index the result will take in the Bytecode calculatin array (#m_iIdx).
-      */
-      int GetIdx() const
-      {
-        if (m_iIdx<0 || m_iCode!=cmSTRING )
-          throw ParserError(ecINTERNAL_ERROR);
-
-        return m_iIdx;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Return the token type.
-      
-          \return #m_iType
-          \throw nothrow
-      */
-      ECmdCode GetCode() const
-      {
-        if (m_pCallback.get())
-        {
-          return m_pCallback->GetCode();
-        }
-        else
-        {
-          return m_iCode;
-        }
-      }
-
-      //------------------------------------------------------------------------------
-      ETypeCode GetType() const
-      {
-        if (m_pCallback.get())
-        {
-          return m_pCallback->GetType();
-        }
-        else
-        {
-          return m_iType;
-        }
-      }
-      
-      //------------------------------------------------------------------------------
-      int GetPri() const
-      {
-        if ( !m_pCallback.get())
-	        throw ParserError(ecINTERNAL_ERROR);
-            
-        if ( m_pCallback->GetCode()!=cmOPRT_BIN && m_pCallback->GetCode()!=cmOPRT_INFIX)
-	        throw ParserError(ecINTERNAL_ERROR);
-
-        return m_pCallback->GetPri();
-      }
-
-      //------------------------------------------------------------------------------
-      EOprtAssociativity GetAssociativity() const
-      {
-        if (m_pCallback.get()==NULL || m_pCallback->GetCode()!=cmOPRT_BIN)
-	        throw ParserError(ecINTERNAL_ERROR);
-
-        return m_pCallback->GetAssociativity();
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Return the address of the callback function assoziated with
-                 function and operator tokens.
-
-          \return The pointer stored in #m_pTok.
-          \throw exception_type if token type is non of:
-                 <ul>
-                   <li>cmFUNC</li>
-                   <li>cmSTRFUNC</li>
-                   <li>cmPOSTOP</li>
-                   <li>cmINFIXOP</li>
-                   <li>cmOPRT_BIN</li>
-                 </ul>
-          \sa ECmdCode
-      */
-      generic_fun_type GetFuncAddr() const
-      {
-        return (m_pCallback.get()) ? (generic_fun_type)m_pCallback->GetAddr() : 0;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \biref Get value of the token.
-        
-          Only applicable to variable and value tokens.
-          \throw exception_type if token is no value/variable token.
-      */
-      TBase GetVal() const
-      {
-        switch (m_iCode)
-        {
-          case cmVAL:  return m_fVal;
-          case cmVAR:  return *((TBase*)m_pTok);
-          default:     throw ParserError(ecVAL_EXPECTED);
-        }
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Get address of a variable token.
-
-        Valid only if m_iType==CmdVar.
-        \throw exception_type if token is no variable token.
-      */
-      TBase* GetVar() const
-      {
-        if (m_iCode!=cmVAR)
-	        throw ParserError(ecINTERNAL_ERROR);
-
-        return (TBase*)m_pTok;
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Return the number of function arguments. 
-
-        Valid only if m_iType==CmdFUNC.
-      */
-      int GetArgCount() const
-      {
-        assert(m_pCallback.get());
-
-        if (!m_pCallback->GetAddr())
-	        throw ParserError(ecINTERNAL_ERROR);
-
-        return m_pCallback->GetArgc();
-      }
-
-      //------------------------------------------------------------------------------
-      /** \brief Return the token identifier. 
-          
-          If #m_iType is cmSTRING the token identifier is the value of the string argument
-          for a string function.
-          \return #m_strTok
-          \throw nothrow
-          \sa m_strTok
-      */
-      const TString& GetAsString() const
-      {
-        return m_strTok;
-      }
-  };
+	template <std::size_t NbParams> struct TplCallType;
+	template <> struct TplCallType<0> { using fun_type = fun_type0; using fun_userdata_type = fun_userdata_type0; using bulkfun_type = bulkfun_type0; using bulkfun_userdata_type = bulkfun_userdata_type0; };
+	template <> struct TplCallType<1> { using fun_type = fun_type1; using fun_userdata_type = fun_userdata_type1; using bulkfun_type = bulkfun_type1; using bulkfun_userdata_type = bulkfun_userdata_type1; using strfun_type = strfun_type1; using strfun_userdata_type = strfun_userdata_type1; };
+	template <> struct TplCallType<2> { using fun_type = fun_type2; using fun_userdata_type = fun_userdata_type2; using bulkfun_type = bulkfun_type2; using bulkfun_userdata_type = bulkfun_userdata_type2; using strfun_type = strfun_type2; using strfun_userdata_type = strfun_userdata_type2; };
+	template <> struct TplCallType<3> { using fun_type = fun_type3; using fun_userdata_type = fun_userdata_type3; using bulkfun_type = bulkfun_type3; using bulkfun_userdata_type = bulkfun_userdata_type3; using strfun_type = strfun_type3; using strfun_userdata_type = strfun_userdata_type3; };
+	template <> struct TplCallType<4> { using fun_type = fun_type4; using fun_userdata_type = fun_userdata_type4; using bulkfun_type = bulkfun_type4; using bulkfun_userdata_type = bulkfun_userdata_type4; using strfun_type = strfun_type4; using strfun_userdata_type = strfun_userdata_type4; };
+	template <> struct TplCallType<5> { using fun_type = fun_type5; using fun_userdata_type = fun_userdata_type5; using bulkfun_type = bulkfun_type5; using bulkfun_userdata_type = bulkfun_userdata_type5; using strfun_type = strfun_type5; using strfun_userdata_type = strfun_userdata_type5; };
+	template <> struct TplCallType<6> { using fun_type = fun_type6; using fun_userdata_type = fun_userdata_type6; using bulkfun_type = bulkfun_type6; using bulkfun_userdata_type = bulkfun_userdata_type6; using strfun_type = strfun_type6; using strfun_userdata_type = strfun_userdata_type6; };
+	template <> struct TplCallType<7> { using fun_type = fun_type7; using fun_userdata_type = fun_userdata_type7; using bulkfun_type = bulkfun_type7; using bulkfun_userdata_type = bulkfun_userdata_type7; };
+	template <> struct TplCallType<8> { using fun_type = fun_type8; using fun_userdata_type = fun_userdata_type8; using bulkfun_type = bulkfun_type8; using bulkfun_userdata_type = bulkfun_userdata_type8; };
+	template <> struct TplCallType<9> { using fun_type = fun_type9; using fun_userdata_type = fun_userdata_type9; using bulkfun_type = bulkfun_type9; using bulkfun_userdata_type = bulkfun_userdata_type9; };
+	template <> struct TplCallType<10> { using fun_type = fun_type10; using fun_userdata_type = fun_userdata_type10; using bulkfun_type = bulkfun_type10; using bulkfun_userdata_type = bulkfun_userdata_type10; };
+
+	struct generic_callable_type
+	{
+		// Note: we keep generic_callable_type a pod for the purpose of layout
+
+		erased_fun_type _pRawFun;
+		void*           _pUserData;
+
+		template <std::size_t NbParams, typename... Args>
+		value_type call_fun(Args&&... args) const
+		{
+			static_assert(NbParams == sizeof...(Args), "mismatch between NbParams and Args");
+			if (_pUserData == nullptr) 
+			{
+				auto fun_typed_ptr = reinterpret_cast<typename TplCallType<NbParams>::fun_type>(_pRawFun);
+				return (*fun_typed_ptr)(std::forward<Args>(args)...);
+			} 
+			else 
+			{
+				auto fun_userdata_typed_ptr = reinterpret_cast<typename TplCallType<NbParams>::fun_userdata_type>(_pRawFun);
+				return (*fun_userdata_typed_ptr)(_pUserData, std::forward<Args>(args)...);
+			}
+		}
+
+		template <std::size_t NbParams, typename... Args>
+		value_type call_bulkfun(Args&&... args) const
+		{
+			static_assert(NbParams == sizeof...(Args) - 2, "mismatch between NbParams and Args");
+			if (_pUserData == nullptr) {
+				auto bulkfun_typed_ptr = reinterpret_cast<typename TplCallType<NbParams>::bulkfun_type>(_pRawFun);
+				return (*bulkfun_typed_ptr)(std::forward<Args>(args)...);
+			} else {
+				auto bulkfun_userdata_typed_ptr = reinterpret_cast<typename TplCallType<NbParams>::bulkfun_userdata_type>(_pRawFun);
+				return (*bulkfun_userdata_typed_ptr)(_pUserData, std::forward<Args>(args)...);
+			}
+		}
+
+		value_type call_multfun(const value_type* a_afArg, int a_iArgc) const
+		{
+			if (_pUserData == nullptr) {
+				auto multfun_typed_ptr = reinterpret_cast<multfun_type>(_pRawFun);
+				return (*multfun_typed_ptr)(a_afArg, a_iArgc);
+			} else {
+				auto multfun_userdata_typed_ptr = reinterpret_cast<multfun_userdata_type>(_pRawFun);
+				return (*multfun_userdata_typed_ptr)(_pUserData, a_afArg, a_iArgc);
+			}
+		}
+
+		template <std::size_t NbParams, typename... Args>
+		value_type call_strfun(Args&&... args) const
+		{
+			static_assert(NbParams == sizeof...(Args), "mismatch between NbParams and Args");
+			if (_pUserData == nullptr) 
+			{
+				auto strfun_typed_ptr = reinterpret_cast<typename TplCallType<NbParams>::strfun_type>(_pRawFun);
+				return (*strfun_typed_ptr)(std::forward<Args>(args)...);
+			} 
+			else 
+			{
+				auto strfun_userdata_typed_ptr = reinterpret_cast<typename TplCallType<NbParams>::strfun_userdata_type>(_pRawFun);
+				return (*strfun_userdata_typed_ptr)(_pUserData, std::forward<Args>(args)...);
+			}
+		}
+
+		bool operator==(generic_callable_type other) const 
+		{
+			return _pRawFun == other._pRawFun && _pUserData == other._pUserData; 
+		}
+
+		explicit operator bool() const 
+		{
+			return _pRawFun != nullptr; 
+		}
+
+		bool operator==(std::nullptr_t) const 
+		{
+			return _pRawFun == nullptr; 
+		}
+		
+		bool operator!=(std::nullptr_t) const 
+		{
+			return _pRawFun != nullptr; 
+		}
+	};
+
+	static_assert(std::is_trivial<generic_callable_type>::value, "generic_callable_type shall be trivial");
+	static_assert(std::is_standard_layout<generic_callable_type>::value, "generic_callable_type shall have standard layout");
+	// C++17: static_assert(std::is_aggregate<generic_callable_type>::value, "generic_callable_type shall be an aggregate");
+
+	/** \brief Encapsulation of the data for a single formula token.
+
+		Formula token implementation. Part of the Math Parser Package.
+		Formula tokens can be either one of the following:
+		<ul>
+			<li>value</li>
+			<li>variable</li>
+			<li>function with numerical arguments</li>
+			<li>functions with a string as argument</li>
+			<li>prefix operators</li>
+			<li>infix operators</li>
+			<li>binary operator</li>
+		</ul>
+	*/
+	template<typename TBase, typename TString>
+	class ParserToken final
+	{
+	private:
+
+		ECmdCode  m_iCode;  ///< Type of the token; The token type is a constant of type #ECmdCode.
+		ETypeCode m_iType;
+		void* m_pTok;		///< Stores Token pointer; not applicable for all tokens
+		int  m_iIdx;		///< An otional index to an external buffer storing the token data
+		TString m_strTok;   ///< Token string
+		TString m_strVal;   ///< Value for string variables
+		value_type m_fVal;  ///< the value 
+		std::unique_ptr<ParserCallback> m_pCallback;
+
+	public:
+
+		/** \brief Constructor (default).
+
+			Sets token to an neutral state of type cmUNKNOWN.
+			\throw nothrow
+			\sa ECmdCode
+		*/
+		ParserToken()
+			:m_iCode(cmUNKNOWN)
+			, m_iType(tpVOID)
+			, m_pTok(0)
+			, m_iIdx(-1)
+			, m_strTok()
+			, m_strVal()
+			, m_fVal(0)
+			, m_pCallback()
+		{}
+
+		//------------------------------------------------------------------------------
+		/** \brief Create token from another one.
+
+			Implemented by calling Assign(...)
+			\throw nothrow
+			\post m_iType==cmUNKNOWN
+			\sa #Assign
+		*/
+		ParserToken(const ParserToken& a_Tok)
+		{
+			Assign(a_Tok);
+		}
+
+		
+		/** \brief Assignment operator.
+
+			Copy token state from another token and return this.
+			Implemented by calling Assign(...).
+			\throw nothrow
+		*/
+		ParserToken& operator=(const ParserToken& a_Tok)
+		{
+			Assign(a_Tok);
+			return *this;
+		}
+
+
+		/** \brief Copy token information from argument.
+
+			\throw nothrow
+		*/
+		void Assign(const ParserToken& a_Tok)
+		{
+			m_iCode = a_Tok.m_iCode;
+			m_pTok = a_Tok.m_pTok;
+			m_strTok = a_Tok.m_strTok;
+			m_iIdx = a_Tok.m_iIdx;
+			m_strVal = a_Tok.m_strVal;
+			m_iType = a_Tok.m_iType;
+			m_fVal = a_Tok.m_fVal;
+			// create new callback object if a_Tok has one 
+			m_pCallback.reset(a_Tok.m_pCallback.get() ? a_Tok.m_pCallback->Clone() : 0);
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Assign a token type.
+
+		  Token may not be of type value, variable or function. Those have separate set functions.
+
+		  \pre [assert] a_iType!=cmVAR
+		  \pre [assert] a_iType!=cmVAL
+		  \pre [assert] a_iType!=cmFUNC
+		  \post m_fVal = 0
+		  \post m_pTok = 0
+		*/
+		ParserToken& Set(ECmdCode a_iType, const TString& a_strTok = TString())
+		{
+			// The following types can't be set this way, they have special Set functions
+			MUP_ASSERT(a_iType != cmVAR);
+			MUP_ASSERT(a_iType != cmVAL);
+			MUP_ASSERT(a_iType != cmFUNC);
+
+			m_iCode = a_iType;
+			m_iType = tpVOID;
+			m_pTok = 0;
+			m_strTok = a_strTok;
+			m_iIdx = -1;
+
+			return *this;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Set Callback type. */
+		ParserToken& Set(const ParserCallback& a_pCallback, const TString& a_sTok)
+		{
+			MUP_ASSERT(a_pCallback.IsValid());
+
+			m_iCode = a_pCallback.GetCode();
+			m_iType = tpVOID;
+			m_strTok = a_sTok;
+			m_pCallback.reset(new ParserCallback(a_pCallback));
+
+			m_pTok = 0;
+			m_iIdx = -1;
+
+			return *this;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Make this token a value token.
+
+			Member variables not necessary for value tokens will be invalidated.
+			\throw nothrow
+		*/
+		ParserToken& SetVal(TBase a_fVal, const TString& a_strTok = TString())
+		{
+			m_iCode = cmVAL;
+			m_iType = tpDBL;
+			m_fVal = a_fVal;
+			m_strTok = a_strTok;
+			m_iIdx = -1;
+
+			m_pTok = 0;
+			m_pCallback.reset(0);
+
+			return *this;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief make this token a variable token.
+
+			Member variables not necessary for variable tokens will be invalidated.
+			\throw nothrow
+		*/
+		ParserToken& SetVar(TBase* a_pVar, const TString& a_strTok)
+		{
+			m_iCode = cmVAR;
+			m_iType = tpDBL;
+			m_strTok = a_strTok;
+			m_iIdx = -1;
+			m_pTok = (void*)a_pVar;
+			m_pCallback.reset(0);
+			return *this;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Make this token a variable token.
+
+			Member variables not necessary for variable tokens will be invalidated.
+			\throw nothrow
+		*/
+		ParserToken& SetString(const TString& a_strTok, std::size_t a_iSize)
+		{
+			m_iCode = cmSTRING;
+			m_iType = tpSTR;
+			m_strTok = a_strTok;
+			m_iIdx = static_cast<int>(a_iSize);
+
+			m_pTok = 0;
+			m_pCallback.reset(0);
+			return *this;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Set an index associated with the token related data.
+
+			In cmSTRFUNC - This is the index to a string table in the main parser.
+			\param a_iIdx The index the string function result will take in the bytecode parser.
+			\throw exception_type if #a_iIdx<0 or #m_iType!=cmSTRING
+		*/
+		void SetIdx(int a_iIdx)
+		{
+			if (m_iCode != cmSTRING || a_iIdx < 0)
+				throw ParserError(ecINTERNAL_ERROR);
+
+			m_iIdx = a_iIdx;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Return Index associated with the token related data.
+
+			In cmSTRFUNC - This is the index to a string table in the main parser.
+
+			\throw exception_type if #m_iIdx<0 or #m_iType!=cmSTRING
+			\return The index the result will take in the Bytecode calculatin array (#m_iIdx).
+		*/
+		int GetIdx() const
+		{
+			if (m_iIdx < 0 || m_iCode != cmSTRING)
+				throw ParserError(ecINTERNAL_ERROR);
+
+			return m_iIdx;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Return the token type.
+
+			\return #m_iType
+			\throw nothrow
+		*/
+		ECmdCode GetCode() const
+		{
+			if (m_pCallback.get())
+			{
+				return m_pCallback->GetCode();
+			}
+			else
+			{
+				return m_iCode;
+			}
+		}
+
+		//------------------------------------------------------------------------------
+		ETypeCode GetType() const
+		{
+			if (m_pCallback.get())
+			{
+				return m_pCallback->GetType();
+			}
+			else
+			{
+				return m_iType;
+			}
+		}
+
+		//------------------------------------------------------------------------------
+		int GetPri() const
+		{
+			if (!m_pCallback.get())
+				throw ParserError(ecINTERNAL_ERROR);
+
+			if (m_pCallback->GetCode() != cmOPRT_BIN && m_pCallback->GetCode() != cmOPRT_INFIX)
+				throw ParserError(ecINTERNAL_ERROR);
+
+			return m_pCallback->GetPri();
+		}
+
+		//------------------------------------------------------------------------------
+		EOprtAssociativity GetAssociativity() const
+		{
+			if (m_pCallback.get() == nullptr || m_pCallback->GetCode() != cmOPRT_BIN)
+				throw ParserError(ecINTERNAL_ERROR);
+
+			return m_pCallback->GetAssociativity();
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Return the address of the callback function assoziated with
+				   function and operator tokens.
+
+			\return The pointer stored in #m_pTok.
+			\throw exception_type if token type is non of:
+				   <ul>
+					 <li>cmFUNC</li>
+					 <li>cmSTRFUNC</li>
+					 <li>cmPOSTOP</li>
+					 <li>cmINFIXOP</li>
+					 <li>cmOPRT_BIN</li>
+				   </ul>
+			\sa ECmdCode
+		*/
+		generic_callable_type GetFuncAddr() const
+		{
+			return (m_pCallback.get())
+				? generic_callable_type{(erased_fun_type)m_pCallback->GetAddr(),
+				                        m_pCallback->GetUserData()}
+				: generic_callable_type{};
+		}
+
+		//------------------------------------------------------------------------------
+		/** \biref Get value of the token.
+
+			Only applicable to variable and value tokens.
+			\throw exception_type if token is no value/variable token.
+		*/
+		TBase GetVal() const
+		{
+			switch (m_iCode)
+			{
+			case cmVAL:  return m_fVal;
+			case cmVAR:  return *((TBase*)m_pTok);
+			default:     throw ParserError(ecVAL_EXPECTED);
+			}
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Get address of a variable token.
+
+		  Valid only if m_iType==CmdVar.
+		  \throw exception_type if token is no variable token.
+		*/
+		TBase* GetVar() const
+		{
+			if (m_iCode != cmVAR)
+				throw ParserError(ecINTERNAL_ERROR);
+
+			return (TBase*)m_pTok;
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Return the number of function arguments.
+
+		  Valid only if m_iType==CmdFUNC.
+		*/
+		int GetArgCount() const
+		{
+			MUP_ASSERT(m_pCallback.get());
+
+			if (!m_pCallback->IsValid())
+				throw ParserError(ecINTERNAL_ERROR);
+
+			return m_pCallback->GetArgc();
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Return true if the token is a function token that can be optimized.
+		*/
+		bool IsOptimizable() const
+		{
+			return m_pCallback->IsValid() && m_pCallback->IsOptimizable();
+		}
+
+		//------------------------------------------------------------------------------
+		/** \brief Return the token identifier.
+
+			If #m_iType is cmSTRING the token identifier is the value of the string argument
+			for a string function.
+			\return #m_strTok
+			\throw nothrow
+			\sa m_strTok
+		*/
+		const TString& GetAsString() const
+		{
+			return m_strTok;
+		}
+	};
 } // namespace mu
 
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
+
 #endif
diff --git a/include/muParserTokenReader.h b/include/muParserTokenReader.h
index 24c70e5..0ea19f5 100644
--- a/include/muParserTokenReader.h
+++ b/include/muParserTokenReader.h
@@ -1,32 +1,34 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef MU_PARSER_TOKEN_READER_H
 #define MU_PARSER_TOKEN_READER_H
 
-#include <cassert>
 #include <cstdio>
 #include <cstring>
 #include <list>
@@ -39,121 +41,118 @@
 #include "muParserToken.h"
 
 /** \file
-    \brief This file contains the parser token reader definition.
+	\brief This file contains the parser token reader definition.
 */
 
 
 namespace mu
 {
-  // Forward declaration
-  class ParserBase;
-
-  /** \brief Token reader for the ParserBase class.
-
-  */
-  class ParserTokenReader 
-  {
-  private:
-
-      typedef ParserToken<value_type, string_type> token_type;
-
-  public:
-
-      ParserTokenReader(ParserBase *a_pParent);
-      ParserTokenReader* Clone(ParserBase *a_pParent) const;
-
-      void AddValIdent(identfun_type a_pCallback);
-      void SetVarCreator(facfun_type a_pFactory, void *pUserData);
-      void SetFormula(const string_type &a_strFormula);
-      void SetArgSep(char_type cArgSep);
-
-      int GetPos() const;
-      const string_type& GetExpr() const;
-      varmap_type& GetUsedVar();
-      char_type GetArgSep() const;
-
-      void IgnoreUndefVar(bool bIgnore);
-      void ReInit();
-      token_type ReadNextToken();
-
-  private:
-
-      /** \brief 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.
-  	  */
-      enum ESynCodes
-      {
-        noBO      = 1 << 0,  ///< to avoid i.e. "cos(7)(" 
-        noBC      = 1 << 1,  ///< to avoid i.e. "sin)" or "()"
-        noVAL     = 1 << 2,  ///< to avoid i.e. "tan 2" or "sin(8)3.14"
-        noVAR     = 1 << 3,  ///< to avoid i.e. "sin a" or "sin(8)a"
-        noARG_SEP = 1 << 4,  ///< to avoid i.e. ",," or "+," ...
-        noFUN     = 1 << 5,  ///< to avoid i.e. "sqrt cos" or "(1)sin"	
-        noOPT     = 1 << 6,  ///< to avoid i.e. "(+)"
-        noPOSTOP  = 1 << 7,  ///< to avoid i.e. "(5!!)" "sin!"
-	      noINFIXOP = 1 << 8,  ///< to avoid i.e. "++4" "!!4"
-        noEND     = 1 << 9,  ///< to avoid unexpected end of formula
-        noSTR     = 1 << 10, ///< to block numeric arguments on string functions
-        noASSIGN  = 1 << 11, ///< to block assignment to constant i.e. "4=7"
-        noIF      = 1 << 12,
-        noELSE    = 1 << 13,
-        sfSTART_OF_LINE = noOPT | noBC | noPOSTOP | noASSIGN | noIF | noELSE | noARG_SEP,
-        noANY     = ~0       ///< All of he above flags set
-      };	
-
-      ParserTokenReader(const ParserTokenReader &a_Reader);
-      ParserTokenReader& operator=(const ParserTokenReader &a_Reader);
-      void Assign(const ParserTokenReader &a_Reader);
-
-      void SetParent(ParserBase *a_pParent);
-      int ExtractToken(const char_type *a_szCharSet, 
-                       string_type &a_strTok, 
-                       int a_iPos) const;
-      int ExtractOperatorToken(string_type &a_sTok, int a_iPos) const;
-
-      bool IsBuiltIn(token_type &a_Tok);
-      bool IsArgSep(token_type &a_Tok);
-      bool IsEOF(token_type &a_Tok);
-      bool IsInfixOpTok(token_type &a_Tok);
-      bool IsFunTok(token_type &a_Tok);
-      bool IsPostOpTok(token_type &a_Tok);
-      bool IsOprt(token_type &a_Tok);
-      bool IsValTok(token_type &a_Tok);
-      bool IsVarTok(token_type &a_Tok);
-      bool IsStrVarTok(token_type &a_Tok);
-      bool IsUndefVarTok(token_type &a_Tok);
-      bool IsString(token_type &a_Tok);
-      void Error(EErrorCodes a_iErrc, 
-                 int a_iPos = -1, 
-                 const string_type &a_sTok = string_type() ) const;
-
-      token_type& SaveBeforeReturn(const token_type &tok);
-
-      ParserBase *m_pParser;
-      string_type m_strFormula;
-      int  m_iPos;
-      int  m_iSynFlags;
-      bool m_bIgnoreUndefVar;
-
-      const funmap_type *m_pFunDef;
-      const funmap_type *m_pPostOprtDef;
-      const funmap_type *m_pInfixOprtDef;
-      const funmap_type *m_pOprtDef;
-      const valmap_type *m_pConstDef;
-      const strmap_type *m_pStrVarDef;
-      varmap_type *m_pVarDef;  ///< The only non const pointer to parser internals
-      facfun_type m_pFactory;
-      void *m_pFactoryData;
-      std::list<identfun_type> m_vIdentFun; ///< Value token identification function
-      varmap_type m_UsedVar;
-      value_type m_fZero;      ///< Dummy value of zero, referenced by undefined variables
-      int m_iBrackets;
-      token_type m_lastTok;
-      char_type m_cArgSep;     ///< The character used for separating function arguments
-  };
+	// Forward declaration
+	class ParserBase;
+
+	/** \brief Token reader for the ParserBase class. */
+	class ParserTokenReader final
+	{
+	private:
+
+		typedef ParserToken<value_type, string_type> token_type;
+
+	public:
+
+		ParserTokenReader(ParserBase* a_pParent);
+		ParserTokenReader* Clone(ParserBase* a_pParent) const;
+
+		void AddValIdent(identfun_type a_pCallback);
+		void SetVarCreator(facfun_type a_pFactory, void* pUserData);
+		void SetFormula(const string_type& a_strFormula);
+		void SetArgSep(char_type cArgSep);
+
+		int GetPos() const;
+		const string_type& GetExpr() const;
+		varmap_type& GetUsedVar();
+		char_type GetArgSep() const;
+
+		void IgnoreUndefVar(bool bIgnore);
+		void ReInit();
+		token_type ReadNextToken();
+
+	private:
+
+		/** \brief 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.
+		*/
+		enum ESynCodes
+		{
+			noBO = 1 << 0,			///< to avoid i.e. "cos(7)(" 
+			noBC = 1 << 1,			///< to avoid i.e. "sin)" or "()"
+			noVAL = 1 << 2,			///< to avoid i.e. "tan 2" or "sin(8)3.14"
+			noVAR = 1 << 3,			///< to avoid i.e. "sin a" or "sin(8)a"
+			noARG_SEP = 1 << 4,		///< to avoid i.e. ",," or "+," ...
+			noFUN = 1 << 5,			///< to avoid i.e. "sqrt cos" or "(1)sin"	
+			noOPT = 1 << 6,			///< to avoid i.e. "(+)"
+			noPOSTOP = 1 << 7,		///< to avoid i.e. "(5!!)" "sin!"
+			noINFIXOP = 1 << 8,		///< to avoid i.e. "++4" "!!4"
+			noEND = 1 << 9,			///< to avoid unexpected end of formula
+			noSTR = 1 << 10,		///< to block numeric arguments on string functions
+			noASSIGN = 1 << 11,		///< to block assignment to constant i.e. "4=7"
+			noIF = 1 << 12,
+			noELSE = 1 << 13,
+			sfSTART_OF_LINE = noOPT | noBC | noPOSTOP | noASSIGN | noIF | noELSE | noARG_SEP,
+			noANY = ~0				///< All of he above flags set
+		};
+
+		ParserTokenReader(const ParserTokenReader& a_Reader);
+		ParserTokenReader& operator=(const ParserTokenReader& a_Reader);
+		void Assign(const ParserTokenReader& a_Reader);
+
+		void SetParent(ParserBase* a_pParent);
+		int ExtractToken(const char_type* a_szCharSet, string_type& a_strTok, std::size_t a_iPos) const;
+		int ExtractOperatorToken(string_type& a_sTok, std::size_t a_iPos) const;
+
+		bool IsBuiltIn(token_type& a_Tok);
+		bool IsArgSep(token_type& a_Tok);
+		bool IsEOF(token_type& a_Tok);
+		bool IsInfixOpTok(token_type& a_Tok);
+		bool IsFunTok(token_type& a_Tok);
+		bool IsPostOpTok(token_type& a_Tok);
+		bool IsOprt(token_type& a_Tok);
+		bool IsValTok(token_type& a_Tok);
+		bool IsVarTok(token_type& a_Tok);
+		bool IsStrVarTok(token_type& a_Tok);
+		bool IsUndefVarTok(token_type& a_Tok);
+		bool IsString(token_type& a_Tok);
+		void Error(EErrorCodes a_iErrc, int a_iPos = -1, const string_type& a_sTok = string_type()) const;
+
+		token_type& SaveBeforeReturn(const token_type& tok);
+
+		ParserBase* m_pParser;
+		string_type m_strFormula;
+		int  m_iPos;
+		int  m_iSynFlags;
+		bool m_bIgnoreUndefVar;
+
+		const funmap_type* m_pFunDef;
+		const funmap_type* m_pPostOprtDef;
+		const funmap_type* m_pInfixOprtDef;
+		const funmap_type* m_pOprtDef;
+		const valmap_type* m_pConstDef;
+		const strmap_type* m_pStrVarDef;
+
+		varmap_type* m_pVarDef;  ///< The only non const pointer to parser internals
+		facfun_type m_pFactory;
+		void* m_pFactoryData;
+		std::list<identfun_type> m_vIdentFun; ///< Value token identification function
+		varmap_type m_UsedVar;
+		value_type m_fZero;      ///< Dummy value of zero, referenced by undefined variables
+		
+		std::stack<int> m_bracketStack;
+
+		token_type m_lastTok;
+		char_type m_cArgSep;     ///< The character used for separating function arguments
+	};
 } // namespace mu
 
 #endif
diff --git a/build/autoconf/muparser.pc.cmakein b/muparser.pc.in
similarity index 100%
rename from build/autoconf/muparser.pc.cmakein
rename to muparser.pc.in
diff --git a/muparserConfig.cmake.in b/muparserConfig.cmake.in
new file mode 100644
index 0000000..6a28a5e
--- /dev/null
+++ b/muparserConfig.cmake.in
@@ -0,0 +1,6 @@
+get_filename_component(muparser_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+include(CMakeFindDependencyMacro)
+
+if(NOT TARGET muparser::muparser)
+    include("${muparser_CMAKE_DIR}/muparser-targets.cmake")
+endif()
diff --git a/samples/example1/example1.cpp b/samples/example1/example1.cpp
index 60c6510..31d9258 100644
--- a/samples/example1/example1.cpp
+++ b/samples/example1/example1.cpp
@@ -1,34 +1,30 @@
 /*
-//---------------------------------------------------------------------------
-//
-//                 __________                                      
-//    _____   __ __\______   \_____  _______  ______  ____ _______ 
-//   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \ 
-//  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-//  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-//        \/                       \/            \/      \/        
-//  (C) 2015 Ingo Berg
-//
-//  example1.cpp - using the parser as a static library
-//
-//---------------------------------------------------------------------------
-*/
-
-#include "muParserTest.h"
-
-#if defined(_WIN32) && defined(_DEBUG)
-  #define _CRTDBG_MAP_ALLOC
-  #include <stdlib.h>
-  #include <crtdbg.h>
-  #define CREATE_LEAKAGE_REPORT
-#endif
-
-#if defined( USINGDLL ) && defined( _WIN32 )
-#error This sample can be used only with STATIC builds of muParser (on win32)
-#endif
 
-/** \brief This macro will enable mathematical constants like M_PI. */
-#define _USE_MATH_DEFINES		
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2022 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
 
 #include <cstdlib>
 #include <cstring>
@@ -41,554 +37,526 @@
 #include <iomanip>
 #include <numeric>
 
+#include "muParserTest.h"
 #include "muParser.h"
 
 using namespace std;
 using namespace mu;
 
 
-#if defined(CREATE_LEAKAGE_REPORT)
-
-// Dumping memory leaks in the destructor of the static guard
-// guarantees i won't get false positives from the ParserErrorMsg 
-// class which is a singleton with a static instance.
-struct DumpLeaks
-{
- ~DumpLeaks()
-  {
-    _CrtDumpMemoryLeaks();
-  }
-} static LeakDumper;
-
-#endif
-
 // Forward declarations
 void CalcBulk();
 
 // Operator callback functions
 static value_type Mega(value_type a_fVal) { return a_fVal * 1e6; }
 static value_type Milli(value_type a_fVal) { return a_fVal / (value_type)1e3; }
-static value_type Rnd(value_type v) { return v*std::rand()/(value_type)(RAND_MAX+1.0); }
-static value_type Not(value_type v) { return v==0; }
-static value_type Add(value_type v1, value_type v2) { return v1+v2; }
-static value_type Mul(value_type v1, value_type v2) { return v1*v2; }
-
-//---------------------------------------------------------------------------
-static value_type ThrowAnException(value_type) 
-{ 
-  throw std::runtime_error("This function does throw an exception.");
+static value_type Rnd(value_type v) { return v * std::rand() / (value_type)(RAND_MAX + 1.0); }
+static value_type Not(value_type v) { return v == 0; }
+static value_type Add(value_type v1, value_type v2) { return v1 + v2; }
+static value_type Mul(value_type v1, value_type v2) { return v1 * v2; }
+static value_type Arg2Of2(value_type /* v1 */, value_type v2) { return v2; }
+static value_type Arg1Of2(value_type v1, value_type /* v2 */) { return v1; }
+
+
+static value_type ThrowAnException(value_type)
+{
+	throw std::runtime_error("This function does throw an exception.");
 }
 
-//---------------------------------------------------------------------------
+
 static value_type BulkFun1(int nBulkIdx, int nThreadIdx, value_type v1)
 {
-  // Note: I'm just doing something with all three parameters to shut 
-  // compiler warnings up!
-  return nBulkIdx + nThreadIdx + v1;
+	// Note: I'm just doing something with all three parameters to shut 
+	// compiler warnings up!
+	return (value_type)nBulkIdx + nThreadIdx + v1;
 }
 
-//---------------------------------------------------------------------------
-static value_type Ping() 
-{ 
-  mu::console() << "ping\n"; 
-  return 0; 
+
+static value_type Ping()
+{
+	mu::console() << "ping\n";
+	return 0;
 }
 
-//---------------------------------------------------------------------------
-static value_type StrFun0(const char_type *szMsg) 
+
+static value_type StrFun0(const char_type* szMsg)
 {
-  if (szMsg) 
-    mu::console() << szMsg << std::endl;
+	if (szMsg)
+		mu::console() << szMsg << std::endl;
 
-  return 999;
+	return 999;
 }
 
-//---------------------------------------------------------------------------
-static value_type StrFun2(const char_type *v1, value_type v2,value_type v3) 
-{ 
-  mu::console() << v1 << std::endl;
-  return v2+v3; 
+
+static value_type StrFun2(const char_type* v1, value_type v2, value_type v3)
+{
+	mu::console() << v1 << std::endl;
+	return v2 + v3;
 }
 
-//---------------------------------------------------------------------------
-static value_type Debug(mu::value_type v1, mu::value_type v2) 
-{ 
-  ParserBase::EnableDebugDump(v1!=0, v2!=0);
-  mu::console() << _T("Bytecode dumping ") << ((v1!=0) ? _T("active") : _T("inactive")) << _T("\n");
-  return 1; 
+
+static value_type Debug(mu::value_type v1, mu::value_type v2)
+{
+	ParserBase::EnableDebugDump(v1 != 0, v2 != 0);
+	mu::console() << _T("Bytecode dumping ") << ((v1 != 0) ? _T("active") : _T("inactive")) << _T("\n");
+	return 1;
 }
 
-//---------------------------------------------------------------------------
+
 // Factory function for creating new parser variables
 // This could as well be a function performing database queries.
-static value_type* AddVariable(const char_type *a_szName, void *a_pUserData)
+static value_type* AddVariable(const char_type* a_szName, void* a_pUserData)
+{
+	// I don't want dynamic allocation here, so i used this static buffer
+	// If you want dynamic allocation you must allocate all variables dynamically
+	// in order to delete them later on. Or you find other ways to keep track of 
+	// variables that have been created implicitely.
+	static value_type afValBuf[100];
+	static int iVal = -1;
+
+	++iVal;
+
+	mu::console()
+		<< _T("Generating new variable \"")
+		<< a_szName << std::dec << _T("\" (slots left: ")
+		<< 99 - iVal << _T(")")
+		<< _T(" User data pointer is:")
+		<< std::hex << a_pUserData << endl;
+
+	afValBuf[iVal] = 0;
+
+	if (iVal >= 99)
+		throw mu::ParserError(_T("Variable buffer overflow."));
+	else
+		return &afValBuf[iVal];
+}
+
+
+int IsBinValue(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
 {
-  // I don't want dynamic allocation here, so i used this static buffer
-  // If you want dynamic allocation you must allocate all variables dynamically
-  // in order to delete them later on. Or you find other ways to keep track of 
-  // variables that have been created implicitely.
-  static value_type afValBuf[100];  
-  static int iVal = -1;
-
-  ++iVal;
-
-  mu::console() << _T("Generating new variable \"") 
-                << a_szName << std::dec << _T("\" (slots left: ")
-                << 99-iVal << _T(")")
-                << _T(" User data pointer is:") 
-                << std::hex << a_pUserData <<endl;
-  afValBuf[iVal] = 0;
-
-  if (iVal>=99)
-    throw mu::ParserError( _T("Variable buffer overflow.") );
-  else
-    return &afValBuf[iVal];
+	if (a_szExpr[0] != 0 && a_szExpr[1] != 'b')
+		return 0;
+
+	unsigned iVal = 0;
+	unsigned iBits = sizeof(iVal) * 8;
+	unsigned i = 0;
+
+	for (i = 0; (a_szExpr[i + 2] == '0' || a_szExpr[i + 2] == '1') && i < iBits; ++i)
+		iVal |= (int)(a_szExpr[i + 2] == '1') << ((iBits - 1) - i);
+
+	if (i == 0)
+		return 0;
+
+	if (i == iBits)
+		throw mu::Parser::exception_type(_T("Binary to integer conversion error (overflow)."));
+
+	*a_fVal = (unsigned)(iVal >> (iBits - i));
+	*a_iPos += i + 2;
+
+	return 1;
 }
 
-static int IsHexValue(const char_type *a_szExpr, int *a_iPos, value_type *a_fVal) 
-{ 
-  if (a_szExpr[1]==0 || (a_szExpr[0]!='0' || a_szExpr[1]!='x') ) 
-    return 0;
 
-  unsigned iVal(0);
+static int IsHexValue(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
+{
+	if (a_szExpr[1] == 0 || (a_szExpr[0] != '0' || a_szExpr[1] != 'x'))
+		return 0;
 
-  // New code based on streams for UNICODE compliance:
-  stringstream_type::pos_type nPos(0);
-  stringstream_type ss(a_szExpr + 2);
-  ss >> std::hex >> iVal;
-  nPos = ss.tellg();
+	unsigned iVal(0);
 
-  if (nPos==(stringstream_type::pos_type)0)
-    return 1;
+	// New code based on streams for UNICODE compliance:
+	stringstream_type::pos_type nPos(0);
+	stringstream_type ss(a_szExpr + 2);
+	ss >> std::hex >> iVal;
+	nPos = ss.tellg();
 
-  *a_iPos += (int)(2 + nPos);
-  *a_fVal = (value_type)iVal;
+	if (nPos == (stringstream_type::pos_type)0)
+		return 1;
 
-  return 1;
+	*a_iPos += (int)(2 + nPos);
+	*a_fVal = (value_type)iVal;
+
+	return 1;
 }
 
-//---------------------------------------------------------------------------
+
 static void Splash()
 {
-  mu::console() << _T("                 __________                                       \n");
-  mu::console() << _T("    _____   __ __\\______   \\_____  _______  ______  ____ _______\n");
-  mu::console() << _T("   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\ \n");
-  mu::console() << _T("  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/ \n");
-  mu::console() << _T("  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|    \n");
-  mu::console() << _T("        \\/                       \\/            \\/      \\/         \n");
-  mu::console() << _T("  Version ") << Parser().GetVersion(pviFULL) << _T("\n");
-  mu::console() << _T("  (C) 2015 Ingo Berg\n");
+	mu::console() << _T("\n");
+	mu::console() << _T(R"(   _____  __ _____________ ________  _____ ____________  )") << _T("\n");
+	mu::console() << _T(R"(  /     \|  |  \____ \__   \\_  __ \/ ___// __  \_  __ \ )") << _T("\n");
+	mu::console() << _T(R"( |  Y Y  \  |  /  |_> > ___ \|  | \/\___\\  ___/ |  | \/ )") << _T("\n");
+	mu::console() << _T(R"( |__|_|  /____/|   __(____  /___|  /___  >\___  >|__|    )") << _T("\n");
+	mu::console() << _T(R"(       \/      |__|       \/           \/     \/        )") << _T("\n");
+	mu::console() << _T("  Version ") << Parser().GetVersion(pviFULL) << _T("\n");
+	mu::console() << _T("  (C) 2022 Ingo Berg\n");
+	mu::console() << _T("\n");
+	mu::console() << _T("-----------------------------------------------------------\n");
+
+#if defined(__clang__)
+	// Note: CLANG also identifies as GCC 4.2.1
+	mu::console() << _T("  Compiled with CLANG Version ") << __clang_major__ << _T(".") << __clang_minor__ << _T(".") << __clang_patchlevel__ << _T("\n");
+#elif defined (__GNUC__)
+	mu::console() << _T("  Compiled with GCC Version ") << __GNUC__ << _T(".") << __GNUC_MINOR__ << _T(".") << __GNUC_PATCHLEVEL__ << _T("\n");
+#elif defined(_MSC_VER)
+	mu::console() << _T("  Compiled with MSVC Version ") << _MSC_VER << _T("\n");
+#endif
+
+	mu::console() << _T("  IEEE 754 (IEC 559) is ") << ((std::numeric_limits<double>::is_iec559) ? "Available" : " NOT AVAILABLE") << _T("\n");
+	mu::console() << _T("  ") << sizeof(void*) * 8 << _T("-bit build\n");
 }
 
-//---------------------------------------------------------------------------
+
 static value_type SelfTest()
 {
-  mu::console() << _T( "-----------------------------------------------------------\n");
-  mu::console() << _T( "Running test suite:\n\n");
-
-  // Skip the self test if the value type is set to an integer type.
-  if (mu::TypeInfo<mu::value_type>::IsInteger())
-  {
-    mu::console() << _T( "  Test skipped: integer data type are not compatible with the unit test!\n\n");
-  }
-  else
-  {
-    mu::Test::ParserTester pt;
-    pt.Run();
-  }
-
-  return 0;
+	mu::console() << _T("-----------------------------------------------------------\n");
+	mu::console() << _T("Running unit tests:\n\n");
+
+	// Skip the self test if the value type is set to an integer type.
+	if (mu::TypeInfo<mu::value_type>::IsInteger())
+	{
+		mu::console() << _T("  Test skipped: integer data type are not compatible with the unit test!\n\n");
+	}
+	else
+	{
+		mu::Test::ParserTester pt;
+		pt.Run();
+	}
+
+	return 0;
 }
 
-//---------------------------------------------------------------------------
+
 static value_type Help()
 {
-  mu::console() << _T( "-----------------------------------------------------------\n");
-  mu::console() << _T( "Commands:\n\n");
-  mu::console() << _T( "  list var     - list parser variables\n");
-  mu::console() << _T( "  list exprvar - list expression variables\n");
-  mu::console() << _T( "  list const   - list all numeric parser constants\n");
-  mu::console() << _T( "  opt on       - enable optimizer (default)\n");
-  mu::console() << _T( "  opt off      - disable optimizer\n");
-  mu::console() << _T( "  locale de    - switch to german locale\n");
-  mu::console() << _T( "  locale en    - switch to english locale\n");
-  mu::console() << _T( "  locale reset - reset locale\n");
-  mu::console() << _T( "  test bulk    - test bulk mode\n");
-  mu::console() << _T( "  quit         - exits the parser\n");
-  mu::console() << _T( "\nConstants:\n\n");
-  mu::console() << _T( "  \"_e\"   2.718281828459045235360287\n");
-  mu::console() << _T( "  \"_pi\"  3.141592653589793238462643\n");
-  mu::console() << _T( "-----------------------------------------------------------\n");
-  return 0;
+	mu::console() << _T("-----------------------------------------------------------\n");
+	mu::console() << _T("Commands:\n\n");
+	mu::console() << _T("  list var     - list parser variables\n");
+	mu::console() << _T("  list exprvar - list expression variables\n");
+	mu::console() << _T("  list const   - list all numeric parser constants\n");
+	mu::console() << _T("  opt on       - enable optimizer (default)\n");
+	mu::console() << _T("  opt off      - disable optimizer\n");
+	mu::console() << _T("  locale de    - switch to german locale\n");
+	mu::console() << _T("  locale en    - switch to english locale\n");
+	mu::console() << _T("  locale reset - reset locale\n");
+	mu::console() << _T("  test bulk    - test bulk mode\n");
+	mu::console() << _T("  quit         - exits the parser\n");
+	mu::console() << _T("\nConstants:\n\n");
+	mu::console() << _T("  \"_e\"   2.718281828459045235360287\n");
+	mu::console() << _T("  \"_pi\"  3.141592653589793238462643\n");
+	mu::console() << _T("-----------------------------------------------------------\n");
+	return 0;
 }
 
-//---------------------------------------------------------------------------
-/*
-static void CheckLocale()
-{
-  // Local names:
-  // "C" - the classic C locale
-  // "de_DE" - not for Windows?
-  // "en_US" - not for Windows?
-  // "German_germany" - For MSVC8
-  try
-  {
-    std::locale loc("German_germany");
-    console() << _T("Locale settings:\n");
-    console() << _T("  Decimal point:  '") << std::use_facet<numpunct<char_type> >(loc).decimal_point() << _T("'\n"); 
-    console() << _T("  Thousands sep:  '") << std::use_facet<numpunct<char_type> >(loc).thousands_sep() << _T("'\n"); 
-    console() << _T("  Grouping:       '") << std::use_facet<numpunct<char_type> >(loc).grouping()  << _T("'\n"); 
-    console() << _T("  True is named:  '") << std::use_facet<numpunct<char_type> >(loc).truename()  << _T("'\n"); 
-    console() << _T("  False is named: '") << std::use_facet<numpunct<char_type> >(loc).falsename() << _T("'\n"); 
-    console() << _T("-----------------------------------------------------------\n");
-  }
-  catch(...)
-  {
-    console() << _T("Locale settings:\n");
-    console() << _T("  invalid locale name\n");
-    console() << _T("-----------------------------------------------------------\n");
-  }
-}
 
-//---------------------------------------------------------------------------
-static void CheckDiff()
+static void ListVar(const mu::ParserBase& parser)
 {
-  mu::Parser  parser;
-  value_type x = 1, 
-             v1,
-             v2,
-             v3,
-             eps(pow(std::numeric_limits<value_type>::epsilon(), 0.2));
-  parser.DefineVar(_T("x"), &x);
-  parser.SetExpr(_T("_e^-x*sin(x)"));
-  
-  v1 = parser.Diff(&x, 1),
-  v2 = parser.Diff(&x, 1, eps);
-  v3 = cos((value_type)1.0)/exp((value_type)1) - sin((value_type)1.0)/exp((value_type)1); //-0.110793765307;
-  mu::console() << parser.GetExpr() << _T("\n");
-  mu::console() << _T("v1 = ") << v1 << _T("; v1-v3 = ") << v1-v3 << _T("\n");
-  mu::console() << _T("v2 = ") << v2 << _T("; v2-v3 = ") << v2-v3 << _T("\n");
+	// Query the used variables (must be done after calc)
+	mu::varmap_type variables = parser.GetVar();
+	if (!variables.size())
+		return;
+
+	cout << "\nParser variables:\n";
+	cout << "-----------------\n";
+	cout << "Number: " << (int)variables.size() << "\n";
+	varmap_type::const_iterator item = variables.begin();
+	for (; item != variables.end(); ++item)
+		mu::console() << _T("Name: ") << item->first << _T("   Address: [0x") << item->second << _T("]\n");
 }
-*/
 
-//---------------------------------------------------------------------------
-static void ListVar(const mu::ParserBase &parser)
-{
-  // Query the used variables (must be done after calc)
-  mu::varmap_type variables = parser.GetVar();
-  if (!variables.size())
-    return;
-
-  cout << "\nParser variables:\n";
-  cout <<   "-----------------\n";
-  cout << "Number: " << (int)variables.size() << "\n";
-  varmap_type::const_iterator item = variables.begin();
-  for (; item!=variables.end(); ++item)
-    mu::console() << _T("Name: ") << item->first << _T("   Address: [0x") << item->second << _T("]\n");
-}
 
-//---------------------------------------------------------------------------
-static void ListConst(const mu::ParserBase &parser)
+static void ListConst(const mu::ParserBase& parser)
 {
-  mu::console() << _T("\nParser constants:\n");
-  mu::console() << _T("-----------------\n");
-
-  mu::valmap_type cmap = parser.GetConst();
-  if (!cmap.size())
-  {
-    mu::console() << _T("Expression does not contain constants\n");
-  }
-  else
-  {
-    valmap_type::const_iterator item = cmap.begin();
-    for (; item!=cmap.end(); ++item)
-      mu::console() << _T("  ") << item->first << _T(" =  ") << item->second << _T("\n");
-  }
+	mu::console() << _T("\nParser constants:\n");
+	mu::console() << _T("-----------------\n");
+
+	mu::valmap_type cmap = parser.GetConst();
+	if (!cmap.size())
+	{
+		mu::console() << _T("Expression does not contain constants\n");
+	}
+	else
+	{
+		valmap_type::const_iterator item = cmap.begin();
+		for (; item != cmap.end(); ++item)
+			mu::console() << _T("  ") << item->first << _T(" =  ") << item->second << _T("\n");
+	}
 }
 
-//---------------------------------------------------------------------------
-static void ListExprVar(const mu::ParserBase &parser)
+
+static void ListExprVar(const mu::ParserBase& parser)
 {
-  string_type sExpr = parser.GetExpr();
-  if (sExpr.length()==0)
-  {
-    cout << _T("Expression string is empty\n");
-    return;
-  }
-
-  // Query the used variables (must be done after calc)
-  mu::console() << _T("\nExpression variables:\n");
-  mu::console() <<   _T("---------------------\n");
-  mu::console() << _T("Expression: ") << parser.GetExpr() << _T("\n");
-
-  varmap_type variables = parser.GetUsedVar();
-  if (!variables.size())
-  {
-    mu::console() << _T("Expression does not contain variables\n");
-  }
-  else
-  {
-    mu::console() << _T("Number: ") << (int)variables.size() << _T("\n");
-    mu::varmap_type::const_iterator item = variables.begin();
-    for (; item!=variables.end(); ++item)
-      mu::console() << _T("Name: ") << item->first << _T("   Address: [0x") << item->second << _T("]\n");
-  }
+	string_type sExpr = parser.GetExpr();
+	if (sExpr.length() == 0)
+	{
+		cout << _T("Expression string is empty\n");
+		return;
+	}
+
+	// Query the used variables (must be done after calc)
+	mu::console() << _T("\nExpression variables:\n");
+	mu::console() << _T("---------------------\n");
+	mu::console() << _T("Expression: ") << parser.GetExpr() << _T("\n");
+
+	varmap_type variables = parser.GetUsedVar();
+	if (!variables.size())
+	{
+		mu::console() << _T("Expression does not contain variables\n");
+	}
+	else
+	{
+		mu::console() << _T("Number: ") << (int)variables.size() << _T("\n");
+		mu::varmap_type::const_iterator item = variables.begin();
+		for (; item != variables.end(); ++item)
+			mu::console() << _T("Name: ") << item->first << _T("   Address: [0x") << item->second << _T("]\n");
+	}
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Check for external keywords.
 */
-static int CheckKeywords(const mu::char_type *a_szLine, mu::Parser &a_Parser)
+static int CheckKeywords(const mu::char_type* a_szLine, mu::Parser& a_Parser)
 {
-  string_type sLine(a_szLine);
-
-  if ( sLine == _T("quit") )
-  {
-    return -1;
-  }
-  else if ( sLine == _T("list var") )
-  {
-    ListVar(a_Parser);
-    return 1;
-  }
-  else if ( sLine == _T("opt on") )
-  {
-    a_Parser.EnableOptimizer(true);
-    mu::console() << _T("Optimizer enabled\n");
-    return 1;
-  }
-  else if ( sLine == _T("opt off") )
-  {
-    a_Parser.EnableOptimizer(false);
-    mu::console() << _T("Optimizer disabled\n");
-    return 1;
-  }
-  else if ( sLine == _T("list const") )
-  {
-    ListConst(a_Parser);
-    return 1;
-  }
-  else if ( sLine == _T("list exprvar") )
-  {
-    ListExprVar(a_Parser);
-    return 1;
-  }
-  else if ( sLine == _T("locale de") )
-  {
-    mu::console() << _T("Setting german locale: ArgSep=';' DecSep=',' ThousandsSep='.'\n");
-    a_Parser.SetArgSep(';');
-    a_Parser.SetDecSep(',');
-    a_Parser.SetThousandsSep('.');
-    return 1;
-  }
-  else if ( sLine == _T("locale en") )
-  {
-    mu::console() << _T("Setting english locale: ArgSep=',' DecSep='.' ThousandsSep=''\n");
-    a_Parser.SetArgSep(',');
-    a_Parser.SetDecSep('.');
-    a_Parser.SetThousandsSep();
-    return 1;
-  }
-  else if ( sLine == _T("locale reset") )
-  {
-    mu::console() << _T("Resetting locale\n");
-    a_Parser.ResetLocale();
-    return 1;
-  }
-  else if ( sLine == _T("test bulk") )
-  {
-    mu::console() << _T("Testing bulk mode\n");
-    CalcBulk();
-    return 1;
-  }
-
-  return 0;
+	string_type sLine(a_szLine);
+
+	if (sLine == _T("quit"))
+	{
+		return -1;
+	}
+	else if (sLine == _T("list var"))
+	{
+		ListVar(a_Parser);
+		return 1;
+	}
+	else if (sLine == _T("opt on"))
+	{
+		a_Parser.EnableOptimizer(true);
+		mu::console() << _T("Optimizer enabled\n");
+		return 1;
+	}
+	else if (sLine == _T("opt off"))
+	{
+		a_Parser.EnableOptimizer(false);
+		mu::console() << _T("Optimizer disabled\n");
+		return 1;
+	}
+	else if (sLine == _T("list const"))
+	{
+		ListConst(a_Parser);
+		return 1;
+	}
+	else if (sLine == _T("list exprvar"))
+	{
+		ListExprVar(a_Parser);
+		return 1;
+	}
+	else if (sLine == _T("locale de"))
+	{
+		mu::console() << _T("Setting german locale: ArgSep=';' DecSep=',' ThousandsSep='.'\n");
+		a_Parser.SetArgSep(';');
+		a_Parser.SetDecSep(',');
+		a_Parser.SetThousandsSep('.');
+		return 1;
+	}
+	else if (sLine == _T("locale en"))
+	{
+		mu::console() << _T("Setting english locale: ArgSep=',' DecSep='.' ThousandsSep=''\n");
+		a_Parser.SetArgSep(',');
+		a_Parser.SetDecSep('.');
+		a_Parser.SetThousandsSep();
+		return 1;
+	}
+	else if (sLine == _T("locale reset"))
+	{
+		mu::console() << _T("Resetting locale\n");
+		a_Parser.ResetLocale();
+		return 1;
+	}
+	else if (sLine == _T("test bulk"))
+	{
+		mu::console() << _T("Testing bulk mode\n");
+		CalcBulk();
+		return 1;
+	}
+	else if (sLine == _T("dbg"))
+	{
+		string_type dbg = _T("((\"\")), 7");
+		a_Parser.SetExpr(dbg);
+		mu::console() << dbg;
+
+		int stackSize;
+		double* v = a_Parser.Eval(stackSize);
+		mu::console() << "=" <<  *v << std::endl;
+		return 1;
+	}
+
+	return 0;
 }
 
-//---------------------------------------------------------------------------
+
 void CalcBulk()
 {
-  const int nBulkSize = 200;
-  value_type *x = new value_type[nBulkSize];
-  value_type *y = new value_type[nBulkSize];
-  value_type *result = new value_type[nBulkSize];
-
-  try
-  {
-    for (int i=0; i<nBulkSize; ++i)
-    {
-      x[i] = i;
-      y[i] = (value_type)i/10;
-    }
-    mu::Parser  parser;
-    parser.DefineVar(_T("x"), x);
-    parser.DefineVar(_T("y"), y);
-    parser.DefineFun(_T("fun1"), BulkFun1);
-    parser.SetExpr(_T("fun1(0)+x+y"));
-    parser.Eval(result, nBulkSize);
-
-    for (int i=0; i<nBulkSize; ++i)
-    {
-      mu::console() << _T("Eqn. ") << i << _T(": x=") << x[i] << _T("; y=") << y[i] << _T("; result=") << result[i] << _T("\n");
-    }
-  }
-  catch(...)
-  {
-    delete [] x;
-    delete [] y;
-    delete [] result;
-    throw;
-  }
-
-  delete [] x;
-  delete [] y;
-  delete [] result;
+	const int nBulkSize = 200;
+	value_type* x = new value_type[nBulkSize];
+	value_type* y = new value_type[nBulkSize];
+	value_type* result = new value_type[nBulkSize];
+
+	try
+	{
+		for (int i = 0; i < nBulkSize; ++i)
+		{
+			x[i] = i;
+			y[i] = (value_type)i / 10;
+		}
+		mu::Parser  parser;
+		parser.DefineVar(_T("x"), x);
+		parser.DefineVar(_T("y"), y);
+		parser.DefineFun(_T("fun1"), BulkFun1);
+		parser.SetExpr(_T("fun1(0)+x+y"));
+		parser.Eval(result, nBulkSize);
+
+		for (int i = 0; i < nBulkSize; ++i)
+		{
+			mu::console() << _T("Eqn. ") << i << _T(": x=") << x[i] << _T("; y=") << y[i] << _T("; result=") << result[i] << _T("\n");
+		}
+	}
+	catch (...)
+	{
+		delete[] x;
+		delete[] y;
+		delete[] result;
+		throw;
+	}
+
+	delete[] x;
+	delete[] y;
+	delete[] result;
 }
 
-//---------------------------------------------------------------------------
+
 static void Calc()
 {
-  mu::Parser  parser;
-
-  // Change locale settings if necessary
-  // function argument separator:   sum(2;3;4) vs. sum(2,3,4)
-  // decimal separator:             3,14       vs. 3.14
-  // thousands separator:           1000000    vs 1.000.000
-//#define USE_GERMAN_LOCALE
-#ifdef  USE_GERMAN_LOCALE
-  parser.SetArgSep(';');
-  parser.SetDecSep(',');
-  parser.SetThousandsSep('.');
-#else
-  // this is the default, so i it's commented:
-  //parser.SetArgSep(',');
-  //parser.SetDecSep('.');
-  //parser.SetThousandsSep('');
-#endif
-
-  // Add some variables
-  value_type  vVarVal[] = { 1, 2 }; // Values of the parser variables
-  parser.DefineVar(_T("a"), &vVarVal[0]);  // Assign Variable names and bind them to the C++ variables
-  parser.DefineVar(_T("b"), &vVarVal[1]);
-  parser.DefineVar(_T("ft"), &vVarVal[1]);
-  parser.DefineStrConst(_T("sVar1"), _T("Sample string 1") );
-  parser.DefineStrConst(_T("sVar2"), _T("Sample string 2") );
-  parser.AddValIdent(IsHexValue);
-
-  // Add user defined unary operators
-  parser.DefinePostfixOprt(_T("M"), Mega);
-  parser.DefinePostfixOprt(_T("m"), Milli);
-  parser.DefineInfixOprt(_T("!"), Not);
-  parser.DefineFun(_T("strfun0"), StrFun0);
-  parser.DefineFun(_T("strfun2"), StrFun2);
-  parser.DefineFun(_T("ping"), Ping);
-  parser.DefineFun(_T("rnd"), Rnd);     // Add an unoptimizeable function
-  parser.DefineFun(_T("throw"), ThrowAnException);
-
-  
-  parser.DefineOprt(_T("add"), Add, 0);
-  parser.DefineOprt(_T("mul"), Mul, 1);
-
-  // These are service and debug functions
-  parser.DefineFun(_T("debug"), Debug);
-  parser.DefineFun(_T("selftest"), SelfTest);
-  parser.DefineFun(_T("help"), Help);
-
-  parser.DefinePostfixOprt(_T("{ft}"), Milli);
-  parser.DefinePostfixOprt(_T("ft"), Milli);
-#ifdef _DEBUG
-//  parser.EnableDebugDump(1, 0);
-#endif
-
-  // Define the variable factory
-  parser.SetVarFactory(AddVariable, &parser);
-
-  for(;;)
-  {
-    try
-    {
-      string_type sLine;
-      std::getline(mu::console_in(), sLine);
-
-      switch (CheckKeywords(sLine.c_str(), parser))
-      {
-      case  0: break;
-      case  1: continue;
-      case -1: return;
-      }
-
-      if (!sLine.length())
-        continue;
-
-      parser.SetExpr(sLine);
-      mu::console() << std::setprecision(12);
-
-      // There are multiple ways to retrieve the result...
-      // 1.) If you know there is only a single return value or in case you only need the last 
-      //     result of an expression consisting of comma separated subexpressions you can 
-      //     simply use: 
-      mu::console() << _T("ans=") << parser.Eval() << _T("\n");
-
-      // 2.) As an alternative you can also retrieve multiple return values using this API:
-      int nNum = parser.GetNumResults();
-      if (nNum>1)
-      {
-        mu::console() << _T("Multiple return values detected! Complete list:\n");
-
-        // this is the hard way if you need to retrieve multiple subexpression
-        // results
-        value_type *v = parser.Eval(nNum);
-        mu::console() << std::setprecision(12);
-        for (int i=0; i<nNum; ++i)
-        {
-          mu::console() << v[i] << _T("\n");
-        }
-      }
-    }
-    catch(mu::Parser::exception_type &e)
-    {
-      mu::console() << _T("\nError:\n");
-      mu::console() << _T("------\n");
-      mu::console() << _T("Message:     ")   << e.GetMsg()   << _T("\n");
-      mu::console() << _T("Expression:  \"") << e.GetExpr()  << _T("\"\n");
-      mu::console() << _T("Token:       \"") << e.GetToken()    << _T("\"\n");
-      mu::console() << _T("Position:    ")   << (int)e.GetPos() << _T("\n");
-      mu::console() << _T("Errc:        ")   << std::dec << e.GetCode() << _T("\n");
-    }
-  } // while running
+	mu::Parser  parser;
+
+	// Add some variables
+	value_type  vVarVal[] = { 1, 2 }; // Values of the parser variables
+	parser.DefineVar(_T("a"), &vVarVal[0]);  // Assign Variable names and bind them to the C++ variables
+	parser.DefineVar(_T("b"), &vVarVal[1]);
+	parser.DefineVar(_T("ft"), &vVarVal[1]);
+	parser.DefineStrConst(_T("sVar1"), _T("Sample string 1"));
+	parser.DefineStrConst(_T("sVar2"), _T("Sample string 2"));
+	parser.AddValIdent(IsHexValue);
+	parser.AddValIdent(IsBinValue);
+
+	// Add user defined unary operators
+	parser.DefinePostfixOprt(_T("M"), Mega);
+	parser.DefinePostfixOprt(_T("m"), Milli);
+	parser.DefineInfixOprt(_T("!"), Not);
+	parser.DefineFun(_T("strfun0"), StrFun0);
+	parser.DefineFun(_T("strfun2"), StrFun2);
+	parser.DefineFun(_T("ping"), Ping);
+	parser.DefineFun(_T("rnd"), Rnd, false);     // Add an unoptimizeable function
+	parser.DefineFun(_T("throw"), ThrowAnException);
+
+	parser.DefineOprt(_T("add"), Add, 0);
+	parser.DefineOprt(_T("mul"), Mul, 1);
+
+	// These are service and debug functions
+	parser.DefineFun(_T("debug"), Debug);
+	parser.DefineFun(_T("selftest"), SelfTest);
+	parser.DefineFun(_T("help"), Help);
+	parser.DefineFun(_T("arg2of2"), Arg2Of2);
+	parser.DefineFun(_T("arg1of2"), Arg1Of2, false);
+
+	parser.DefinePostfixOprt(_T("{ft}"), Milli);
+	parser.DefinePostfixOprt(_T("ft"), Milli);
+
+	// Define the variable factory
+	parser.SetVarFactory(AddVariable, &parser);
+
+	for (;;)
+	{
+		try
+		{
+			string_type sLine;
+			std::getline(mu::console_in(), sLine);
+
+			switch (CheckKeywords(sLine.c_str(), parser))
+			{
+			case  0: break;
+			case  1: continue;
+			case -1: return;
+			}
+
+			if (!sLine.length())
+				continue;
+
+			parser.SetExpr(sLine);
+			mu::console() << std::setprecision(12);
+
+			// There are multiple ways to retrieve the result...
+			// 1.) If you know there is only a single return value or in case you only need the last 
+			//     result of an expression consisting of comma separated subexpressions you can 
+			//     simply use: 
+			mu::console() << _T("ans=") << parser.Eval() << _T("\n");
+
+			// 2.) As an alternative you can also retrieve multiple return values using this API:
+			int nNum = parser.GetNumResults();
+			if (nNum > 1)
+			{
+				mu::console() << _T("Multiple return values detected! Complete list:\n");
+
+				// this is the hard way if you need to retrieve multiple subexpression
+				// results
+				value_type* v = parser.Eval(nNum);
+				mu::console() << std::setprecision(12);
+				for (int i = 0; i < nNum; ++i)
+				{
+					mu::console() << v[i] << _T("\n");
+				}
+			}
+		}
+		catch (mu::Parser::exception_type& e)
+		{
+			mu::console() << _T("\nError:\n");
+			mu::console() << _T("------\n");
+			mu::console() << _T("Message:     ") << e.GetMsg() << _T("\n");
+			mu::console() << _T("Expression:  \"") << e.GetExpr() << _T("\"\n");
+			mu::console() << _T("Token:       \"") << e.GetToken() << _T("\"\n");
+			mu::console() << _T("Position:    ") << (int)e.GetPos() << _T("\n");
+			mu::console() << _T("Errc:        ") << std::dec << e.GetCode() << _T("\n");
+		}
+	} // while running
 }
 
-//---------------------------------------------------------------------------
+
 int main(int, char**)
 {
-  Splash();
-  SelfTest();
-  Help();
-
-//  CheckLocale();
-//  CheckDiff();
-
-  mu::console() << _T("Enter an expression or a command:\n");
-
-  try
-  {
-    Calc();
-  }
-  catch(Parser::exception_type &e)
-  {
-    // Only erros raised during the initialization will end up here
-    // formula related errors are treated in Calc()
-    console() << _T("Initialization error:  ") << e.GetMsg() << endl;
-    console() << _T("aborting...") << endl;
-    string_type sBuf;
-    console_in() >> sBuf;
-  }
-  catch(std::exception & /*exc*/)
-  {
-    // there is no unicode compliant way to query exc.what()
-    // so i'll leave it for this example.
-    console() << _T("aborting...\n");
-  }
-
-  return 0;
+	Splash();
+	SelfTest();
+	Help();
+
+	mu::console() << _T("Enter an expression or a command:\n");
+
+	try
+	{
+		Calc();
+	}
+	catch (Parser::exception_type& e)
+	{
+		// Only erros raised during the initialization will end up here
+		// formula related errors are treated in Calc()
+		console() << _T("Initialization error:  ") << e.GetMsg() << endl;
+		console() << _T("aborting...") << endl;
+		string_type sBuf;
+		console_in() >> sBuf;
+	}
+	catch (std::exception& /*exc*/)
+	{
+		// there is no unicode compliant way to query exc.what()
+		// i'll leave it for this example.
+		console() << _T("aborting...\n");
+	}
+
+	return 0;
 }
diff --git a/samples/example2/Readme.txt b/samples/example2/Readme.txt
index f4b832b..312df48 100644
--- a/samples/example2/Readme.txt
+++ b/samples/example2/Readme.txt
@@ -6,7 +6,7 @@
   |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|
         \/                       \/            \/      \/
 
-  Copyright (C) 2010
+  Copyright (C) 2004-2020
   Ingo Berg
 
 
@@ -14,5 +14,4 @@ This sample demonstrates using muParsers C-interface. The C-Interface
 is useful when interfacing muParser from different languages such
 as C#. This sample is intended for use with the MS-Windows OS.
 
-You may need to copy the muparser.dll file from the ..\..\lib 
-folder in this directory in order to run this sample.
+The sample should work with windows and linux.
diff --git a/samples/example2/example2.c b/samples/example2/example2.c
index 7e95169..42e4564 100644
--- a/samples/example2/example2.c
+++ b/samples/example2/example2.c
@@ -1,7 +1,37 @@
+/*
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <wchar.h>
+#include <inttypes.h>
 
 #include "muParserDLL.h"
 
@@ -10,432 +40,430 @@
 #define PARSER_MAXVARS		10
 
 #ifndef _UNICODE
-    #define _T(x) x
-    #define myprintf printf
-    #define mystrlen strlen
-    #define myfgets fgets
-    #define mystrcmp strcmp
+	#define _T(x) x
+	#define myprintf printf
+	#define mystrlen strlen
+	#define myfgets fgets
+	#define mystrcmp strcmp
 #else
-    #define _T(x) L ##x
-    #define myprintf wprintf
-    #define mystrlen wcslen
-    #define myfgets fgetws
-    #define mystrcmp wcscmp
+	#define _T(x) L##x
+	#define myprintf wprintf
+	#define mystrlen wcslen
+	#define myfgets fgetws
+	#define mystrcmp wcscmp
 #endif
 
-extern void CalcBulk();
+static void CalcBulk(void);
 
 //---------------------------------------------------------------------------
 // Callbacks for postfix operators
-muFloat_t Mega(muFloat_t a_fVal)
+static muFloat_t Mega(muFloat_t a_fVal)
 {
-    return a_fVal * 1.0e6;
+	return a_fVal * 1.0e6;
 }
 
-muFloat_t Milli(muFloat_t a_fVal)
+static muFloat_t Milli(muFloat_t a_fVal)
 {
-    return a_fVal / 1.0e3;
+	return a_fVal / 1.0e3;
 }
 
-muFloat_t ZeroArg()
+static muFloat_t ZeroArg(void)
 {
-    myprintf(_T("i'm a function without arguments.\n"));
-    return 123;
+	myprintf(_T("i'm a function without arguments.\n"));
+	return 123;
 }
 
-muFloat_t BulkTest(int nBulkIdx, int nThreadIdx, muFloat_t v1)
+static muFloat_t BulkTest(int nBulkIdx, int nThreadIdx, muFloat_t v1)
 {
-    myprintf(_T("%d,%2.2f\n"), nBulkIdx, v1);
-    return v1 / (nBulkIdx + 1);
+	myprintf(_T("%d,%2.2f\n"), nBulkIdx, v1);
+	return v1 / ((muFloat_t)nBulkIdx + 1);
 }
 
 //---------------------------------------------------------------------------
 // Callbacks for infix operators
-muFloat_t Not(muFloat_t v) { return v == 0; }
+static muFloat_t Not(muFloat_t v) { return v == 0; }
 
 //---------------------------------------------------------------------------
 // Function callbacks
-muFloat_t Rnd(muFloat_t v) { return v * rand() / (muFloat_t)(RAND_MAX + 1.0); }
-
-muFloat_t SampleQuery(const muChar_t *szMsg)
-{
-    if (szMsg)
-    {
-        myprintf(_T("%s\n"), szMsg);
-    }
+static muFloat_t Rnd(muFloat_t v) { return v * rand() / (muFloat_t)(RAND_MAX + 1.0); }
 
-    return 999;
-}
-
-muFloat_t Sum(const muFloat_t *a_afArg, int a_iArgc)
+static muFloat_t Sum(const muFloat_t* a_afArg, int a_iArgc)
 {
-    muFloat_t fRes = 0;
-    int i = 0;
+	muFloat_t fRes = 0;
+	int i = 0;
 
-    for (i = 0; i < a_iArgc; ++i)
-        fRes += a_afArg[i];
+	for (i = 0; i < a_iArgc; ++i)
+		fRes += a_afArg[i];
 
-    return fRes;
+	return fRes;
 }
 
 //---------------------------------------------------------------------------
 // Binarty operator callbacks
-muFloat_t Add(muFloat_t v1, muFloat_t v2)
+static muFloat_t Add(muFloat_t v1, muFloat_t v2)
 {
-    return v1 + v2;
+	return v1 + v2;
 }
 
-muFloat_t Mul(muFloat_t v1, muFloat_t v2)
+static muFloat_t Mul(muFloat_t v1, muFloat_t v2)
 {
-    return v1*v2;
+	return v1 * v2;
 }
 
 //---------------------------------------------------------------------------
 // Factory function for creating new parser variables
 // This could as well be a function performing database queries.
-muFloat_t* AddVariable(const muChar_t* a_szName, void *pUserData)
+static muFloat_t* AddVariable(const muChar_t* a_szName, void* pUserData)
 {
-    static muFloat_t afValBuf[PARSER_MAXVARS];  // I don't want dynamic allocation here
-    static int iVal = 0;                     // so i used this buffer
+	static muFloat_t afValBuf[PARSER_MAXVARS];  // I don't want dynamic allocation here
+	static int iVal = 0;						// so i used this buffer
 
-    myprintf(_T("Generating new variable \"%s\" (slots left: %d; context pointer: 0x%x)\n"), a_szName, PARSER_MAXVARS - iVal, (int)pUserData);
+	myprintf(_T("Generating new variable \"%s\" (slots left: %d; context pointer: %") PRIxPTR _T(")\n"), a_szName, PARSER_MAXVARS - iVal, (intptr_t)pUserData);
 
-    afValBuf[iVal] = 0;
-    if (iVal >= PARSER_MAXVARS - 1)
-    {
-        myprintf(_T("Variable buffer overflow."));
-        return NULL;
-    }
+	afValBuf[iVal] = 0;
+	if (iVal >= PARSER_MAXVARS - 1)
+	{
+		myprintf(_T("Variable buffer overflow."));
+		return NULL;
+	}
 
-    return &afValBuf[iVal++];
+	return &afValBuf[iVal++];
 }
 
 //---------------------------------------------------------------------------
-void Intro(muParserHandle_t hParser)
+static void Intro(muParserHandle_t hParser)
 {
-    myprintf(_T("                 __________                                       \n"));
-    myprintf(_T("    _____   __ __\\______   \\_____  _______  ______  ____ _______\n"));
-    myprintf(_T("   /     \\ |  |  \\|     ___/\\__  \\ \\_  __ \\/  ___/_/ __ \\\\_  __ \\ \n"));
-    myprintf(_T("  |  Y Y  \\|  |  /|    |     / __ \\_|  | \\/\\___ \\ \\  ___/ |  | \\/ \n"));
-    myprintf(_T("  |__|_|  /|____/ |____|    (____  /|__|  /____  > \\___  >|__|    \n"));
-    myprintf(_T("        \\/                       \\/            \\/      \\/         \n"));
-    myprintf(_T("  Version %s (DLL)\n"), mupGetVersion(hParser));
-#ifdef _UNICODE
-    myprintf(_T("  Sample build with UNICODE support\n"));
-#else
-    myprintf(_T("  Sample build with ASCII support\n"));
+	myprintf(_T("\n"));
+	myprintf(_T("   _____  __ _____________ ________  _____ ____________  \n"));
+	myprintf(_T("  /     \\|  |  \\____ \\__   \\\\_  __ \\/ ___// __  \\_  __ \\ \n"));
+	myprintf(_T(" |  Y Y  \\  |  /  |_> > ___ \\|  | \\/\\___\\\\  ___/ |  | \\/ \n"));
+	myprintf(_T(" |__|_|  /____/|   __(____  /___|  /___  >\\___  >|__|    \n"));
+	myprintf(_T("       \\/      |__|       \\/           \\/     \\/         \n"));
+	myprintf(_T("  Version %s (DLL)\n"), mupGetVersion(hParser));
+	myprintf(_T("  (C) 2004 - 2020 Ingo Berg\n"));
+	myprintf(_T("\n"));
+	myprintf(_T("-----------------------------------------------------------\n"));
+
+#if defined(__clang__)
+	// Note: CLANG also identifies as GCC 4.2.1
+	myprintf(_T("  Compiled with CLANG Version %d.%d.%d\n"), __clang_major__, __clang_minor__, __clang_patchlevel__);
+#elif defined (__GNUC__)
+	myprintf(_T("  Compiled with GCC Version %d.%d.%d\n"), __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
+#elif defined(_MSC_VER)
+	myprintf(_T("  Compiled with MSVC Version %d\n"), _MSC_VER);
 #endif
-    myprintf(_T("  (C) 2015 Ingo Berg\n"));
-    myprintf(_T("---------------------------------------\n"));
-    myprintf(_T("Commands:\n"));
-    myprintf(_T("  list var     - list parser variables\n"));
-    myprintf(_T("  list exprvar - list expression variables\n"));
-    myprintf(_T("  list const   - list all numeric parser constants\n"));
-    myprintf(_T("  locale de    - switch to german locale\n"));
-    myprintf(_T("  locale en    - switch to english locale\n"));
-    myprintf(_T("  locale reset - reset locale\n"));
-    myprintf(_T("  test bulk    - test bulk mode\n"));
-    myprintf(_T("  quit         - exits the parser\n\n"));
-    myprintf(_T("---------------------------------------\n"));
-    myprintf(_T("Constants:\n"));
-    myprintf(_T("  \"_e\"   2.718281828459045235360287\n"));
-    myprintf(_T("  \"_pi\"  3.141592653589793238462643\n"));
-    myprintf(_T("---------------------------------------\n"));
-    myprintf(_T("Please enter an expression:\n"));
+
+	myprintf(_T("  %ld-bit build\n"), sizeof(void*) * 8);
+	myprintf(_T("-----------------------------------------------------------\n"));
+	myprintf(_T("Commands:\n"));
+	myprintf(_T("  list var     - list parser variables\n"));
+	myprintf(_T("  list exprvar - list expression variables\n"));
+	myprintf(_T("  list const   - list all numeric parser constants\n"));
+	myprintf(_T("  locale de    - switch to german locale\n"));
+	myprintf(_T("  locale en    - switch to english locale\n"));
+	myprintf(_T("  locale reset - reset locale\n"));
+	myprintf(_T("  test bulk    - test bulk mode\n"));
+	myprintf(_T("  quit         - exits the parser\n\n"));
+	myprintf(_T("-----------------------------------------------------------\n"));
+	myprintf(_T("Constants:\n"));
+	myprintf(_T("  \"_e\"   2.718281828459045235360287\n"));
+	myprintf(_T("  \"_pi\"  3.141592653589793238462643\n"));
+	myprintf(_T("-----------------------------------------------------------\n"));
+	myprintf(_T("Please enter an expression:\n"));
 }
 
 //---------------------------------------------------------------------------
 // Callback function for parser errors
-void OnError(muParserHandle_t hParser)
+static void OnError(muParserHandle_t hParser)
 {
-    myprintf(_T("\nError:\n"));
-    myprintf(_T("------\n"));
-    myprintf(_T("Message:  \"%s\"\n"), mupGetErrorMsg(hParser));
-    myprintf(_T("Token:    \"%s\"\n"), mupGetErrorToken(hParser));
-    myprintf(_T("Position: %d\n"), mupGetErrorPos(hParser));
-    myprintf(_T("Errc:     %d\n"), mupGetErrorCode(hParser));
+	myprintf(_T("\nError:\n"));
+	myprintf(_T("------\n"));
+	myprintf(_T("Message:  \"%s\"\n"), mupGetErrorMsg(hParser));
+	myprintf(_T("Token:    \"%s\"\n"), mupGetErrorToken(hParser));
+	myprintf(_T("Position: %d\n"), mupGetErrorPos(hParser));
+	myprintf(_T("Errc:     %d\n"), mupGetErrorCode(hParser));
 }
 
 //---------------------------------------------------------------------------
-void ListVar(muParserHandle_t a_hParser)
+static void ListVar(muParserHandle_t a_hParser)
 {
-    int iNumVar = mupGetVarNum(a_hParser);
-    int i = 0;
-
-    if (iNumVar == 0)
-    {
-        myprintf(_T("No variables defined\n"));
-        return;
-    }
-
-    myprintf(_T("\nExpression variables:\n"));
-    myprintf(_T("---------------------\n"));
-    myprintf(_T("Number: %d\n"), iNumVar);
-
-    for (i = 0; i < iNumVar; ++i)
-    {
-        const muChar_t* szName = 0;
-        muFloat_t* pVar = 0;
-
-        mupGetVar(a_hParser, i, &szName, &pVar);
-        myprintf(_T("Name: %s    Address: [0x%x]\n"), szName, (int)pVar);
-    }
+	int iNumVar = mupGetVarNum(a_hParser);
+	int i = 0;
+
+	if (iNumVar == 0)
+	{
+		myprintf(_T("No variables defined\n"));
+		return;
+	}
+
+	myprintf(_T("\nExpression variables:\n"));
+	myprintf(_T("---------------------\n"));
+	myprintf(_T("Number: %d\n"), iNumVar);
+
+	for (i = 0; i < iNumVar; ++i)
+	{
+		const muChar_t* szName = 0;
+		muFloat_t* pVar = 0;
+
+		mupGetVar(a_hParser, i, &szName, &pVar);
+		myprintf(_T("Name: %s    Address: [%") PRIxPTR _T("]\n"), szName, (uintptr_t)pVar);
+	}
 }
 
 //---------------------------------------------------------------------------
-void ListExprVar(muParserHandle_t a_hParser)
+static void ListExprVar(muParserHandle_t a_hParser)
 {
-    muInt_t iNumVar = mupGetExprVarNum(a_hParser),
-        i = 0;
-
-    if (iNumVar == 0)
-    {
-        myprintf(_T("Expression dos not contain variables\n"));
-        return;
-    }
-
-    myprintf(_T("\nExpression variables:\n"));
-    myprintf(_T("---------------------\n"));
-    myprintf(_T("Expression: %s\n"), mupGetExpr(a_hParser));
-    myprintf(_T("Number: %d\n"), iNumVar);
-
-    for (i = 0; i < iNumVar; ++i)
-    {
-        const muChar_t* szName = 0;
-        muFloat_t* pVar = 0;
-
-        mupGetExprVar(a_hParser, i, &szName, &pVar);
-        myprintf(_T("Name: %s   Address: [0x%x]\n"), szName, (int)pVar);
-    }
+	muInt_t iNumVar = mupGetExprVarNum(a_hParser),
+		i = 0;
+
+	if (iNumVar == 0)
+	{
+		myprintf(_T("Expression dos not contain variables\n"));
+		return;
+	}
+
+	myprintf(_T("\nExpression variables:\n"));
+	myprintf(_T("---------------------\n"));
+	myprintf(_T("Expression: %s\n"), mupGetExpr(a_hParser));
+	myprintf(_T("Number: %d\n"), iNumVar);
+
+	for (i = 0; i < iNumVar; ++i)
+	{
+		const muChar_t* szName = 0;
+		muFloat_t* pVar = 0;
+
+		mupGetExprVar(a_hParser, i, &szName, &pVar);
+		myprintf(_T("Name: %s   Address: [%") PRIxPTR _T("]\n"), szName, (intptr_t)pVar);
+	}
 }
 
 //---------------------------------------------------------------------------
-void ListConst(muParserHandle_t a_hParser)
+static void ListConst(muParserHandle_t a_hParser)
 {
-    muInt_t iNumVar = mupGetConstNum(a_hParser),
-        i = 0;
-
-    if (iNumVar == 0)
-    {
-        myprintf(_T("No constants defined\n"));
-        return;
-    }
-
-    myprintf(_T("\nParser constants:\n"));
-    myprintf(_T("---------------------\n"));
-    myprintf(_T("Number: %d"), iNumVar);
-
-    for (i = 0; i < iNumVar; ++i)
-    {
-        const muChar_t* szName = 0;
-        muFloat_t fVal = 0;
-
-        mupGetConst(a_hParser, i, &szName, &fVal);
-        myprintf(_T("  %s = %f\n"), szName, fVal);
-    }
+	muInt_t iNumVar = mupGetConstNum(a_hParser),
+		i = 0;
+
+	if (iNumVar == 0)
+	{
+		myprintf(_T("No constants defined\n"));
+		return;
+	}
+
+	myprintf(_T("\nParser constants:\n"));
+	myprintf(_T("---------------------\n"));
+	myprintf(_T("Number: %d\n"), iNumVar);
+
+	for (i = 0; i < iNumVar; ++i)
+	{
+		const muChar_t* szName = 0;
+		muFloat_t fVal = 0;
+
+		mupGetConst(a_hParser, i, &szName, &fVal);
+		myprintf(_T("  %s = %f\n"), szName, fVal);
+	}
 }
 
 //---------------------------------------------------------------------------
 /** \brief Check for external keywords.
 */
-int CheckKeywords(const muChar_t *a_szLine, muParserHandle_t a_hParser)
+static int CheckKeywords(const muChar_t* a_szLine, muParserHandle_t a_hParser)
 {
-    if (!mystrcmp(a_szLine, _T("quit")))
-    {
-        return -1;
-    }
-    else if (!mystrcmp(a_szLine, _T("list var")))
-    {
-        ListVar(a_hParser);
-        return 1;
-    }
-    else if (!mystrcmp(a_szLine, _T("list exprvar")))
-    {
-        ListExprVar(a_hParser);
-        return 1;
-    }
-    else if (!mystrcmp(a_szLine, _T("list const")))
-    {
-        ListConst(a_hParser);
-        return 1;
-    }
-    else if (!mystrcmp(a_szLine, _T("locale de")))
-    {
-        myprintf(_T("Setting german locale: ArgSep=';' DecSep=',' ThousandsSep='.'\n"));
-        mupSetArgSep(a_hParser, ';');
-        mupSetDecSep(a_hParser, ',');
-        mupSetThousandsSep(a_hParser, '.');
-        return 1;
-    }
-    else if (!mystrcmp(a_szLine, _T("locale en")))
-    {
-        myprintf(_T("Setting english locale: ArgSep=',' DecSep='.' ThousandsSep=''\n"));
-        mupSetArgSep(a_hParser, ',');
-        mupSetDecSep(a_hParser, '.');
-        mupSetThousandsSep(a_hParser, 0);
-        return 1;
-    }
-    else if (!mystrcmp(a_szLine, _T("locale reset")))
-    {
-        myprintf(_T("Resetting locale\n"));
-        mupResetLocale(a_hParser);
-        return 1;
-    }
-    else if (!mystrcmp(a_szLine, _T("test bulk")))
-    {
-        myprintf(_T("Testing bulk mode\n"));
-        CalcBulk();
-        return 1;
-    }
-
-    return 0;
+	if (!mystrcmp(a_szLine, _T("quit")))
+	{
+		return -1;
+	}
+	else if (!mystrcmp(a_szLine, _T("list var")))
+	{
+		ListVar(a_hParser);
+		return 1;
+	}
+	else if (!mystrcmp(a_szLine, _T("list exprvar")))
+	{
+		ListExprVar(a_hParser);
+		return 1;
+	}
+	else if (!mystrcmp(a_szLine, _T("list const")))
+	{
+		ListConst(a_hParser);
+		return 1;
+	}
+	else if (!mystrcmp(a_szLine, _T("locale de")))
+	{
+		myprintf(_T("Setting german locale: ArgSep=';' DecSep=',' ThousandsSep='.'\n"));
+		mupSetArgSep(a_hParser, ';');
+		mupSetDecSep(a_hParser, ',');
+		mupSetThousandsSep(a_hParser, '.');
+		return 1;
+	}
+	else if (!mystrcmp(a_szLine, _T("locale en")))
+	{
+		myprintf(_T("Setting english locale: ArgSep=',' DecSep='.' ThousandsSep=''\n"));
+		mupSetArgSep(a_hParser, ',');
+		mupSetDecSep(a_hParser, '.');
+		mupSetThousandsSep(a_hParser, 0);
+		return 1;
+	}
+	else if (!mystrcmp(a_szLine, _T("locale reset")))
+	{
+		myprintf(_T("Resetting locale\n"));
+		mupResetLocale(a_hParser);
+		return 1;
+	}
+	else if (!mystrcmp(a_szLine, _T("test bulk")))
+	{
+		myprintf(_T("Testing bulk mode\n"));
+		CalcBulk();
+		return 1;
+	}
+
+	return 0;
 }
 
 //---------------------------------------------------------------------------
-void CalcBulk()
+static void CalcBulk(void)
 {
-    int nBulkSize = 200, i;
-    muFloat_t *x = (muFloat_t*)malloc(nBulkSize * sizeof(muFloat_t));
-    muFloat_t *y = (muFloat_t*)malloc(nBulkSize * sizeof(muFloat_t));
-    muFloat_t *r = (muFloat_t*)malloc(nBulkSize * sizeof(muFloat_t));
-
-    muParserHandle_t hParser = mupCreate(muBASETYPE_FLOAT);              // initialize the parser
-
-    for (i = 0; i < nBulkSize; ++i)
-    {
-        x[i] = i;
-        y[i] = i;
-        r[i] = 0;
-    }
-
-    mupDefineVar(hParser, _T("x"), x);
-    mupDefineVar(hParser, _T("y"), y);
-    mupDefineBulkFun1(hParser, _T("bulktest"), BulkTest);
-    mupSetExpr(hParser, _T("bulktest(x+y)"));
-    mupEvalBulk(hParser, r, nBulkSize);
-    if (mupError(hParser))
-    {
-        myprintf(_T("\nError:\n"));
-        myprintf(_T("------\n"));
-        myprintf(_T("Message:  %s\n"), mupGetErrorMsg(hParser));
-        myprintf(_T("Token:    %s\n"), mupGetErrorToken(hParser));
-        myprintf(_T("Position: %d\n"), mupGetErrorPos(hParser));
-        myprintf(_T("Errc:     %d\n"), mupGetErrorCode(hParser));
-        return;
-    }
-
-    for (i = 0; i < nBulkSize; ++i)
-    {
-        myprintf(_T("%d: bulkfun(%2.2f + %2.2f) = %2.2f\n"), i, x[i], y[i], r[i]);
-        x[i] = i;
-        y[i] = (muFloat_t)i / 10;
-    }
-
-    free(x);
-    free(y);
-    free(r);
+	int nBulkSize = 200, i;
+	muFloat_t* x = (muFloat_t*)malloc(nBulkSize * sizeof(muFloat_t));
+	muFloat_t* y = (muFloat_t*)malloc(nBulkSize * sizeof(muFloat_t));
+	muFloat_t* r = (muFloat_t*)malloc(nBulkSize * sizeof(muFloat_t));
+
+	muParserHandle_t hParser = mupCreate(muBASETYPE_FLOAT);              // initialize the parser
+
+	for (i = 0; i < nBulkSize; ++i)
+	{
+		x[i] = i;
+		y[i] = i;
+		r[i] = 0;
+	}
+
+	mupDefineVar(hParser, _T("x"), x);
+	mupDefineVar(hParser, _T("y"), y);
+	mupDefineBulkFun1(hParser, _T("bulktest"), BulkTest);
+	mupSetExpr(hParser, _T("bulktest(x+y)"));
+	mupEvalBulk(hParser, r, nBulkSize);
+	if (mupError(hParser))
+	{
+		myprintf(_T("\nError:\n"));
+		myprintf(_T("------\n"));
+		myprintf(_T("Message:  %s\n"), mupGetErrorMsg(hParser));
+		myprintf(_T("Token:    %s\n"), mupGetErrorToken(hParser));
+		myprintf(_T("Position: %d\n"), mupGetErrorPos(hParser));
+		myprintf(_T("Errc:     %d\n"), mupGetErrorCode(hParser));
+		return;
+	}
+
+	for (i = 0; i < nBulkSize; ++i)
+	{
+		myprintf(_T("%d: bulkfun(%2.2f + %2.2f) = %2.2f\n"), i, x[i], y[i], r[i]);
+		x[i] = i;
+		y[i] = (muFloat_t)i / 10;
+	}
+
+	free(x);
+	free(y);
+	free(r);
 }
 
 //---------------------------------------------------------------------------
-void Calc()
+static void Calc(void)
 {
-    muChar_t szLine[100];
-    muFloat_t fVal = 0,
-        afVarVal[] = { 1, 2 }; // Values of the parser variables
-    muParserHandle_t hParser;
+	muChar_t szLine[100];
+	muFloat_t fVal = 0,
+		afVarVal[] = { 1, 2 }; // Values of the parser variables
+	muParserHandle_t hParser;
 
-    hParser = mupCreate(muBASETYPE_FLOAT);              // initialize the parser
-    Intro(hParser);
+	hParser = mupCreate(muBASETYPE_FLOAT);              // initialize the parser
+	Intro(hParser);
 
-    // Set an error handler [optional]
-    // the only function that does not take a parser instance handle
-    mupSetErrorHandler(hParser, OnError);
+	// Set an error handler [optional]
+	// the only function that does not take a parser instance handle
+	mupSetErrorHandler(hParser, OnError);
 
-    //#define GERMAN_LOCALS
+	//#define GERMAN_LOCALS
 #ifdef GERMAN_LOCALS
-    mupSetArgSep(hParser, ';');
-    mupSetDecSep(hParser, ',');
-    mupSetThousandsSep(hParser, '.');
+	mupSetArgSep(hParser, ';');
+	mupSetDecSep(hParser, ',');
+	mupSetThousandsSep(hParser, '.');
 #else
-    mupSetArgSep(hParser, ',');
-    mupSetDecSep(hParser, '.');
+	mupSetArgSep(hParser, ',');
+	mupSetDecSep(hParser, '.');
 #endif
 
-    // Set a variable factory
-    mupSetVarFactory(hParser, AddVariable, NULL);
+	// Set a variable factory
+	mupSetVarFactory(hParser, AddVariable, NULL);
 
-    // Define parser variables and bind them to C++ variables [optional]
-    mupDefineConst(hParser, _T("const1"), 1);
-    mupDefineConst(hParser, _T("const2"), 2);
-    mupDefineStrConst(hParser, _T("strBuf"), _T("Hallo welt"));
+	// Define parser variables and bind them to C++ variables [optional]
+	mupDefineConst(hParser, _T("const1"), 1);
+	mupDefineConst(hParser, _T("const2"), 2);
+	mupDefineStrConst(hParser, _T("strBuf"), _T("Hallo welt"));
 
-    // Define parser variables and bind them to C++ variables [optional]
-    mupDefineVar(hParser, _T("a"), &afVarVal[0]);
-    mupDefineVar(hParser, _T("b"), &afVarVal[1]);
+	// Define parser variables and bind them to C++ variables [optional]
+	mupDefineVar(hParser, _T("a"), &afVarVal[0]);
+	mupDefineVar(hParser, _T("b"), &afVarVal[1]);
 
-    // Define postfix operators [optional]
-    mupDefinePostfixOprt(hParser, _T("M"), Mega, 0);
-    mupDefinePostfixOprt(hParser, _T("m"), Milli, 0);
+	// Define postfix operators [optional]
+	mupDefinePostfixOprt(hParser, _T("M"), Mega, 0);
+	mupDefinePostfixOprt(hParser, _T("m"), Milli, 0);
 
-    // Define infix operator [optional]
-    mupDefineInfixOprt(hParser, _T("!"), Not, 0);
+	// Define infix operator [optional]
+	mupDefineInfixOprt(hParser, _T("!"), Not, 0);
 
-    // Define functions [optional]
-    //  mupDefineStrFun(hParser, "query", SampleQuery, 0); // Add an unoptimizeable function 
-    mupDefineFun0(hParser, _T("zero"), ZeroArg, 0);
-    mupDefineFun1(hParser, _T("rnd"), Rnd, 0);             // Add an unoptimizeable function
-    mupDefineFun1(hParser, _T("rnd2"), Rnd, 1);
-    mupDefineMultFun(hParser, _T("_sum"), Sum, 0);  // "sum" is already a default function
+	// Define functions [optional]
+	//  mupDefineStrFun(hParser, "query", SampleQuery, 0); // Add an unoptimizeable function 
+	mupDefineFun0(hParser, _T("zero"), ZeroArg, 0);
+	mupDefineFun1(hParser, _T("rnd"), Rnd, 0);             // Add an unoptimizeable function
+	mupDefineFun1(hParser, _T("rnd2"), Rnd, 1);
+	mupDefineMultFun(hParser, _T("_sum"), Sum, 0);  // "sum" is already a default function
 
-    // Define binary operators [optional]
-    mupDefineOprt(hParser, _T("add"), Add, 0, muOPRT_ASCT_LEFT, 0);
-    mupDefineOprt(hParser, _T("mul"), Mul, 1, muOPRT_ASCT_LEFT, 0);
+	// Define binary operators [optional]
+	mupDefineOprt(hParser, _T("add"), Add, 0, muOPRT_ASCT_LEFT, 0);
+	mupDefineOprt(hParser, _T("mul"), Mul, 1, muOPRT_ASCT_LEFT, 0);
 
-    while (myfgets(szLine, 99, stdin))
-    {
-        szLine[mystrlen(szLine) - 1] = 0; // overwrite the newline
+	while (myfgets(szLine, 99, stdin))
+	{
+		szLine[mystrlen(szLine) - 1] = 0; // overwrite the newline
 
-        switch (CheckKeywords(szLine, hParser))
-        {
-        case  0:  break;       // no keyword found; parse the line
-        case  1:  continue;    // A Keyword was found do not parse the line
-        case -1:  return;      // abort the application
-        }
+		switch (CheckKeywords(szLine, hParser))
+		{
+		case  0:  break;       // no keyword found; parse the line
+		case  1:  continue;    // A Keyword was found do not parse the line
+		case -1:  return;      // abort the application
+		}
 
-        mupSetExpr(hParser, szLine);
+		mupSetExpr(hParser, szLine);
 
-        fVal = mupEval(hParser);
+		fVal = mupEval(hParser);
 
 
-        // Without an Error handler function 
-        // you must use this for error treatment:
-        //if (mupError(hParser))
-        //{
-        //  printf("\nError:\n");
-        //  printf("------\n");
-        //  printf("Message:  %s\n", mupGetErrorMsg(hParser) );
-        //  printf("Token:    %s\n", mupGetErrorToken(hParser) );
-        //  printf("Position: %s\n", mupGetErrorPos(hParser) );
-        //  printf("Errc:     %d\n", mupGetErrorCode(hParser) );
-        //  continue;
-        //}
+		// Without an Error handler function 
+		// you must use this for error treatment:
+		//if (mupError(hParser))
+		//{
+		//  myprintf("\nError:\n");
+		//  myprintf("------\n");
+		//  myprintf("Message:  %s\n", mupGetErrorMsg(hParser) );
+		//  myprintf("Token:    %s\n", mupGetErrorToken(hParser) );
+		//  myprintf("Position: %s\n", mupGetErrorPos(hParser) );
+		//  myprintf("Errc:     %d\n", mupGetErrorCode(hParser) );
+		//  continue;
+		//}
 
-        if (!mupError(hParser))
-            myprintf(_T("%f\n"), fVal);
+		if (!mupError(hParser))
+			myprintf(_T("%f\n"), fVal);
 
-    } // while 
+	} // while 
 
-    // finally free the parser resources
-    mupRelease(hParser);
+	// finally free the parser resources
+	mupRelease(hParser);
 }
 
 //---------------------------------------------------------------------------
-int main(int argc, char *argv[])
+int main(int argc, char* argv[])
 {
-    // The next line is just for shutting up the compiler warning
-    // about unused variables without getting another warning about not
-    // being able to use type lists in function declarations.
-    myprintf(_T("Executing \"%s\" (argc=%d)\n"), argv[0], argc);
-    Calc();
-    printf(_T("done..."));
+	// The next line is just for shutting up the compiler warning
+	// about unused variables without getting another warning about not
+	// being able to use type lists in function declarations.
+	myprintf(_T("Executing \"%s\" (argc=%d)\n"), argv[0], argc);
+	Calc();
+	myprintf(_T("done..."));
 }
diff --git a/samples/example3/CMakeLists.txt b/samples/example3/CMakeLists.txt
new file mode 100644
index 0000000..0049c3e
--- /dev/null
+++ b/samples/example3/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 3.2)
+project(muparser-example3)
+
+# find muparser target already installed
+find_package(muparser 2.0 REQUIRED)
+
+add_executable(example3 example3.cpp)
+target_link_libraries(example3 muparser::muparser)
+
+include(CTest)
+add_test(example3 example3)
+
diff --git a/samples/example3/README.md b/samples/example3/README.md
new file mode 100644
index 0000000..73e15d4
--- /dev/null
+++ b/samples/example3/README.md
@@ -0,0 +1,2 @@
+The example3 shows how to import and use muparser as an installed external
+dependency using cmake `find_package()`.
diff --git a/samples/example3/build.sh b/samples/example3/build.sh
new file mode 100755
index 0000000..289fac9
--- /dev/null
+++ b/samples/example3/build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash -x
+
+CWD="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+MP_SOURCES=${CWD}/../../
+MP_BUILD=${CWD}/muparser-build
+MP_INSTALL=${CWD}/muparser-install
+EX3_BUILD_TREE=${CWD}/example3-using-buildtree
+EX3_INSTALL_TREE=${CWD}/example3-using-installtree
+
+# Build muparser and install it
+cmake -H${MP_SOURCES} -B${MP_BUILD} -DCMAKE_INSTALL_PREFIX=${MP_INSTALL}
+cmake --build ${MP_BUILD} --target install
+
+# Build the example using muparser build tree
+cmake -H${CWD} -B${EX3_BUILD_TREE} -DCMAKE_PREFIX_PATH=${MP_BUILD} 
+cmake --build ${EX3_BUILD_TREE} --target all
+cmake --build ${EX3_BUILD_TREE} --target test
+
+# Build the example using muparser install tree
+cmake -H${CWD} -B${EX3_INSTALL_TREE} -DCMAKE_PREFIX_PATH=${MP_INSTALL} 
+cmake --build ${EX3_INSTALL_TREE} --target all
+cmake --build ${EX3_INSTALL_TREE} --target test
+
diff --git a/samples/example3/example3.cpp b/samples/example3/example3.cpp
new file mode 100644
index 0000000..86a2ae2
--- /dev/null
+++ b/samples/example3/example3.cpp
@@ -0,0 +1,49 @@
+/*
+
+    _____  __ _____________ _______  ______ ___________
+   /     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+       \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+   Redistribution and use in source and binary forms, with or without modification, are permitted
+   provided that the following conditions are met:
+
+     * Redistributions of source code must retain the above copyright notice, this list of
+      conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above copyright notice, this list of
+      conditions and the following disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+   FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+   IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+// Small example using the cmake imported target. Include file and link library
+// should work automagically.
+
+#include <muParser.h>
+#include <muParserDef.h>
+
+int main()
+{
+   mu::Parser  parser;
+
+   mu::value_type  values[] = { 1, 2 };
+   parser.DefineVar("a", &values[0]);
+   parser.DefineVar("b", &values[1]);
+
+   std::string expr = "a + b";
+   parser.SetExpr("a + b");
+   mu::value_type ans = parser.Eval();
+   std::cout << expr << " == " << ans << "\n";
+
+   return (ans == 3.0) ? 0 : -1;
+}
diff --git a/src/muParser.cpp b/src/muParser.cpp
index b536556..0ebef2a 100644
--- a/src/muParser.cpp
+++ b/src/muParser.cpp
@@ -1,28 +1,31 @@
-/* 
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+/*
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #include "muParser.h"
 #include "muParserTemplateMagic.h"
 
@@ -31,16 +34,10 @@
 #include <algorithm>
 #include <numeric>
 
-/** \brief Pi (what else?). */
-#define PARSER_CONST_PI  3.141592653589793238462643
-
-/** \brief The Eulerian number. */
-#define PARSER_CONST_E   2.718281828459045235360287
-
 using namespace std;
 
 /** \file
-    \brief Implementation of the standard floating point parser.
+	\brief Implementation of the standard floating point parser.
 */
 
 
@@ -48,350 +45,189 @@ using namespace std;
 /** \brief Namespace for mathematical applications. */
 namespace mu
 {
-
-
-  //---------------------------------------------------------------------------
-  // Trigonometric function
-  value_type Parser::Sin(value_type v)   { return MathImpl<value_type>::Sin(v);  }
-  value_type Parser::Cos(value_type v)   { return MathImpl<value_type>::Cos(v);  }
-  value_type Parser::Tan(value_type v)   { return MathImpl<value_type>::Tan(v);  }
-  value_type Parser::ASin(value_type v)  { return MathImpl<value_type>::ASin(v); }
-  value_type Parser::ACos(value_type v)  { return MathImpl<value_type>::ACos(v); }
-  value_type Parser::ATan(value_type v)  { return MathImpl<value_type>::ATan(v); }
-  value_type Parser::ATan2(value_type v1, value_type v2) { return MathImpl<value_type>::ATan2(v1, v2); }
-  value_type Parser::Sinh(value_type v)  { return MathImpl<value_type>::Sinh(v); }
-  value_type Parser::Cosh(value_type v)  { return MathImpl<value_type>::Cosh(v); }
-  value_type Parser::Tanh(value_type v)  { return MathImpl<value_type>::Tanh(v); }
-  value_type Parser::ASinh(value_type v) { return MathImpl<value_type>::ASinh(v); }
-  value_type Parser::ACosh(value_type v) { return MathImpl<value_type>::ACosh(v); }
-  value_type Parser::ATanh(value_type v) { return MathImpl<value_type>::ATanh(v); }
-
-  //---------------------------------------------------------------------------
-  // Logarithm functions
-
-  // Logarithm base 2
-  value_type Parser::Log2(value_type v)  
-  { 
-    #ifdef MUP_MATH_EXCEPTIONS
-        if (v<=0)
-          throw ParserError(ecDOMAIN_ERROR, _T("Log2"));
-    #endif
-
-    return MathImpl<value_type>::Log2(v);  
-  }  
-
-  // Logarithm base 10
-  value_type Parser::Log10(value_type v) 
-  { 
-    #ifdef MUP_MATH_EXCEPTIONS
-        if (v<=0)
-          throw ParserError(ecDOMAIN_ERROR, _T("Log10"));
-    #endif
-
-    return MathImpl<value_type>::Log10(v); 
-  } 
-
-// Logarithm base e (natural logarithm)
-  value_type Parser::Ln(value_type v)    
-  { 
-    #ifdef MUP_MATH_EXCEPTIONS
-        if (v<=0)
-          throw ParserError(ecDOMAIN_ERROR, _T("Ln"));
-    #endif
-
-    return MathImpl<value_type>::Log(v);   
-  } 
-
-  //---------------------------------------------------------------------------
-  //  misc
-  value_type Parser::Exp(value_type v)  { return MathImpl<value_type>::Exp(v);  }
-  value_type Parser::Abs(value_type v)  { return MathImpl<value_type>::Abs(v);  }
-  value_type Parser::Sqrt(value_type v) 
-  { 
-    #ifdef MUP_MATH_EXCEPTIONS
-        if (v<0)
-          throw ParserError(ecDOMAIN_ERROR, _T("sqrt"));
-    #endif
-
-    return MathImpl<value_type>::Sqrt(v); 
-  }
-  value_type Parser::Rint(value_type v) { return MathImpl<value_type>::Rint(v); }
-  value_type Parser::Sign(value_type v) { return MathImpl<value_type>::Sign(v); }
-
-  //---------------------------------------------------------------------------
-  /** \brief Callback for the unary minus operator.
-      \param v The value to negate
-      \return -v
-  */
-  value_type Parser::UnaryMinus(value_type v) 
-  { 
-    return -v; 
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Callback for the unary minus operator.
-      \param v The value to negate
-      \return -v
-  */
-  value_type Parser::UnaryPlus(value_type v) 
-  { 
-    return v; 
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Callback for adding multiple values. 
-      \param [in] a_afArg Vector with the function arguments
-      \param [in] a_iArgc The size of a_afArg
-  */
-  value_type Parser::Sum(const value_type *a_afArg, int a_iArgc)
-  { 
-    if (!a_iArgc)	
-      throw exception_type(_T("too few arguments for function sum."));
-
-    value_type fRes=0;
-    for (int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];
-    return fRes;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Callback for averaging multiple values. 
-      \param [in] a_afArg Vector with the function arguments
-      \param [in] a_iArgc The size of a_afArg
-  */
-  value_type Parser::Avg(const value_type *a_afArg, int a_iArgc)
-  { 
-    if (!a_iArgc)	
-      throw exception_type(_T("too few arguments for function sum."));
-
-    value_type fRes=0;
-    for (int i=0; i<a_iArgc; ++i) fRes += a_afArg[i];
-    return fRes/(value_type)a_iArgc;
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Callback for determining the minimum value out of a vector. 
-      \param [in] a_afArg Vector with the function arguments
-      \param [in] a_iArgc The size of a_afArg
-  */
-  value_type Parser::Min(const value_type *a_afArg, int a_iArgc)
-  { 
-    if (!a_iArgc)	
-      throw exception_type(_T("too few arguments for function min."));
-
-    value_type fRes=a_afArg[0];
-    for (int i=0; i<a_iArgc; ++i) 
-      fRes = std::min(fRes, a_afArg[i]);
-
-    return fRes;
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Callback for determining the maximum value out of a vector. 
-      \param [in] a_afArg Vector with the function arguments
-      \param [in] a_iArgc The size of a_afArg
-  */
-  value_type Parser::Max(const value_type *a_afArg, int a_iArgc)
-  { 
-    if (!a_iArgc)	
-      throw exception_type(_T("too few arguments for function min."));
-
-    value_type fRes=a_afArg[0];
-    for (int i=0; i<a_iArgc; ++i) fRes = std::max(fRes, a_afArg[i]);
-
-    return fRes;
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Default value recognition callback. 
-      \param [in] a_szExpr Pointer to the expression
-      \param [in, out] a_iPos Pointer to an index storing the current position within the expression
-      \param [out] a_fVal Pointer where the value should be stored in case one is found.
-      \return 1 if a value was found 0 otherwise.
-  */
-  int Parser::IsVal(const char_type* a_szExpr, int *a_iPos, value_type *a_fVal)
-  {
-    value_type fVal(0);
-
-    stringstream_type stream(a_szExpr);
-    stream.seekg(0);        // todo:  check if this really is necessary
-    stream.imbue(Parser::s_locale);
-    stream >> fVal;
-    stringstream_type::pos_type iEnd = stream.tellg(); // Position after reading
-
-    if (iEnd==(stringstream_type::pos_type)-1)
-      return 0;
-
-    *a_iPos += (int)iEnd;
-    *a_fVal = fVal;
-    return 1;
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Constructor. 
-
-    Call ParserBase class constructor and trigger Function, Operator and Constant initialization.
-  */
-  Parser::Parser()
-    :ParserBase()
-  {
-    AddValIdent(IsVal);
-
-    InitCharSets();
-    InitFun();
-    InitConst();
-    InitOprt();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Define the character sets. 
-      \sa DefineNameChars, DefineOprtChars, DefineInfixOprtChars
-    
-    This function is used for initializing the default character sets that define
-    the characters to be useable in function and variable names and operators.
-  */
-  void Parser::InitCharSets()
-  {
-    DefineNameChars( _T("0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") );
-    DefineOprtChars( _T("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*^/?<>=#!$%&|~'_{}") );
-    DefineInfixOprtChars( _T("/+-*^?<>=#!$%&|~'_") );
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Initialize the default functions. */
-  void Parser::InitFun()
-  {
-    if (mu::TypeInfo<mu::value_type>::IsInteger())
-    {
-      // When setting MUP_BASETYPE to an integer type
-      // Place functions for dealing with integer values here
-      // ...
-      // ...
-      // ...
-    }
-    else
-    {
-      // trigonometric functions
-      DefineFun(_T("sin"), Sin);
-      DefineFun(_T("cos"), Cos);
-      DefineFun(_T("tan"), Tan);
-      // arcus functions
-      DefineFun(_T("asin"), ASin);
-      DefineFun(_T("acos"), ACos);
-      DefineFun(_T("atan"), ATan);
-      DefineFun(_T("atan2"), ATan2);
-      // hyperbolic functions
-      DefineFun(_T("sinh"), Sinh);
-      DefineFun(_T("cosh"), Cosh);
-      DefineFun(_T("tanh"), Tanh);
-      // arcus hyperbolic functions
-      DefineFun(_T("asinh"), ASinh);
-      DefineFun(_T("acosh"), ACosh);
-      DefineFun(_T("atanh"), ATanh);
-      // Logarithm functions
-      DefineFun(_T("log2"), Log2);
-      DefineFun(_T("log10"), Log10);
-      DefineFun(_T("log"), Ln);
-      DefineFun(_T("ln"), Ln);
-      // misc
-      DefineFun(_T("exp"), Exp);
-      DefineFun(_T("sqrt"), Sqrt);
-      DefineFun(_T("sign"), Sign);
-      DefineFun(_T("rint"), Rint);
-      DefineFun(_T("abs"), Abs);
-      // Functions with variable number of arguments
-      DefineFun(_T("sum"), Sum);
-      DefineFun(_T("avg"), Avg);
-      DefineFun(_T("min"), Min);
-      DefineFun(_T("max"), Max);
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Initialize constants.
-  
-    By default the parser recognizes two constants. Pi ("pi") and the Eulerian
-    number ("_e").
-  */
-  void Parser::InitConst()
-  {
-    DefineConst(_T("_pi"), (value_type)PARSER_CONST_PI);
-    DefineConst(_T("_e"), (value_type)PARSER_CONST_E);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Initialize operators. 
-  
-    By default only the unary minus operator is added.
-  */
-  void Parser::InitOprt()
-  {
-    DefineInfixOprt(_T("-"), UnaryMinus);
-    DefineInfixOprt(_T("+"), UnaryPlus);
-  }
-
-  //---------------------------------------------------------------------------
-  void Parser::OnDetectVar(string_type * /*pExpr*/, int & /*nStart*/, int & /*nEnd*/)
-  {
-    // this is just sample code to illustrate modifying variable names on the fly.
-    // I'm not sure anyone really needs such a feature...
-    /*
-
-
-    string sVar(pExpr->begin()+nStart, pExpr->begin()+nEnd);
-    string sRepl = std::string("_") + sVar + "_";
-  
-    int nOrigVarEnd = nEnd;
-    cout << "variable detected!\n";
-    cout << "  Expr: " << *pExpr << "\n";
-    cout << "  Start: " << nStart << "\n";
-    cout << "  End: " << nEnd << "\n";
-    cout << "  Var: \"" << sVar << "\"\n";
-    cout << "  Repl: \"" << sRepl << "\"\n";
-    nEnd = nStart + sRepl.length();
-    cout << "  End: " << nEnd << "\n";
-    pExpr->replace(pExpr->begin()+nStart, pExpr->begin()+nOrigVarEnd, sRepl);
-    cout << "  New expr: " << *pExpr << "\n";
-    */
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Numerically differentiate with regard to a variable. 
-      \param [in] a_Var Pointer to the differentiation variable.
-      \param [in] a_fPos Position at which the differentiation should take place.
-      \param [in] a_fEpsilon Epsilon used for the numerical differentiation.
-
-    Numerical differentiation uses a 5 point operator yielding a 4th order 
-    formula. The default value for epsilon is 0.00074 which is
-    numeric_limits<double>::epsilon() ^ (1/5) as suggested in the muparser
-    forum:
-
-    http://sourceforge.net/forum/forum.php?thread_id=1994611&forum_id=462843
-  */
-  value_type Parser::Diff(value_type *a_Var, 
-                          value_type  a_fPos, 
-                          value_type  a_fEpsilon) const
-  {
-    value_type fRes(0), 
-               fBuf(*a_Var),
-               f[4] = {0,0,0,0},
-               fEpsilon(a_fEpsilon);
-
-    // Backwards compatible calculation of epsilon inc case the user doesn't provide
-    // his own epsilon
-    if (fEpsilon==0)
-      fEpsilon = (a_fPos==0) ? (value_type)1e-10 : (value_type)1e-7 * a_fPos;
-
-    *a_Var = a_fPos+2 * fEpsilon;  f[0] = Eval();
-    *a_Var = a_fPos+1 * fEpsilon;  f[1] = Eval();
-    *a_Var = a_fPos-1 * fEpsilon;  f[2] = Eval();
-    *a_Var = a_fPos-2 * fEpsilon;  f[3] = Eval();
-    *a_Var = fBuf; // restore variable
-
-    fRes = (-f[0] + 8*f[1] - 8*f[2] + f[3]) / (12*fEpsilon);
-    return fRes;
-  }
+	//---------------------------------------------------------------------------
+	/** \brief Default value recognition callback.
+		\param [in] a_szExpr Pointer to the expression
+		\param [in, out] a_iPos Pointer to an index storing the current position within the expression
+		\param [out] a_fVal Pointer where the value should be stored in case one is found.
+		\return 1 if a value was found 0 otherwise.
+	*/
+	int Parser::IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
+	{
+		value_type fVal(0);
+
+		stringstream_type stream(a_szExpr);
+		stream.seekg(0);        // todo:  check if this really is necessary
+		stream.imbue(Parser::s_locale);
+		stream >> fVal;
+		stringstream_type::pos_type iEnd = stream.tellg(); // Position after reading
+
+		if (iEnd == (stringstream_type::pos_type) - 1)
+			return 0;
+
+		*a_iPos += (int)iEnd;
+		*a_fVal = fVal;
+		return 1;
+	}
+
+
+	//---------------------------------------------------------------------------
+	/** \brief Constructor.
+
+	  Call ParserBase class constructor and trigger Function, Operator and Constant initialization.
+	*/
+	Parser::Parser()
+		:ParserBase()
+	{
+		AddValIdent(IsVal);
+
+		InitCharSets();
+		InitFun();
+		InitConst();
+		InitOprt();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Define the character sets.
+		\sa DefineNameChars, DefineOprtChars, DefineInfixOprtChars
+
+	  This function is used for initializing the default character sets that define
+	  the characters to be useable in function and variable names and operators.
+	*/
+	void Parser::InitCharSets()
+	{
+		DefineNameChars(_T("0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"));
+		DefineOprtChars(_T("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-*^/?<>=#!$%&|~'_{}"));
+		DefineInfixOprtChars(_T("/+-*^?<>=#!$%&|~'_"));
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Initialize the default functions. */
+	void Parser::InitFun()
+	{
+		if (mu::TypeInfo<mu::value_type>::IsInteger())
+		{
+			// When setting MUP_BASETYPE to an integer type
+			// Place functions for dealing with integer values here
+			// ...
+			// ...
+			// ...
+		}
+		else
+		{
+			// trigonometric functions
+			DefineFun(_T("sin"), MathImpl<value_type>::Sin);
+			DefineFun(_T("cos"), MathImpl<value_type>::Cos);
+			DefineFun(_T("tan"), MathImpl<value_type>::Tan);
+			// arcus functions
+			DefineFun(_T("asin"), MathImpl<value_type>::ASin);
+			DefineFun(_T("acos"), MathImpl<value_type>::ACos);
+			DefineFun(_T("atan"), MathImpl<value_type>::ATan);
+			DefineFun(_T("atan2"), MathImpl<value_type>::ATan2);
+			// hyperbolic functions
+			DefineFun(_T("sinh"), MathImpl<value_type>::Sinh);
+			DefineFun(_T("cosh"), MathImpl<value_type>::Cosh);
+			DefineFun(_T("tanh"), MathImpl<value_type>::Tanh);
+			// arcus hyperbolic functions
+			DefineFun(_T("asinh"), MathImpl<value_type>::ASinh);
+			DefineFun(_T("acosh"), MathImpl<value_type>::ACosh);
+			DefineFun(_T("atanh"), MathImpl<value_type>::ATanh);
+			// Logarithm functions
+			DefineFun(_T("log2"), MathImpl<value_type>::Log2);
+			DefineFun(_T("log10"), MathImpl<value_type>::Log10);
+			DefineFun(_T("log"), MathImpl<value_type>::Log);
+			DefineFun(_T("ln"), MathImpl<value_type>::Log);
+			// misc
+			DefineFun(_T("exp"), MathImpl<value_type>::Exp);
+			DefineFun(_T("sqrt"), MathImpl<value_type>::Sqrt);
+			DefineFun(_T("sign"), MathImpl<value_type>::Sign);
+			DefineFun(_T("rint"), MathImpl<value_type>::Rint);
+			DefineFun(_T("abs"), MathImpl<value_type>::Abs);
+			// Functions with variable number of arguments
+			DefineFun(_T("sum"), MathImpl<value_type>::Sum);
+			DefineFun(_T("avg"), MathImpl<value_type>::Avg);
+			DefineFun(_T("min"), MathImpl<value_type>::Min);
+			DefineFun(_T("max"), MathImpl<value_type>::Max);
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Initialize constants.
+
+	  By default the parser recognizes two constants. Pi ("pi") and the Eulerian
+	  number ("_e").
+	*/
+	void Parser::InitConst()
+	{
+		DefineConst(_T("_pi"), MathImpl<value_type>::CONST_PI);
+		DefineConst(_T("_e"), MathImpl<value_type>::CONST_E);
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Initialize operators.
+
+	  By default only the unary minus operator is added.
+	*/
+	void Parser::InitOprt()
+	{
+		DefineInfixOprt(_T("-"), MathImpl<value_type>::UnaryMinus);
+		DefineInfixOprt(_T("+"), MathImpl<value_type>::UnaryPlus);
+	}
+
+	//---------------------------------------------------------------------------
+	void Parser::OnDetectVar(string_type* /*pExpr*/, int& /*nStart*/, int& /*nEnd*/)
+	{
+		// this is just sample code to illustrate modifying variable names on the fly.
+		// I'm not sure anyone really needs such a feature...
+		/*
+
+
+		string sVar(pExpr->begin()+nStart, pExpr->begin()+nEnd);
+		string sRepl = std::string("_") + sVar + "_";
+
+		int nOrigVarEnd = nEnd;
+		cout << "variable detected!\n";
+		cout << "  Expr: " << *pExpr << "\n";
+		cout << "  Start: " << nStart << "\n";
+		cout << "  End: " << nEnd << "\n";
+		cout << "  Var: \"" << sVar << "\"\n";
+		cout << "  Repl: \"" << sRepl << "\"\n";
+		nEnd = nStart + sRepl.length();
+		cout << "  End: " << nEnd << "\n";
+		pExpr->replace(pExpr->begin()+nStart, pExpr->begin()+nOrigVarEnd, sRepl);
+		cout << "  New expr: " << *pExpr << "\n";
+		*/
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Numerically differentiate with regard to a variable.
+		\param [in] a_Var Pointer to the differentiation variable.
+		\param [in] a_fPos Position at which the differentiation should take place.
+		\param [in] a_fEpsilon Epsilon used for the numerical differentiation.
+
+		Numerical differentiation uses a 5 point operator yielding a 4th order
+		formula. The default value for epsilon is 0.00074 which is
+		numeric_limits<double>::epsilon() ^ (1/5).
+	*/
+	value_type Parser::Diff(value_type* a_Var, value_type  a_fPos, value_type  a_fEpsilon) const
+	{
+		value_type fRes(0);
+		value_type fBuf(*a_Var);
+		value_type f[4] = { 0,0,0,0 };
+		value_type fEpsilon(a_fEpsilon);
+
+		// Backwards compatible calculation of epsilon inc case the user doesn't provide
+		// his own epsilon
+		if (fEpsilon == 0)
+			fEpsilon = (a_fPos == 0) ? (value_type)1e-10 : (value_type)1e-7 * a_fPos;
+
+		*a_Var = a_fPos + 2 * fEpsilon;  f[0] = Eval();
+		*a_Var = a_fPos + 1 * fEpsilon;  f[1] = Eval();
+		*a_Var = a_fPos - 1 * fEpsilon;  f[2] = Eval();
+		*a_Var = a_fPos - 2 * fEpsilon;  f[3] = Eval();
+		*a_Var = fBuf; // restore variable
+
+		fRes = (-f[0] + 8 * f[1] - 8 * f[2] + f[3]) / (12 * fEpsilon);
+		return fRes;
+	}
 } // namespace mu
diff --git a/src/muParserBase.cpp b/src/muParserBase.cpp
index e331103..a28a7fc 100644
--- a/src/muParserBase.cpp
+++ b/src/muParserBase.cpp
@@ -1,33 +1,35 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2022 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "muParserBase.h"
 #include "muParserTemplateMagic.h"
 
 //--- Standard includes ------------------------------------------------------------------------
-#include <cassert>
 #include <algorithm>
 #include <cmath>
 #include <memory>
@@ -35,1749 +37,1886 @@
 #include <deque>
 #include <sstream>
 #include <locale>
+#include <cassert>
+#include <cctype>
 
 #ifdef MUP_USE_OPENMP
-  #include <omp.h>
+
+#include <omp.h>
+
+#endif
+
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
 #endif
 
 using namespace std;
 
 /** \file
-    \brief This file contains the basic implementation of the muparser engine.
+	\brief This file contains the basic implementation of the muparser engine.
 */
 
 namespace mu
 {
-  std::locale ParserBase::s_locale = std::locale(std::locale::classic(), new change_dec_sep<char_type>('.'));
-
-  bool ParserBase::g_DbgDumpCmdCode = false;
-  bool ParserBase::g_DbgDumpStack = false;
-
-  //------------------------------------------------------------------------------
-  /** \brief Identifiers for built in binary operators. 
-
-      When defining custom binary operators with #AddOprt(...) make sure not to choose 
-      names conflicting with these definitions. 
-  */
-  const char_type* ParserBase::c_DefaultOprt[] = 
-  { 
-    _T("<="), _T(">="),  _T("!="), 
-    _T("=="), _T("<"),   _T(">"), 
-    _T("+"),  _T("-"),   _T("*"), 
-    _T("/"),  _T("^"),   _T("&&"), 
-    _T("||"), _T("="),   _T("("),  
-    _T(")"),   _T("?"),  _T(":"), 0 
-  };
-
-  const int ParserBase::s_MaxNumOpenMPThreads = 16;
-
-  //------------------------------------------------------------------------------
-  /** \brief Constructor.
-      \param a_szFormula the formula to interpret.
-      \throw ParserException if a_szFormula is null.
-  */
-  ParserBase::ParserBase()
-    :m_pParseFormula(&ParserBase::ParseString)
-    ,m_vRPN()
-    ,m_vStringBuf()
-    ,m_pTokenReader()
-    ,m_FunDef()
-    ,m_PostOprtDef()
-    ,m_InfixOprtDef()
-    ,m_OprtDef()
-    ,m_ConstDef()
-    ,m_StrVarDef()
-    ,m_VarDef()
-    ,m_bBuiltInOp(true)
-    ,m_sNameChars()
-    ,m_sOprtChars()
-    ,m_sInfixOprtChars()
-    ,m_nIfElseCounter(0)
-    ,m_vStackBuffer()
-    ,m_nFinalResultIdx(0)
-  {
-    InitTokenReader();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Copy constructor. 
-
-    The parser can be safely copy constructed but the bytecode is reset during
-    copy construction.
-  */
-  ParserBase::ParserBase(const ParserBase &a_Parser)
-    :m_pParseFormula(&ParserBase::ParseString)
-    ,m_vRPN()
-    ,m_vStringBuf()
-    ,m_pTokenReader()
-    ,m_FunDef()
-    ,m_PostOprtDef()
-    ,m_InfixOprtDef()
-    ,m_OprtDef()
-    ,m_ConstDef()
-    ,m_StrVarDef()
-    ,m_VarDef()
-    ,m_bBuiltInOp(true)
-    ,m_sNameChars()
-    ,m_sOprtChars()
-    ,m_sInfixOprtChars()
-    ,m_nIfElseCounter(0)
-  {
-    m_pTokenReader.reset(new token_reader_type(this));
-    Assign(a_Parser);
-  }
-
-  //---------------------------------------------------------------------------
-  ParserBase::~ParserBase()
-  {}
-
-  //---------------------------------------------------------------------------
-  /** \brief Assignment operator. 
-
-    Implemented by calling Assign(a_Parser). Self assignment is suppressed.
-    \param a_Parser Object to copy to this.
-    \return *this
-    \throw nothrow
-  */
-  ParserBase& ParserBase::operator=(const ParserBase &a_Parser)
-  {
-    Assign(a_Parser);
-    return *this;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Copy state of a parser object to this. 
-
-    Clears Variables and Functions of this parser.
-    Copies the states of all internal variables.
-    Resets parse function to string parse mode.
-
-    \param a_Parser the source object.
-  */
-  void ParserBase::Assign(const ParserBase &a_Parser)
-  {
-    if (&a_Parser==this)
-      return;
-
-    // Don't copy bytecode instead cause the parser to create new bytecode
-    // by resetting the parse function.
-    ReInit();
-
-    m_ConstDef        = a_Parser.m_ConstDef;         // Copy user define constants
-    m_VarDef          = a_Parser.m_VarDef;           // Copy user defined variables
-    m_bBuiltInOp      = a_Parser.m_bBuiltInOp;
-    m_vStringBuf      = a_Parser.m_vStringBuf;
-    m_vStackBuffer    = a_Parser.m_vStackBuffer;
-    m_nFinalResultIdx = a_Parser.m_nFinalResultIdx;
-    m_StrVarDef       = a_Parser.m_StrVarDef;
-    m_vStringVarBuf   = a_Parser.m_vStringVarBuf;
-    m_nIfElseCounter  = a_Parser.m_nIfElseCounter;
-    m_pTokenReader.reset(a_Parser.m_pTokenReader->Clone(this));
-
-    // Copy function and operator callbacks
-    m_FunDef = a_Parser.m_FunDef;             // Copy function definitions
-    m_PostOprtDef = a_Parser.m_PostOprtDef;   // post value unary operators
-    m_InfixOprtDef = a_Parser.m_InfixOprtDef; // unary operators for infix notation
-    m_OprtDef = a_Parser.m_OprtDef;           // binary operators
-
-    m_sNameChars = a_Parser.m_sNameChars;
-    m_sOprtChars = a_Parser.m_sOprtChars;
-    m_sInfixOprtChars = a_Parser.m_sInfixOprtChars;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Set the decimal separator.
-      \param cDecSep Decimal separator as a character value.
-      \sa SetThousandsSep
-
-      By default muparser uses the "C" locale. The decimal separator of this
-      locale is overwritten by the one provided here.
-  */
-  void ParserBase::SetDecSep(char_type cDecSep)
-  {
-    char_type cThousandsSep = std::use_facet< change_dec_sep<char_type> >(s_locale).thousands_sep();
-    s_locale = std::locale(std::locale("C"), new change_dec_sep<char_type>(cDecSep, cThousandsSep));
-  }
-  
-  //---------------------------------------------------------------------------
-  /** \brief Sets the thousands operator. 
-      \param cThousandsSep The thousands separator as a character
-      \sa SetDecSep
-
-      By default muparser uses the "C" locale. The thousands separator of this
-      locale is overwritten by the one provided here.
-  */
-  void ParserBase::SetThousandsSep(char_type cThousandsSep)
-  {
-    char_type cDecSep = std::use_facet< change_dec_sep<char_type> >(s_locale).decimal_point();
-    s_locale = std::locale(std::locale("C"), new change_dec_sep<char_type>(cDecSep, cThousandsSep));
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Resets the locale. 
-
-    The default locale used "." as decimal separator, no thousands separator and
-    "," as function argument separator.
-  */
-  void ParserBase::ResetLocale()
-  {
-    s_locale = std::locale(std::locale("C"), new change_dec_sep<char_type>('.'));
-    SetArgSep(',');
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Initialize the token reader. 
-
-    Create new token reader object and submit pointers to function, operator,
-    constant and variable definitions.
-
-    \post m_pTokenReader.get()!=0
-    \throw nothrow
-  */
-  void ParserBase::InitTokenReader()
-  {
-    m_pTokenReader.reset(new token_reader_type(this));
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Reset parser to string parsing mode and clear internal buffers.
-
-      Clear bytecode, reset the token reader.
-      \throw nothrow
-  */
-  void ParserBase::ReInit() const
-  {
-    m_pParseFormula = &ParserBase::ParseString;
-    m_vStringBuf.clear();
-    m_vRPN.clear();
-    m_pTokenReader->ReInit();
-    m_nIfElseCounter = 0;
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserBase::OnDetectVar(string_type * /*pExpr*/, int & /*nStart*/, int & /*nEnd*/)
-  {}
-
-  //---------------------------------------------------------------------------
-  /** \brief Returns the version of muparser. 
-      \param eInfo A flag indicating whether the full version info should be 
-                   returned or not.
-
-    Format is as follows: "MAJOR.MINOR (COMPILER_FLAGS)" The COMPILER_FLAGS
-    are returned only if eInfo==pviFULL.
-  */
-  string_type ParserBase::GetVersion(EParserVersionInfo eInfo) const
-  {
-    stringstream_type ss;
-
-    ss << MUP_VERSION;
-
-    if (eInfo==pviFULL)
-    {
-      ss << _T(" (") << MUP_VERSION_DATE;
-      ss << std::dec << _T("; ") << sizeof(void*)*8 << _T("BIT");
+	std::locale ParserBase::s_locale = std::locale(std::locale::classic(), new change_dec_sep<char_type>('.'));
+
+	bool ParserBase::g_DbgDumpCmdCode = false;
+	bool ParserBase::g_DbgDumpStack = false;
+
+	//------------------------------------------------------------------------------
+	/** \brief Identifiers for built in binary operators.
+
+		When defining custom binary operators with #AddOprt(...) make sure not to choose
+		names conflicting with these definitions.
+	*/
+	const char_type* ParserBase::c_DefaultOprt[] =
+	{
+	  _T("<="), _T(">="),  _T("!="),
+	  _T("=="), _T("<"),   _T(">"),
+	  _T("+"),  _T("-"),   _T("*"),
+	  _T("/"),  _T("^"),   _T("&&"),
+	  _T("||"), _T("="),   _T("("),
+	  _T(")"),   _T("?"),  _T(":"), 0
+	};
+
+	const int ParserBase::s_MaxNumOpenMPThreads = 16;
+
+	//------------------------------------------------------------------------------
+	/** \brief Constructor.
+		\param a_szFormula the formula to interpret.
+		\throw ParserException if a_szFormula is nullptr.
+	*/
+	ParserBase::ParserBase()
+		: m_pParseFormula(&ParserBase::ParseString)
+		, m_vRPN()
+		, m_vStringBuf()
+		, m_pTokenReader()
+		, m_FunDef()
+		, m_PostOprtDef()
+		, m_InfixOprtDef()
+		, m_OprtDef()
+		, m_ConstDef()
+		, m_StrVarDef()
+		, m_VarDef()
+		, m_bBuiltInOp(true)
+		, m_sNameChars()
+		, m_sOprtChars()
+		, m_sInfixOprtChars()
+		, m_vStackBuffer()
+		, m_nFinalResultIdx(0)
+	{
+		InitTokenReader();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Copy constructor.
+
+	  The parser can be safely copy constructed but the bytecode is reset during
+	  copy construction.
+	*/
+	ParserBase::ParserBase(const ParserBase& a_Parser)
+		: m_pParseFormula(&ParserBase::ParseString)
+		, m_vRPN()
+		, m_vStringBuf()
+		, m_pTokenReader()
+		, m_FunDef()
+		, m_PostOprtDef()
+		, m_InfixOprtDef()
+		, m_OprtDef()
+		, m_ConstDef()
+		, m_StrVarDef()
+		, m_VarDef()
+		, m_bBuiltInOp(true)
+		, m_sNameChars()
+		, m_sOprtChars()
+		, m_sInfixOprtChars()
+	{
+		m_pTokenReader.reset(new token_reader_type(this));
+		Assign(a_Parser);
+	}
+
+	//---------------------------------------------------------------------------
+	ParserBase::~ParserBase()
+	{}
+
+	//---------------------------------------------------------------------------
+	/** \brief Assignment operator.
+
+	  Implemented by calling Assign(a_Parser). Self assignment is suppressed.
+	  \param a_Parser Object to copy to this.
+	  \return *this
+	  \throw nothrow
+	*/
+	ParserBase& ParserBase::operator=(const ParserBase& a_Parser)
+	{
+		Assign(a_Parser);
+		return *this;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Copy state of a parser object to this.
+
+	  Clears Variables and Functions of this parser.
+	  Copies the states of all internal variables.
+	  Resets parse function to string parse mode.
+
+	  \param a_Parser the source object.
+	*/
+	void ParserBase::Assign(const ParserBase& a_Parser)
+	{
+		if (&a_Parser == this)
+			return;
+
+		// Don't copy bytecode instead cause the parser to create new bytecode
+		// by resetting the parse function.
+		ReInit();
+
+		m_ConstDef = a_Parser.m_ConstDef;         // Copy user define constants
+		m_VarDef = a_Parser.m_VarDef;           // Copy user defined variables
+		m_bBuiltInOp = a_Parser.m_bBuiltInOp;
+		m_vStringBuf = a_Parser.m_vStringBuf;
+		m_vStackBuffer = a_Parser.m_vStackBuffer;
+		m_nFinalResultIdx = a_Parser.m_nFinalResultIdx;
+		m_StrVarDef = a_Parser.m_StrVarDef;
+		m_vStringVarBuf = a_Parser.m_vStringVarBuf;
+		m_pTokenReader.reset(a_Parser.m_pTokenReader->Clone(this));
+
+		// Copy function and operator callbacks
+		m_FunDef = a_Parser.m_FunDef;             // Copy function definitions
+		m_PostOprtDef = a_Parser.m_PostOprtDef;   // post value unary operators
+		m_InfixOprtDef = a_Parser.m_InfixOprtDef; // unary operators for infix notation
+		m_OprtDef = a_Parser.m_OprtDef;           // binary operators
+
+		m_sNameChars = a_Parser.m_sNameChars;
+		m_sOprtChars = a_Parser.m_sOprtChars;
+		m_sInfixOprtChars = a_Parser.m_sInfixOprtChars;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Set the decimal separator.
+		\param cDecSep Decimal separator as a character value.
+		\sa SetThousandsSep
+
+		By default muparser uses the "C" locale. The decimal separator of this
+		locale is overwritten by the one provided here.
+	*/
+	void ParserBase::SetDecSep(char_type cDecSep)
+	{
+		char_type cThousandsSep = std::use_facet< change_dec_sep<char_type> >(s_locale).thousands_sep();
+		s_locale = std::locale(std::locale("C"), new change_dec_sep<char_type>(cDecSep, cThousandsSep));
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Sets the thousands operator.
+		\param cThousandsSep The thousands separator as a character
+		\sa SetDecSep
+
+		By default muparser uses the "C" locale. The thousands separator of this
+		locale is overwritten by the one provided here.
+	*/
+	void ParserBase::SetThousandsSep(char_type cThousandsSep)
+	{
+		char_type cDecSep = std::use_facet< change_dec_sep<char_type> >(s_locale).decimal_point();
+		s_locale = std::locale(std::locale("C"), new change_dec_sep<char_type>(cDecSep, cThousandsSep));
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Resets the locale.
+
+	  The default locale used "." as decimal separator, no thousands separator and
+	  "," as function argument separator.
+	*/
+	void ParserBase::ResetLocale()
+	{
+		s_locale = std::locale(std::locale("C"), new change_dec_sep<char_type>('.'));
+		SetArgSep(',');
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Initialize the token reader.
+
+	  Create new token reader object and submit pointers to function, operator,
+	  constant and variable definitions.
+
+	  \post m_pTokenReader.get()!=0
+	  \throw nothrow
+	*/
+	void ParserBase::InitTokenReader()
+	{
+		m_pTokenReader.reset(new token_reader_type(this));
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Reset parser to string parsing mode and clear internal buffers.
+
+		Clear bytecode, reset the token reader.
+		\throw nothrow
+	*/
+	void ParserBase::ReInit() const
+	{
+		m_pParseFormula = &ParserBase::ParseString;
+		m_vStringBuf.clear();
+		m_vRPN.clear();
+		m_pTokenReader->ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	void ParserBase::OnDetectVar(string_type* /*pExpr*/, int& /*nStart*/, int& /*nEnd*/)
+	{}
+
+	//---------------------------------------------------------------------------
+	/** \brief Returns the bytecode of the current expression.
+	*/
+	const ParserByteCode& ParserBase::GetByteCode() const
+	{
+		return m_vRPN;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Returns the version of muparser.
+		\param eInfo A flag indicating whether the full version info should be
+					 returned or not.
+
+	  Format is as follows: "MAJOR.MINOR (COMPILER_FLAGS)" The COMPILER_FLAGS
+	  are returned only if eInfo==pviFULL.
+	*/
+	string_type ParserBase::GetVersion(EParserVersionInfo eInfo) const
+	{
+		stringstream_type ss;
+
+		ss << ParserVersion;
+
+		if (eInfo == pviFULL)
+		{
+			ss << _T(" (") << ParserVersionDate;
+			ss << std::dec << _T("; ") << sizeof(void*) * 8 << _T("BIT");
 
 #ifdef _DEBUG
-      ss << _T("; DEBUG");
+			ss << _T("; DEBUG");
 #else 
-      ss << _T("; RELEASE");
+			ss << _T("; RELEASE");
 #endif
 
 #ifdef _UNICODE
-      ss << _T("; UNICODE");
+			ss << _T("; UNICODE");
+#else
+#ifdef _MBCS
+			ss << _T("; MBCS");
 #else
-  #ifdef _MBCS
-      ss << _T("; MBCS");
-  #else
-      ss << _T("; ASCII");
-  #endif
+			ss << _T("; ASCII");
+#endif
 #endif
 
 #ifdef MUP_USE_OPENMP
-      ss << _T("; OPENMP");
-//#else
-//      ss << _T("; NO_OPENMP");
+			ss << _T("; OPENMP");
 #endif
 
-#if defined(MUP_MATH_EXCEPTIONS)
-      ss << _T("; MATHEXC");
-//#else
-//      ss << _T("; NO_MATHEXC");
+			ss << _T(")");
+		}
+
+		return ss.str();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Add a value parsing function.
+
+		When parsing an expression muParser tries to detect values in the expression
+		string using different valident callbacks. Thus it's possible to parse
+		for hex values, binary values and floating point values.
+	*/
+	void ParserBase::AddValIdent(identfun_type a_pCallback)
+	{
+		m_pTokenReader->AddValIdent(a_pCallback);
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Set a function that can create variable pointer for unknown expression variables.
+		\param a_pFactory A pointer to the variable factory.
+		\param pUserData A user defined context pointer.
+	*/
+	void ParserBase::SetVarFactory(facfun_type a_pFactory, void* pUserData)
+	{
+		m_pTokenReader->SetVarCreator(a_pFactory, pUserData);
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Add a function or operator callback to the parser. */
+	void ParserBase::AddCallback(
+		const string_type& a_strName,
+		const ParserCallback& a_Callback,
+		funmap_type& a_Storage,
+		const char_type* a_szCharSet)
+	{
+		if (!a_Callback.IsValid())
+			Error(ecINVALID_FUN_PTR);
+
+		const funmap_type* pFunMap = &a_Storage;
+
+		// Check for conflicting operator or function names
+		if (pFunMap != &m_FunDef && m_FunDef.find(a_strName) != m_FunDef.end())
+			Error(ecNAME_CONFLICT, -1, a_strName);
+
+		if (pFunMap != &m_PostOprtDef && m_PostOprtDef.find(a_strName) != m_PostOprtDef.end())
+			Error(ecNAME_CONFLICT, -1, a_strName);
+
+		if (pFunMap != &m_InfixOprtDef && pFunMap != &m_OprtDef && m_InfixOprtDef.find(a_strName) != m_InfixOprtDef.end())
+			Error(ecNAME_CONFLICT, -1, a_strName);
+
+		if (pFunMap != &m_InfixOprtDef && pFunMap != &m_OprtDef && m_OprtDef.find(a_strName) != m_OprtDef.end())
+			Error(ecNAME_CONFLICT, -1, a_strName);
+
+		CheckOprt(a_strName, a_Callback, a_szCharSet);
+		a_Storage[a_strName] = a_Callback;
+		ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Check if a name contains invalid characters.
+
+		\throw ParserException if the name contains invalid characters.
+	*/
+	void ParserBase::CheckOprt(const string_type& a_sName,
+		const ParserCallback& a_Callback,
+		const string_type& a_szCharSet) const
+	{
+		if (!a_sName.length() ||
+			(a_sName.find_first_not_of(a_szCharSet) != string_type::npos) ||
+			(a_sName[0] >= '0' && a_sName[0] <= '9'))
+		{
+			switch (a_Callback.GetCode())
+			{
+			case cmOPRT_POSTFIX: Error(ecINVALID_POSTFIX_IDENT, -1, a_sName); break;
+			case cmOPRT_INFIX:   Error(ecINVALID_INFIX_IDENT, -1, a_sName); break;
+			default:             Error(ecINVALID_NAME, -1, a_sName);
+			}
+		}
+	}
+
+
+	/** \brief Check if a name contains invalid characters.
+		\throw ParserException if the name contains invalid characters.
+	*/
+	void ParserBase::CheckName(const string_type& a_sName, const string_type& a_szCharSet) const
+	{
+		if (!a_sName.length() ||
+			(a_sName.find_first_not_of(a_szCharSet) != string_type::npos) ||
+			(a_sName[0] >= '0' && a_sName[0] <= '9'))
+		{
+			Error(ecINVALID_NAME);
+		}
+	}
+
+	/** \brief Set the formula.
+		\param a_strFormula Formula as string_type
+		\throw ParserException in case of syntax errors.
+
+		Triggers first time calculation thus the creation of the bytecode and
+		scanning of used variables.
+	*/
+	void ParserBase::SetExpr(const string_type& a_sExpr)
+	{
+		// Check locale compatibility
+		if (m_pTokenReader->GetArgSep() == std::use_facet<numpunct<char_type> >(s_locale).decimal_point())
+			Error(ecLOCALE);
+
+		// Check maximum allowed expression length. An arbitrary value small enough so i can debug expressions sent to me
+		if (a_sExpr.length() >= MaxLenExpression)
+			Error(ecEXPRESSION_TOO_LONG, 0, a_sExpr);
+
+		m_pTokenReader->SetFormula(a_sExpr + _T(" "));
+		ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Get the default symbols used for the built in operators.
+		\sa c_DefaultOprt
+	*/
+	const char_type** ParserBase::GetOprtDef() const
+	{
+		return (const char_type**)(&c_DefaultOprt[0]);
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Define the set of valid characters to be used in names of
+			   functions, variables, constants.
+	*/
+	void ParserBase::DefineNameChars(const char_type* a_szCharset)
+	{
+		m_sNameChars = a_szCharset;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Define the set of valid characters to be used in names of
+			   binary operators and postfix operators.
+	*/
+	void ParserBase::DefineOprtChars(const char_type* a_szCharset)
+	{
+		m_sOprtChars = a_szCharset;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Define the set of valid characters to be used in names of
+			   infix operators.
+	*/
+	void ParserBase::DefineInfixOprtChars(const char_type* a_szCharset)
+	{
+		m_sInfixOprtChars = a_szCharset;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Virtual function that defines the characters allowed in name identifiers.
+		\sa #ValidOprtChars, #ValidPrefixOprtChars
+	*/
+	const char_type* ParserBase::ValidNameChars() const
+	{
+		MUP_ASSERT(m_sNameChars.size());
+		return m_sNameChars.c_str();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Virtual function that defines the characters allowed in operator definitions.
+		\sa #ValidNameChars, #ValidPrefixOprtChars
+	*/
+	const char_type* ParserBase::ValidOprtChars() const
+	{
+		MUP_ASSERT(m_sOprtChars.size());
+		return m_sOprtChars.c_str();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Virtual function that defines the characters allowed in infix operator definitions.
+		\sa #ValidNameChars, #ValidOprtChars
+	*/
+	const char_type* ParserBase::ValidInfixOprtChars() const
+	{
+		MUP_ASSERT(m_sInfixOprtChars.size());
+		return m_sInfixOprtChars.c_str();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Add a user defined operator.
+		\post Will reset the Parser to string parsing mode.
+	*/
+	void ParserBase::DefinePostfixOprt(const string_type& a_sName, fun_type1 a_pFun, bool a_bAllowOpt)
+	{
+		if (a_sName.length() > MaxLenIdentifier)
+			Error(ecIDENTIFIER_TOO_LONG);
+
+		AddCallback(a_sName, ParserCallback(a_pFun, a_bAllowOpt, prPOSTFIX, cmOPRT_POSTFIX), m_PostOprtDef, ValidOprtChars());
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Initialize user defined functions.
+
+	  Calls the virtual functions InitFun(), InitConst() and InitOprt().
+	*/
+	void ParserBase::Init()
+	{
+		InitCharSets();
+		InitFun();
+		InitConst();
+		InitOprt();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Add a user defined operator.
+		\post Will reset the Parser to string parsing mode.
+		\param [in] a_sName  operator Identifier
+		\param [in] a_pFun  Operator callback function
+		\param [in] a_iPrec  Operator Precedence (default=prSIGN)
+		\param [in] a_bAllowOpt  True if operator is volatile (default=false)
+		\sa EPrec
+	*/
+	void ParserBase::DefineInfixOprt(const string_type& a_sName, fun_type1 a_pFun, int a_iPrec, bool a_bAllowOpt)
+	{
+		if (a_sName.length() > MaxLenIdentifier)
+			Error(ecIDENTIFIER_TOO_LONG);
+
+		AddCallback(a_sName, ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, cmOPRT_INFIX), m_InfixOprtDef, ValidInfixOprtChars());
+	}
+
+
+	//---------------------------------------------------------------------------
+	/** \brief Define a binary operator.
+		\param [in] a_sName The identifier of the operator.
+		\param [in] a_pFun Pointer to the callback function.
+		\param [in] a_iPrec Precedence of the operator.
+		\param [in] a_eAssociativity The associativity of the operator.
+		\param [in] a_bAllowOpt If this is true the operator may be optimized away.
+
+		Adds a new Binary operator the the parser instance.
+	*/
+	void ParserBase::DefineOprt(const string_type& a_sName, fun_type2 a_pFun, unsigned a_iPrec, EOprtAssociativity a_eAssociativity, bool a_bAllowOpt)
+	{
+		if (a_sName.length() > MaxLenIdentifier)
+			Error(ecIDENTIFIER_TOO_LONG);
+
+		// Check for conflicts with built in operator names
+		for (int i = 0; m_bBuiltInOp && i < cmENDIF; ++i)
+		{
+			if (a_sName == string_type(c_DefaultOprt[i]))
+			{
+				Error(ecBUILTIN_OVERLOAD, -1, a_sName);
+			}
+		}
+
+		AddCallback(a_sName, ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, a_eAssociativity), m_OprtDef, ValidOprtChars());
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Define a new string constant.
+		\param [in] a_strName The name of the constant.
+		\param [in] a_strVal the value of the constant.
+	*/
+	void ParserBase::DefineStrConst(const string_type& a_strName, const string_type& a_strVal)
+	{
+		// Test if a constant with that names already exists
+		if (m_StrVarDef.find(a_strName) != m_StrVarDef.end())
+			Error(ecNAME_CONFLICT);
+
+		CheckName(a_strName, ValidNameChars());
+
+		m_vStringVarBuf.push_back(a_strVal);                // Store variable string in internal buffer
+		m_StrVarDef[a_strName] = m_vStringVarBuf.size() - 1;  // bind buffer index to variable name
+
+		ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Add a user defined variable.
+		\param [in] a_sName the variable name
+		\param [in] a_pVar A pointer to the variable value.
+		\post Will reset the Parser to string parsing mode.
+		\throw ParserException in case the name contains invalid signs or a_pVar is nullptr.
+	*/
+	void ParserBase::DefineVar(const string_type& a_sName, value_type* a_pVar)
+	{
+		if (a_pVar == 0)
+			Error(ecINVALID_VAR_PTR);
+
+		if (a_sName.length() > MaxLenIdentifier)
+			Error(ecIDENTIFIER_TOO_LONG);
+
+		// Test if a constant with that names already exists
+		if (m_ConstDef.find(a_sName) != m_ConstDef.end())
+			Error(ecNAME_CONFLICT);
+
+		CheckName(a_sName, ValidNameChars());
+		m_VarDef[a_sName] = a_pVar;
+		ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Add a user defined constant.
+		\param [in] a_sName The name of the constant.
+		\param [in] a_fVal the value of the constant.
+		\post Will reset the Parser to string parsing mode.
+		\throw ParserException in case the name contains invalid signs.
+	*/
+	void ParserBase::DefineConst(const string_type& a_sName, value_type a_fVal)
+	{
+		if (a_sName.length() > MaxLenIdentifier)
+			Error(ecIDENTIFIER_TOO_LONG);
+
+		CheckName(a_sName, ValidNameChars());
+		m_ConstDef[a_sName] = a_fVal;
+		ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Get operator priority.
+		\throw ParserException if a_Oprt is no operator code
+	*/
+	int ParserBase::GetOprtPrecedence(const token_type& a_Tok) const
+	{
+		switch (a_Tok.GetCode())
+		{
+			// built in operators
+		case cmEND:      return -5;
+		case cmARG_SEP:  return -4;
+		case cmASSIGN:   return -1;
+		case cmELSE:
+		case cmIF:       return  0;
+		case cmLAND:     return  prLAND;
+		case cmLOR:      return  prLOR;
+		case cmLT:
+		case cmGT:
+		case cmLE:
+		case cmGE:
+		case cmNEQ:
+		case cmEQ:       return  prCMP;
+		case cmADD:
+		case cmSUB:      return  prADD_SUB;
+		case cmMUL:
+		case cmDIV:      return  prMUL_DIV;
+		case cmPOW:      return  prPOW;
+
+		// user defined binary operators
+		case cmOPRT_INFIX:
+		case cmOPRT_BIN: return a_Tok.GetPri();
+		default:  
+			throw exception_type(ecINTERNAL_ERROR, 5, _T(""));
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Get operator priority.
+		\throw ParserException if a_Oprt is no operator code
+	*/
+	EOprtAssociativity ParserBase::GetOprtAssociativity(const token_type& a_Tok) const
+	{
+		switch (a_Tok.GetCode())
+		{
+		case cmASSIGN:
+		case cmLAND:
+		case cmLOR:
+		case cmLT:
+		case cmGT:
+		case cmLE:
+		case cmGE:
+		case cmNEQ:
+		case cmEQ:
+		case cmADD:
+		case cmSUB:
+		case cmMUL:
+		case cmDIV:      return oaLEFT;
+		case cmPOW:      return oaRIGHT;
+		case cmOPRT_BIN: return a_Tok.GetAssociativity();
+		default:         return oaNONE;
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Return a map containing the used variables only. */
+	const varmap_type& ParserBase::GetUsedVar() const
+	{
+		try
+		{
+			m_pTokenReader->IgnoreUndefVar(true);
+			CreateRPN(); // try to create bytecode, but don't use it for any further calculations since it
+						 // may contain references to nonexisting variables.
+			m_pParseFormula = &ParserBase::ParseString;
+			m_pTokenReader->IgnoreUndefVar(false);
+		}
+		catch (exception_type& /*e*/)
+		{
+			// Make sure to stay in string parse mode, don't call ReInit()
+			// because it deletes the array with the used variables
+			m_pParseFormula = &ParserBase::ParseString;
+			m_pTokenReader->IgnoreUndefVar(false);
+			throw;
+		}
+
+		return m_pTokenReader->GetUsedVar();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Return a map containing the used variables only. */
+	const varmap_type& ParserBase::GetVar() const
+	{
+		return m_VarDef;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Return a map containing all parser constants. */
+	const valmap_type& ParserBase::GetConst() const
+	{
+		return m_ConstDef;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Return prototypes of all parser functions.
+		\return #m_FunDef
+		\sa FunProt
+		\throw nothrow
+
+		The return type is a map of the public type #funmap_type containing the prototype
+		definitions for all numerical parser functions. String functions are not part of
+		this map. The Prototype definition is encapsulated in objects of the class FunProt
+		one per parser function each associated with function names via a map construct.
+	*/
+	const funmap_type& ParserBase::GetFunDef() const
+	{
+		return m_FunDef;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Retrieve the formula. */
+	const string_type& ParserBase::GetExpr() const
+	{
+		return m_pTokenReader->GetExpr();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Execute a function that takes a single string argument.
+		\param a_FunTok Function token.
+		\throw exception_type If the function token is not a string function
+	*/
+	ParserBase::token_type ParserBase::ApplyStrFunc(
+		const token_type& a_FunTok,
+		const std::vector<token_type>& a_vArg) const
+	{
+		if (a_vArg.back().GetCode() != cmSTRING)
+			Error(ecSTRING_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());
+
+		token_type  valTok;
+		generic_callable_type pFunc = a_FunTok.GetFuncAddr();
+		MUP_ASSERT(pFunc);
+
+		try
+		{
+			// Check function arguments; write dummy value into valtok to represent the result
+			switch (a_FunTok.GetArgCount())
+			{
+			case 0: valTok.SetVal(1); a_vArg[0].GetAsString();  break;
+			case 1: valTok.SetVal(1); a_vArg[1].GetAsString();  a_vArg[0].GetVal();  break;
+			case 2: valTok.SetVal(1); a_vArg[2].GetAsString();  a_vArg[1].GetVal();  a_vArg[0].GetVal();  break;
+			case 3: valTok.SetVal(1); a_vArg[3].GetAsString();  a_vArg[2].GetVal();  a_vArg[1].GetVal();  a_vArg[0].GetVal();  break;
+			case 4: valTok.SetVal(1); a_vArg[4].GetAsString();  a_vArg[3].GetVal();  a_vArg[2].GetVal();  a_vArg[1].GetVal();  a_vArg[0].GetVal();  break;
+			case 5: valTok.SetVal(1); a_vArg[5].GetAsString();  a_vArg[4].GetVal();  a_vArg[3].GetVal();  a_vArg[2].GetVal();  a_vArg[1].GetVal(); a_vArg[0].GetVal(); break;
+			default: Error(ecINTERNAL_ERROR);
+			}
+		}
+		catch (ParserError&)
+		{
+			Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());
+		}
+
+		// string functions won't be optimized
+		m_vRPN.AddStrFun(pFunc, a_FunTok.GetArgCount(), a_vArg.back().GetIdx());
+
+		// Push dummy value representing the function result to the stack
+		return valTok;
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Apply a function token.
+		\param iArgCount Number of Arguments actually gathered used only for multiarg functions.
+		\post The result is pushed to the value stack
+		\post The function token is removed from the stack
+		\throw exception_type if Argument count does not match function requirements.
+	*/
+	void ParserBase::ApplyFunc(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal, int a_iArgCount) const
+	{
+		MUP_ASSERT(m_pTokenReader.get());
+
+		// Operator stack empty or does not contain tokens with callback functions
+		if (a_stOpt.empty() || a_stOpt.top().GetFuncAddr() == 0)
+			return;
+
+		token_type funTok = a_stOpt.top();
+		a_stOpt.pop();
+		MUP_ASSERT(funTok.GetFuncAddr() != nullptr);
+
+		// Binary operators must rely on their internal operator number
+		// since counting of operators relies on commas for function arguments
+		// binary operators do not have commas in their expression
+		int iArgCount = (funTok.GetCode() == cmOPRT_BIN) ? funTok.GetArgCount() : a_iArgCount;
+
+		// determine how many parameters the function needs. To remember iArgCount includes the 
+		// string parameter whilst GetArgCount() counts only numeric parameters.
+		int iArgRequired = funTok.GetArgCount() + ((funTok.GetType() == tpSTR) ? 1 : 0);
+
+		// That's the number of numerical parameters
+		int iArgNumerical = iArgCount - ((funTok.GetType() == tpSTR) ? 1 : 0);
+
+		if (funTok.GetCode() == cmFUNC_STR && iArgCount - iArgNumerical > 1)
+			Error(ecINTERNAL_ERROR);
+
+		if (funTok.GetArgCount() >= 0 && iArgCount > iArgRequired)
+			Error(ecTOO_MANY_PARAMS, m_pTokenReader->GetPos() - 1, funTok.GetAsString());
+
+		if (funTok.GetCode() != cmOPRT_BIN && iArgCount < iArgRequired)
+			Error(ecTOO_FEW_PARAMS, m_pTokenReader->GetPos() - 1, funTok.GetAsString());
+
+		if (funTok.GetCode() == cmFUNC_STR && iArgCount > iArgRequired)
+			Error(ecTOO_MANY_PARAMS, m_pTokenReader->GetPos() - 1, funTok.GetAsString());
+
+		// Collect the numeric function arguments from the value stack and store them
+		// in a vector
+		std::vector<token_type> stArg;
+		for (int i = 0; i < iArgNumerical; ++i)
+		{
+			if (a_stVal.empty())
+				Error(ecINTERNAL_ERROR, m_pTokenReader->GetPos(), funTok.GetAsString());
+
+			stArg.push_back(a_stVal.top());
+			a_stVal.pop();
+
+			if (stArg.back().GetType() == tpSTR && funTok.GetType() != tpSTR)
+				Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), funTok.GetAsString());
+		}
+
+		switch (funTok.GetCode())
+		{
+		case  cmFUNC_STR:
+			if (a_stVal.empty())
+				Error(ecINTERNAL_ERROR, m_pTokenReader->GetPos(), funTok.GetAsString());
+
+			stArg.push_back(a_stVal.top());
+			a_stVal.pop();
+
+			if (stArg.back().GetType() == tpSTR && funTok.GetType() != tpSTR)
+				Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), funTok.GetAsString());
+
+			ApplyStrFunc(funTok, stArg);
+			break;
+
+		case  cmFUNC_BULK:
+			m_vRPN.AddBulkFun(funTok.GetFuncAddr(), (int)stArg.size());
+			break;
+
+		case  cmOPRT_BIN:
+		case  cmOPRT_POSTFIX:
+		case  cmOPRT_INFIX:
+		case  cmFUNC:
+			if (funTok.GetArgCount() == -1 && iArgCount == 0)
+				Error(ecTOO_FEW_PARAMS, m_pTokenReader->GetPos(), funTok.GetAsString());
+
+			m_vRPN.AddFun(funTok.GetFuncAddr(), (funTok.GetArgCount() == -1) ? -iArgNumerical : iArgNumerical, funTok.IsOptimizable());
+			break;
+		default:
+			break;
+		}
+
+		// Push dummy value representing the function result to the stack
+		token_type token;
+		token.SetVal(1);
+		a_stVal.push(token);
+	}
+
+	//---------------------------------------------------------------------------
+	void ParserBase::ApplyIfElse(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const
+	{
+		// Check if there is an if Else clause to be calculated
+		while (a_stOpt.size() && a_stOpt.top().GetCode() == cmELSE)
+		{
+			MUP_ASSERT(!a_stOpt.empty())
+			token_type opElse = a_stOpt.top();
+			a_stOpt.pop();
+
+			// Take the value associated with the else branch from the value stack
+			MUP_ASSERT(!a_stVal.empty());
+			token_type vVal2 = a_stVal.top();
+			if (vVal2.GetType() != tpDBL)
+				Error(ecUNEXPECTED_STR, m_pTokenReader->GetPos());
+			
+			a_stVal.pop();
+
+			// it then else is a ternary operator Pop all three values from the value s
+			// tack and just return the right value
+			MUP_ASSERT(!a_stVal.empty());
+			token_type vVal1 = a_stVal.top();
+			if (vVal1.GetType() != tpDBL)
+				Error(ecUNEXPECTED_STR, m_pTokenReader->GetPos());
+
+			a_stVal.pop();
+
+			MUP_ASSERT(!a_stVal.empty());
+			token_type vExpr = a_stVal.top();
+			a_stVal.pop();
+
+			a_stVal.push((vExpr.GetVal() != 0) ? vVal1 : vVal2);
+
+			token_type opIf = a_stOpt.top();
+			a_stOpt.pop();
+
+			MUP_ASSERT(opElse.GetCode() == cmELSE);
+
+			if (opIf.GetCode() != cmIF)
+				Error(ecMISPLACED_COLON, m_pTokenReader->GetPos());
+
+			m_vRPN.AddIfElse(cmENDIF);
+		} // while pending if-else-clause found
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Performs the necessary steps to write code for
+			   the execution of binary operators into the bytecode.
+	*/
+	void ParserBase::ApplyBinOprt(std::stack<token_type>& a_stOpt, std::stack<token_type>& a_stVal) const
+	{
+		// is it a user defined binary operator?
+		if (a_stOpt.top().GetCode() == cmOPRT_BIN)
+		{
+			ApplyFunc(a_stOpt, a_stVal, 2);
+		}
+		else
+		{
+			if (a_stVal.size() < 2)
+				Error(ecINTERNAL_ERROR, m_pTokenReader->GetPos(), _T("ApplyBinOprt: not enough values in value stack!"));
+
+			token_type valTok1 = a_stVal.top();
+			a_stVal.pop();
+
+			token_type valTok2 = a_stVal.top();
+			a_stVal.pop();
+
+			token_type optTok = a_stOpt.top();
+			a_stOpt.pop();
+
+			token_type resTok;
+
+			if (valTok1.GetType() != valTok2.GetType() ||
+				(valTok1.GetType() == tpSTR && valTok2.GetType() == tpSTR))
+				Error(ecOPRT_TYPE_CONFLICT, m_pTokenReader->GetPos(), optTok.GetAsString());
+
+			if (optTok.GetCode() == cmASSIGN)
+			{
+				if (valTok2.GetCode() != cmVAR)
+					Error(ecUNEXPECTED_OPERATOR, -1, _T("="));
+
+				m_vRPN.AddAssignOp(valTok2.GetVar());
+			}
+			else
+				m_vRPN.AddOp(optTok.GetCode());
+
+			resTok.SetVal(1);
+			a_stVal.push(resTok);
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Apply a binary operator.
+		\param a_stOpt The operator stack
+		\param a_stVal The value stack
+	*/
+	void ParserBase::ApplyRemainingOprt(std::stack<token_type>& stOpt, std::stack<token_type>& stVal) const
+	{
+		while (stOpt.size() &&
+			stOpt.top().GetCode() != cmBO &&
+			stOpt.top().GetCode() != cmIF)
+		{
+			token_type tok = stOpt.top();
+			switch (tok.GetCode())
+			{
+			case cmOPRT_INFIX:
+			case cmOPRT_BIN:
+			case cmLE:
+			case cmGE:
+			case cmNEQ:
+			case cmEQ:
+			case cmLT:
+			case cmGT:
+			case cmADD:
+			case cmSUB:
+			case cmMUL:
+			case cmDIV:
+			case cmPOW:
+			case cmLAND:
+			case cmLOR:
+			case cmASSIGN:
+				if (stOpt.top().GetCode() == cmOPRT_INFIX)
+					ApplyFunc(stOpt, stVal, 1);
+				else
+					ApplyBinOprt(stOpt, stVal);
+				break;
+
+			case cmELSE:
+				ApplyIfElse(stOpt, stVal);
+				break;
+
+			default:
+				Error(ecINTERNAL_ERROR);
+			}
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Parse the command code.
+		\sa ParseString(...)
+
+		Command code contains precalculated stack positions of the values and the
+		associated operators. The Stack is filled beginning from index one the
+		value at index zero is not used at all.
+	*/
+	value_type ParserBase::ParseCmdCode() const
+	{
+		return ParseCmdCodeBulk(0, 0);
+	}
+
+	value_type ParserBase::ParseCmdCodeShort() const
+	{
+		const SToken *const tok = m_vRPN.GetBase();
+		value_type buf;
+
+		switch (tok->Cmd)
+		{
+		case cmVAL:		
+			return tok->Val.data2;
+
+		case cmVAR:		
+			return *tok->Val.ptr;
+
+		case cmVARMUL:	
+			return *tok->Val.ptr * tok->Val.data + tok->Val.data2;
+
+		case cmVARPOW2: 
+			buf = *(tok->Val.ptr);
+			return buf * buf;
+
+		case  cmVARPOW3: 				
+			buf = *(tok->Val.ptr);
+			return buf * buf * buf;
+
+		case  cmVARPOW4: 				
+			buf = *(tok->Val.ptr);
+			return buf * buf * buf * buf;
+
+		// numerical function without any argument
+		case cmFUNC:
+			return tok->Fun.cb.call_fun<0>();
+
+		// String function without a numerical argument
+		case cmFUNC_STR:
+			return tok->Fun.cb.call_strfun<1>(m_vStringBuf[0].c_str());
+
+		default:
+			throw ParserError(ecINTERNAL_ERROR);
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Evaluate the RPN.
+		\param nOffset The offset added to variable addresses (for bulk mode)
+		\param nThreadID OpenMP Thread id of the calling thread
+	*/
+	value_type ParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const
+	{
+		assert(nThreadID <= s_MaxNumOpenMPThreads);
+
+		// Note: The check for nOffset==0 and nThreadID here is not necessary but 
+		//       brings a minor performance gain when not in bulk mode.
+		value_type *stack = ((nOffset == 0) && (nThreadID == 0)) ? &m_vStackBuffer[0] : &m_vStackBuffer[nThreadID * (m_vStackBuffer.size() / s_MaxNumOpenMPThreads)];
+		value_type buf;
+		int sidx(0);
+		for (const SToken* pTok = m_vRPN.GetBase(); pTok->Cmd != cmEND; ++pTok)
+		{
+			switch (pTok->Cmd)
+			{
+			// built in binary operators
+			case  cmLE:   --sidx; stack[sidx] = stack[sidx] <= stack[sidx + 1]; continue;
+			case  cmGE:   --sidx; stack[sidx] = stack[sidx] >= stack[sidx + 1]; continue;
+			case  cmNEQ:  --sidx; stack[sidx] = stack[sidx] != stack[sidx + 1]; continue;
+			case  cmEQ:   --sidx; stack[sidx] = stack[sidx] == stack[sidx + 1]; continue;
+			case  cmLT:   --sidx; stack[sidx] = stack[sidx] < stack[sidx + 1];  continue;
+			case  cmGT:   --sidx; stack[sidx] = stack[sidx] > stack[sidx + 1];  continue;
+			case  cmADD:  --sidx; stack[sidx] += stack[1 + sidx]; continue;
+			case  cmSUB:  --sidx; stack[sidx] -= stack[1 + sidx]; continue;
+			case  cmMUL:  --sidx; stack[sidx] *= stack[1 + sidx]; continue;
+			case  cmDIV:  --sidx;
+				stack[sidx] /= stack[1 + sidx];
+				continue;
+
+			case  cmPOW:
+				--sidx; stack[sidx] = MathImpl<value_type>::Pow(stack[sidx], stack[1 + sidx]);
+				continue;
+
+			case  cmLAND: --sidx; stack[sidx] = stack[sidx] && stack[sidx + 1]; continue;
+			case  cmLOR:  --sidx; stack[sidx] = stack[sidx] || stack[sidx + 1]; continue;
+
+			case  cmASSIGN:
+				// Bugfix for Bulkmode:
+				// for details see:
+				//    https://groups.google.com/forum/embed/?place=forum/muparser-dev&showsearch=true&showpopout=true&showtabs=false&parenturl=http://muparser.beltoforion.de/mup_forum.html&afterlogin&pli=1#!topic/muparser-dev/szgatgoHTws
+				--sidx; 
+				stack[sidx] = *(pTok->Oprt.ptr + nOffset) = stack[sidx + 1]; 
+				continue;
+				// original code:
+				//--sidx; Stack[sidx] = *pTok->Oprt.ptr = Stack[sidx+1]; continue;
+
+			case  cmIF:
+				if (stack[sidx--] == 0)
+				{
+					MUP_ASSERT(sidx >= 0);
+					pTok += pTok->Oprt.offset;
+				}
+				continue;
+
+			case  cmELSE:
+				pTok += pTok->Oprt.offset;
+				continue;
+
+			case  cmENDIF:
+				continue;
+
+				// value and variable tokens
+			case  cmVAR:    stack[++sidx] = *(pTok->Val.ptr + nOffset);  continue;
+			case  cmVAL:    stack[++sidx] = pTok->Val.data2;  continue;
+
+			case  cmVARPOW2: buf = *(pTok->Val.ptr + nOffset);
+				stack[++sidx] = buf * buf;
+				continue;
+
+			case  cmVARPOW3: buf = *(pTok->Val.ptr + nOffset);
+				stack[++sidx] = buf * buf * buf;
+				continue;
+
+			case  cmVARPOW4: buf = *(pTok->Val.ptr + nOffset);
+				stack[++sidx] = buf * buf * buf * buf;
+				continue;
+
+			case  cmVARMUL:  
+				stack[++sidx] = *(pTok->Val.ptr + nOffset) * pTok->Val.data + pTok->Val.data2;
+				continue;
+
+				// Next is treatment of numeric functions
+			case  cmFUNC:
+			{
+				int iArgCount = pTok->Fun.argc;
+
+				// switch according to argument count
+				switch (iArgCount)
+				{
+				case 0: sidx += 1; stack[sidx] = pTok->Fun.cb.call_fun<0 >(); continue;
+				case 1:            stack[sidx] = pTok->Fun.cb.call_fun<1 >(stack[sidx]);   continue;
+				case 2: sidx -= 1; stack[sidx] = pTok->Fun.cb.call_fun<2 >(stack[sidx], stack[sidx + 1]); continue;
+				case 3: sidx -= 2; stack[sidx] = pTok->Fun.cb.call_fun<3 >(stack[sidx], stack[sidx + 1], stack[sidx + 2]); continue;
+				case 4: sidx -= 3; stack[sidx] = pTok->Fun.cb.call_fun<4 >(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3]); continue;
+				case 5: sidx -= 4; stack[sidx] = pTok->Fun.cb.call_fun<5 >(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4]); continue;
+				case 6: sidx -= 5; stack[sidx] = pTok->Fun.cb.call_fun<6 >(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5]); continue;
+				case 7: sidx -= 6; stack[sidx] = pTok->Fun.cb.call_fun<7 >(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6]); continue;
+				case 8: sidx -= 7; stack[sidx] = pTok->Fun.cb.call_fun<8 >(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6], stack[sidx + 7]); continue;
+				case 9: sidx -= 8; stack[sidx] = pTok->Fun.cb.call_fun<9 >(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6], stack[sidx + 7], stack[sidx + 8]); continue;
+				case 10:sidx -= 9; stack[sidx] = pTok->Fun.cb.call_fun<10>(stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6], stack[sidx + 7], stack[sidx + 8], stack[sidx + 9]); continue;
+				default:
+					// function with variable arguments store the number as a negative value
+					if (iArgCount > 0)
+						Error(ecINTERNAL_ERROR, -1);
+
+					sidx -= -iArgCount - 1;
+
+					// <ibg 2020-06-08> From oss-fuzz. Happend when Multiarg functions and if-then-else are used incorrectly.
+					// Expressions where this was observed:
+					//		sum(0?1,2,3,4,5:6)			-> fixed
+					//		avg(0>3?4:(""),0^3?4:(""))
+					//
+					// The final result normally lieas at position 1. If sixd is smaller there is something wrong.
+					if (sidx <= 0)
+						Error(ecINTERNAL_ERROR, -1);
+					// </ibg>
+
+					stack[sidx] = pTok->Fun.cb.call_multfun(&stack[sidx], -iArgCount);
+					continue;
+				}
+			}
+
+			// Next is treatment of string functions
+			case  cmFUNC_STR:
+			{
+				sidx -= pTok->Fun.argc - 1;
+
+				// The index of the string argument in the string table
+				int iIdxStack = pTok->Fun.idx;
+				if (iIdxStack < 0 || iIdxStack >= (int)m_vStringBuf.size())
+					Error(ecINTERNAL_ERROR, m_pTokenReader->GetPos());
+
+				switch (pTok->Fun.argc)  // switch according to argument count
+				{
+				case 0: stack[sidx] = pTok->Fun.cb.call_strfun<1>(m_vStringBuf[iIdxStack].c_str()); continue;
+				case 1: stack[sidx] = pTok->Fun.cb.call_strfun<2>(m_vStringBuf[iIdxStack].c_str(), stack[sidx]); continue;
+				case 2: stack[sidx] = pTok->Fun.cb.call_strfun<3>(m_vStringBuf[iIdxStack].c_str(), stack[sidx], stack[sidx + 1]); continue;
+				case 3: stack[sidx] = pTok->Fun.cb.call_strfun<4>(m_vStringBuf[iIdxStack].c_str(), stack[sidx], stack[sidx + 1], stack[sidx + 2]); continue;
+				case 4: stack[sidx] = pTok->Fun.cb.call_strfun<5>(m_vStringBuf[iIdxStack].c_str(), stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3]); continue;
+				case 5: stack[sidx] = pTok->Fun.cb.call_strfun<6>(m_vStringBuf[iIdxStack].c_str(), stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4]); continue;
+				}
+
+				continue;
+			}
+
+			case  cmFUNC_BULK:
+			{
+				int iArgCount = pTok->Fun.argc;
+
+				// switch according to argument count
+				switch (iArgCount)
+				{
+				case 0: sidx += 1; stack[sidx] = pTok->Fun.cb.call_bulkfun<0 >(nOffset, nThreadID); continue;
+				case 1:            stack[sidx] = pTok->Fun.cb.call_bulkfun<1 >(nOffset, nThreadID, stack[sidx]); continue;
+				case 2: sidx -= 1; stack[sidx] = pTok->Fun.cb.call_bulkfun<2 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1]); continue;
+				case 3: sidx -= 2; stack[sidx] = pTok->Fun.cb.call_bulkfun<3 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2]); continue;
+				case 4: sidx -= 3; stack[sidx] = pTok->Fun.cb.call_bulkfun<4 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3]); continue;
+				case 5: sidx -= 4; stack[sidx] = pTok->Fun.cb.call_bulkfun<5 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4]); continue;
+				case 6: sidx -= 5; stack[sidx] = pTok->Fun.cb.call_bulkfun<6 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5]); continue;
+				case 7: sidx -= 6; stack[sidx] = pTok->Fun.cb.call_bulkfun<7 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6]); continue;
+				case 8: sidx -= 7; stack[sidx] = pTok->Fun.cb.call_bulkfun<8 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6], stack[sidx + 7]); continue;
+				case 9: sidx -= 8; stack[sidx] = pTok->Fun.cb.call_bulkfun<9 >(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6], stack[sidx + 7], stack[sidx + 8]); continue;
+				case 10:sidx -= 9; stack[sidx] = pTok->Fun.cb.call_bulkfun<10>(nOffset, nThreadID, stack[sidx], stack[sidx + 1], stack[sidx + 2], stack[sidx + 3], stack[sidx + 4], stack[sidx + 5], stack[sidx + 6], stack[sidx + 7], stack[sidx + 8], stack[sidx + 9]); continue;
+				default:
+					throw exception_type(ecINTERNAL_ERROR, 2, _T(""));
+				}
+			}
+
+			default:
+				throw exception_type(ecINTERNAL_ERROR, 3, _T(""));
+			} // switch CmdCode
+		} // for all bytecode tokens
+
+		return stack[m_nFinalResultIdx];
+	}
+
+	//---------------------------------------------------------------------------
+	void ParserBase::CreateRPN() const
+	{
+		if (!m_pTokenReader->GetExpr().length())
+			Error(ecUNEXPECTED_EOF, 0);
+
+		std::stack<token_type> stOpt, stVal;
+		std::stack<int> stArgCount;
+		token_type opta, opt;  // for storing operators
+		token_type val, tval;  // for storing value
+		int ifElseCounter = 0;
+
+		ReInit();
+
+		// The outermost counter counts the number of separated items
+		// such as in "a=10,b=20,c=c+a"
+		stArgCount.push(1);
+
+		for (;;)
+		{
+			opt = m_pTokenReader->ReadNextToken();
+
+			switch (opt.GetCode())
+			{
+			//
+			// Next three are different kind of value entries
+			//
+			case cmSTRING:
+				if (stOpt.empty())
+					Error(ecSTR_RESULT, m_pTokenReader->GetPos(), opt.GetAsString());
+
+				opt.SetIdx((int)m_vStringBuf.size());      // Assign buffer index to token 
+				stVal.push(opt);
+				m_vStringBuf.push_back(opt.GetAsString()); // Store string in internal buffer
+				break;
+
+			case cmVAR:
+				stVal.push(opt);
+				m_vRPN.AddVar(static_cast<value_type*>(opt.GetVar()));
+				break;
+
+			case cmVAL:
+				stVal.push(opt);
+				m_vRPN.AddVal(opt.GetVal());
+				break;
+
+			case cmELSE:
+				if (stArgCount.empty())
+					Error(ecMISPLACED_COLON, m_pTokenReader->GetPos());
+
+				if (stArgCount.top() > 1)
+					Error(ecUNEXPECTED_ARG_SEP, m_pTokenReader->GetPos());
+
+				stArgCount.pop();
+
+				ifElseCounter--;
+				if (ifElseCounter < 0)
+					Error(ecMISPLACED_COLON, m_pTokenReader->GetPos());
+
+				ApplyRemainingOprt(stOpt, stVal);
+				m_vRPN.AddIfElse(cmELSE);
+				stOpt.push(opt);
+				break;
+
+			case cmARG_SEP:
+				if (!stOpt.empty() && stOpt.top().GetCode() == cmIF)
+					Error(ecUNEXPECTED_ARG_SEP, m_pTokenReader->GetPos());
+
+				if (stArgCount.empty())
+					Error(ecUNEXPECTED_ARG_SEP, m_pTokenReader->GetPos());
+
+				++stArgCount.top();
+				// Falls through.
+				// intentional (no break!)
+
+			case cmEND:
+				ApplyRemainingOprt(stOpt, stVal);
+				break;
+
+			case cmBC:
+			{
+				// The argument count for parameterless functions is zero
+				// by default an opening bracket sets parameter count to 1
+				// in preparation of arguments to come. If the last token
+				// was an opening bracket we know better...
+				if (opta.GetCode() == cmBO)
+					--stArgCount.top();
+
+				ApplyRemainingOprt(stOpt, stVal);
+
+				// Check if the bracket content has been evaluated completely
+				if (stOpt.size() && stOpt.top().GetCode() == cmBO)
+				{
+					// if opt is ")" and opta is "(" the bracket has been evaluated, now its time to check
+					// if there is either a function or a sign pending
+					// neither the opening nor the closing bracket will be pushed back to
+					// the operator stack
+					// Check if a function is standing in front of the opening bracket, 
+					// if yes evaluate it afterwards check for infix operators
+					MUP_ASSERT(stArgCount.size());
+					int iArgCount = stArgCount.top();
+					stArgCount.pop();
+
+					stOpt.pop(); // Take opening bracket from stack
+
+					if (iArgCount > 1 && (stOpt.size() == 0 ||
+						(stOpt.top().GetCode() != cmFUNC &&
+							stOpt.top().GetCode() != cmFUNC_BULK &&
+							stOpt.top().GetCode() != cmFUNC_STR)))
+						Error(ecUNEXPECTED_ARG, m_pTokenReader->GetPos());
+
+					// The opening bracket was popped from the stack now check if there
+					// was a function before this bracket
+					if (stOpt.size() &&
+						stOpt.top().GetCode() != cmOPRT_INFIX &&
+						stOpt.top().GetCode() != cmOPRT_BIN &&
+						stOpt.top().GetFuncAddr() != 0)
+					{
+						ApplyFunc(stOpt, stVal, iArgCount);
+					}
+				}
+			} // if bracket content is evaluated
+			break;
+
+			//
+			// Next are the binary operator entries
+			//
+			case cmIF:
+				ifElseCounter++;
+				stArgCount.push(1);
+				// Falls through.
+				// intentional (no break!)
+
+			case cmLAND:
+			case cmLOR:
+			case cmLT:
+			case cmGT:
+			case cmLE:
+			case cmGE:
+			case cmNEQ:
+			case cmEQ:
+			case cmADD:
+			case cmSUB:
+			case cmMUL:
+			case cmDIV:
+			case cmPOW:
+			case cmASSIGN:
+			case cmOPRT_BIN:
+
+				// A binary operator (user defined or built in) has been found. 
+				while (
+					stOpt.size() &&
+					stOpt.top().GetCode() != cmBO &&
+					stOpt.top().GetCode() != cmELSE &&
+					stOpt.top().GetCode() != cmIF)
+				{
+					int nPrec1 = GetOprtPrecedence(stOpt.top()),
+						nPrec2 = GetOprtPrecedence(opt);
+
+					if (stOpt.top().GetCode() == opt.GetCode())
+					{
+
+						// Deal with operator associativity
+						EOprtAssociativity eOprtAsct = GetOprtAssociativity(opt);
+						if ((eOprtAsct == oaRIGHT && (nPrec1 <= nPrec2)) ||
+							(eOprtAsct == oaLEFT && (nPrec1 < nPrec2)))
+						{
+							break;
+						}
+					}
+					else if (nPrec1 < nPrec2)
+					{
+						// In case the operators are not equal the precedence decides alone...
+						break;
+					}
+
+					if (stOpt.top().GetCode() == cmOPRT_INFIX)
+						ApplyFunc(stOpt, stVal, 1);
+					else
+						ApplyBinOprt(stOpt, stVal);
+				} // while ( ... )
+
+				if (opt.GetCode() == cmIF)
+					m_vRPN.AddIfElse(opt.GetCode());
+
+				// The operator can't be evaluated right now, push back to the operator stack
+				stOpt.push(opt);
+				break;
+
+				//
+				// Last section contains functions and operators implicitly mapped to functions
+				//
+			case cmBO:
+				stArgCount.push(1);
+				stOpt.push(opt);
+				break;
+
+			case cmOPRT_INFIX:
+			case cmFUNC:
+			case cmFUNC_BULK:
+			case cmFUNC_STR:
+				stOpt.push(opt);
+				break;
+
+			case cmOPRT_POSTFIX:
+				stOpt.push(opt);
+				ApplyFunc(stOpt, stVal, 1);  // this is the postfix operator
+				break;
+
+			default:  Error(ecINTERNAL_ERROR, 3);
+			} // end of switch operator-token
+
+			opta = opt;
+
+			if (opt.GetCode() == cmEND)
+			{
+				m_vRPN.Finalize();
+				break;
+			}
+
+			if (ParserBase::g_DbgDumpStack)
+			{
+				StackDump(stVal, stOpt);
+				m_vRPN.AsciiDump();
+			}
+
+//			if (ParserBase::g_DbgDumpCmdCode)
+				//m_vRPN.AsciiDump();
+		} // while (true)
+
+		if (ParserBase::g_DbgDumpCmdCode)
+			m_vRPN.AsciiDump();
+
+		if (ifElseCounter > 0)
+			Error(ecMISSING_ELSE_CLAUSE);
+
+		// get the last value (= final result) from the stack
+		MUP_ASSERT(stArgCount.size() == 1);
+		m_nFinalResultIdx = stArgCount.top();
+		if (m_nFinalResultIdx == 0)
+			Error(ecINTERNAL_ERROR, 9);
+
+		if (stVal.size() == 0)
+			Error(ecEMPTY_EXPRESSION);
+
+		// 2020-09-17; fix for https://oss-fuzz.com/testcase-detail/5758791700971520
+		// I don't need the value stack any more. Destructively check if all values in the value 
+		// stack represent floating point values
+		while (stVal.size())
+		{
+			if (stVal.top().GetType() != tpDBL)
+				Error(ecSTR_RESULT);
+
+			stVal.pop();
+		}
+
+		m_vStackBuffer.resize(m_vRPN.GetMaxStackSize() * s_MaxNumOpenMPThreads);
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief One of the two main parse functions.
+		\sa ParseCmdCode(...)
+
+	  Parse expression from input string. Perform syntax checking and create
+	  bytecode. After parsing the string and creating the bytecode the function
+	  pointer #m_pParseFormula will be changed to the second parse routine the
+	  uses bytecode instead of string parsing.
+	*/
+	value_type ParserBase::ParseString() const
+	{
+		try
+		{
+			CreateRPN();
+
+			if (m_vRPN.GetSize() == 2)
+			{
+				m_pParseFormula = &ParserBase::ParseCmdCodeShort;
+				m_vStackBuffer[1] = (this->*m_pParseFormula)();
+				return m_vStackBuffer[1];
+			}
+			else
+			{
+				m_pParseFormula = &ParserBase::ParseCmdCode;
+				return (this->*m_pParseFormula)();
+			}
+		}
+		catch (ParserError& exc)
+		{
+			exc.SetFormula(m_pTokenReader->GetExpr());
+			throw;
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Create an error containing the parse error position.
+
+	  This function will create an Parser Exception object containing the error text and
+	  its position.
+
+	  \param a_iErrc [in] The error code of type #EErrorCodes.
+	  \param a_iPos [in] The position where the error was detected.
+	  \param a_strTok [in] The token string representation associated with the error.
+	  \throw ParserException always throws that's the only purpose of this function.
+	*/
+	void  ParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const string_type& a_sTok) const
+	{
+		throw exception_type(a_iErrc, a_sTok, m_pTokenReader->GetExpr(), a_iPos);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Clear all user defined variables.
+		\throw nothrow
+
+		Resets the parser to string parsing mode by calling #ReInit.
+	*/
+	void ParserBase::ClearVar()
+	{
+		m_VarDef.clear();
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Remove a variable from internal storage.
+		\throw nothrow
+
+		Removes a variable if it exists. If the Variable does not exist nothing will be done.
+	*/
+	void ParserBase::RemoveVar(const string_type& a_strVarName)
+	{
+		varmap_type::iterator item = m_VarDef.find(a_strVarName);
+		if (item != m_VarDef.end())
+		{
+			m_VarDef.erase(item);
+			ReInit();
+		}
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Clear all functions.
+		\post Resets the parser to string parsing mode.
+		\throw nothrow
+	*/
+	void ParserBase::ClearFun()
+	{
+		m_FunDef.clear();
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Clear all user defined constants.
+
+		Both numeric and string constants will be removed from the internal storage.
+		\post Resets the parser to string parsing mode.
+		\throw nothrow
+	*/
+	void ParserBase::ClearConst()
+	{
+		m_ConstDef.clear();
+		m_StrVarDef.clear();
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Clear all user defined postfix operators.
+		\post Resets the parser to string parsing mode.
+		\throw nothrow
+	*/
+	void ParserBase::ClearPostfixOprt()
+	{
+		m_PostOprtDef.clear();
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Clear all user defined binary operators.
+		\post Resets the parser to string parsing mode.
+		\throw nothrow
+	*/
+	void ParserBase::ClearOprt()
+	{
+		m_OprtDef.clear();
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Clear the user defined Prefix operators.
+		\post Resets the parser to string parser mode.
+		\throw nothrow
+	*/
+	void ParserBase::ClearInfixOprt()
+	{
+		m_InfixOprtDef.clear();
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Enable or disable the formula optimization feature.
+		\post Resets the parser to string parser mode.
+		\throw nothrow
+	*/
+	void ParserBase::EnableOptimizer(bool a_bIsOn)
+	{
+		m_vRPN.EnableOptimizer(a_bIsOn);
+		ReInit();
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Enable the dumping of bytecode and stack content on the console.
+		\param bDumpCmd Flag to enable dumping of the current bytecode to the console.
+		\param bDumpStack Flag to enable dumping of the stack content is written to the console.
+
+	   This function is for debug purposes only!
+	*/
+	void ParserBase::EnableDebugDump(bool bDumpCmd, bool bDumpStack)
+	{
+		ParserBase::g_DbgDumpCmdCode = bDumpCmd;
+		ParserBase::g_DbgDumpStack = bDumpStack;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Enable or disable the built in binary operators.
+		\throw nothrow
+		\sa m_bBuiltInOp, ReInit()
+
+	  If you disable the built in binary operators there will be no binary operators
+	  defined. Thus you must add them manually one by one. It is not possible to
+	  disable built in operators selectively. This function will Reinitialize the
+	  parser by calling ReInit().
+	*/
+	void ParserBase::EnableBuiltInOprt(bool a_bIsOn)
+	{
+		m_bBuiltInOp = a_bIsOn;
+		ReInit();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Query status of built in variables.
+		\return #m_bBuiltInOp; true if built in operators are enabled.
+		\throw nothrow
+	*/
+	bool ParserBase::HasBuiltInOprt() const
+	{
+		return m_bBuiltInOp;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Get the argument separator character.
+	*/
+	char_type ParserBase::GetArgSep() const
+	{
+		return m_pTokenReader->GetArgSep();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Set argument separator.
+		\param cArgSep the argument separator character.
+	*/
+	void ParserBase::SetArgSep(char_type cArgSep)
+	{
+		m_pTokenReader->SetArgSep(cArgSep);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Dump stack content.
+
+		This function is used for debugging only.
+	*/
+	void ParserBase::StackDump(const std::stack<token_type>& a_stVal, const std::stack<token_type>& a_stOprt) const
+	{
+		std::stack<token_type> stOprt(a_stOprt);
+		std::stack<token_type> stVal(a_stVal);
+
+		mu::console() << _T("\nValue stack:\n");
+		while (!stVal.empty())
+		{
+			token_type val = stVal.top();
+			stVal.pop();
+
+			if (val.GetType() == tpSTR)
+				mu::console() << _T(" \"") << val.GetAsString() << _T("\" ");
+			else
+				mu::console() << _T(" ") << val.GetVal() << _T(" ");
+		}
+		mu::console() << "\nOperator stack:\n";
+
+		while (!stOprt.empty())
+		{
+			if (stOprt.top().GetCode() <= cmASSIGN)
+			{
+				mu::console() << _T("OPRT_INTRNL \"")
+					<< ParserBase::c_DefaultOprt[stOprt.top().GetCode()]
+					<< _T("\" \n");
+			}
+			else
+			{
+				switch (stOprt.top().GetCode())
+				{
+				case cmVAR:   mu::console() << _T("VAR\n");  break;
+				case cmVAL:   mu::console() << _T("VAL\n");  break;
+				case cmFUNC:
+					mu::console()
+						<< _T("FUNC \"")
+						<< stOprt.top().GetAsString()
+						<< _T("\"\n");
+					break;
+
+				case cmFUNC_BULK:
+					mu::console()
+						<< _T("FUNC_BULK \"")
+						<< stOprt.top().GetAsString()
+						<< _T("\"\n");
+					break;
+
+				case cmOPRT_INFIX:
+					mu::console() << _T("OPRT_INFIX \"")
+						<< stOprt.top().GetAsString()
+						<< _T("\"\n");
+					break;
+
+				case cmOPRT_BIN:
+					mu::console() << _T("OPRT_BIN \"")
+						<< stOprt.top().GetAsString()
+						<< _T("\"\n");
+					break;
+
+				case cmFUNC_STR: mu::console() << _T("FUNC_STR\n");       break;
+				case cmEND:      mu::console() << _T("END\n");            break;
+				case cmUNKNOWN:  mu::console() << _T("UNKNOWN\n");        break;
+				case cmBO:       mu::console() << _T("BRACKET \"(\"\n");  break;
+				case cmBC:       mu::console() << _T("BRACKET \")\"\n");  break;
+				case cmIF:       mu::console() << _T("IF\n");  break;
+				case cmELSE:     mu::console() << _T("ELSE\n");  break;
+				case cmENDIF:    mu::console() << _T("ENDIF\n");  break;
+				default:         mu::console() << stOprt.top().GetCode() << _T(" ");  break;
+				}
+			}
+			stOprt.pop();
+		}
+
+		mu::console() << dec << endl;
+	}
+
+	/** \brief Calculate the result.
+
+	  A note on const correctness:
+	  I consider it important that Calc is a const function.
+	  Due to caching operations Calc changes only the state of internal variables with one exception
+	  m_UsedVar this is reset during string parsing and accessible from the outside. Instead of making
+	  Calc non const GetUsedVar is non const because it explicitly calls Eval() forcing this update.
+
+	  \pre A formula must be set.
+	  \pre Variables must have been set (if needed)
+
+	  \sa #m_pParseFormula
+	  \return The evaluation result
+	  \throw ParseException if no Formula is set or in case of any other error related to the formula.
+	*/
+	value_type ParserBase::Eval() const
+	{
+		return (this->*m_pParseFormula)();
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Evaluate an expression containing comma separated subexpressions
+		\param [out] nStackSize The total number of results available
+		\return Pointer to the array containing all expression results
+
+		This member function can be used to retrieve all results of an expression
+		made up of multiple comma separated subexpressions (i.e. "x+y,sin(x),cos(y)")
+	*/
+	value_type* ParserBase::Eval(int& nStackSize) const
+	{
+		if (m_vRPN.GetSize() > 0)
+		{
+			ParseCmdCode();
+		}
+		else
+		{
+			ParseString();
+		}
+
+		nStackSize = m_nFinalResultIdx;
+
+		// (for historic reasons the stack starts at position 1)
+		return &m_vStackBuffer[1];
+	}
+
+	//---------------------------------------------------------------------------
+	/** \brief Return the number of results on the calculation stack.
+
+	  If the expression contains comma separated subexpressions (i.e. "sin(y), x+y").
+	  There may be more than one return value. This function returns the number of
+	  available results.
+	*/
+	int ParserBase::GetNumResults() const
+	{
+		return m_nFinalResultIdx;
+	}
+
+	//---------------------------------------------------------------------------
+	void ParserBase::Eval(value_type* results, int nBulkSize)
+	{
+		CreateRPN();
+
+		int i = 0;
+
+#ifdef MUP_USE_OPENMP
+		//#define DEBUG_OMP_STUFF
+#ifdef DEBUG_OMP_STUFF
+		int* pThread = new int[nBulkSize];
+		int* pIdx = new int[nBulkSize];
 #endif
 
-      ss << _T(")");
-    }
-
-    return ss.str();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a value parsing function. 
-      
-      When parsing an expression muParser tries to detect values in the expression
-      string using different valident callbacks. Thus it's possible to parse
-      for hex values, binary values and floating point values. 
-  */
-  void ParserBase::AddValIdent(identfun_type a_pCallback)
-  {
-    m_pTokenReader->AddValIdent(a_pCallback);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Set a function that can create variable pointer for unknown expression variables. 
-      \param a_pFactory A pointer to the variable factory.
-      \param pUserData A user defined context pointer.
-  */
-  void ParserBase::SetVarFactory(facfun_type a_pFactory, void *pUserData)
-  {
-    m_pTokenReader->SetVarCreator(a_pFactory, pUserData);  
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a function or operator callback to the parser. */
-  void ParserBase::AddCallback( const string_type &a_strName,
-                                const ParserCallback &a_Callback, 
-                                funmap_type &a_Storage,
-                                const char_type *a_szCharSet )
-  {
-    if (a_Callback.GetAddr()==0)
-        Error(ecINVALID_FUN_PTR);
-
-    const funmap_type *pFunMap = &a_Storage;
-
-    // Check for conflicting operator or function names
-    if ( pFunMap!=&m_FunDef && m_FunDef.find(a_strName)!=m_FunDef.end() )
-      Error(ecNAME_CONFLICT, -1, a_strName);
-
-    if ( pFunMap!=&m_PostOprtDef && m_PostOprtDef.find(a_strName)!=m_PostOprtDef.end() )
-      Error(ecNAME_CONFLICT, -1, a_strName);
-
-    if ( pFunMap!=&m_InfixOprtDef && pFunMap!=&m_OprtDef && m_InfixOprtDef.find(a_strName)!=m_InfixOprtDef.end() )
-      Error(ecNAME_CONFLICT, -1, a_strName);
-
-    if ( pFunMap!=&m_InfixOprtDef && pFunMap!=&m_OprtDef && m_OprtDef.find(a_strName)!=m_OprtDef.end() )
-      Error(ecNAME_CONFLICT, -1, a_strName);
-
-    CheckOprt(a_strName, a_Callback, a_szCharSet);
-    a_Storage[a_strName] = a_Callback;
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check if a name contains invalid characters. 
-
-      \throw ParserException if the name contains invalid characters.
-  */
-  void ParserBase::CheckOprt(const string_type &a_sName,
-                             const ParserCallback &a_Callback,
-                             const string_type &a_szCharSet) const
-  {
-    if ( !a_sName.length() ||
-        (a_sName.find_first_not_of(a_szCharSet)!=string_type::npos) ||
-        (a_sName[0]>='0' && a_sName[0]<='9'))
-    {
-      switch(a_Callback.GetCode())
-      {
-      case cmOPRT_POSTFIX: Error(ecINVALID_POSTFIX_IDENT, -1, a_sName); break;
-      case cmOPRT_INFIX:   Error(ecINVALID_INFIX_IDENT, -1, a_sName); break;
-      default:             Error(ecINVALID_NAME, -1, a_sName);
-      }
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check if a name contains invalid characters. 
-
-      \throw ParserException if the name contains invalid characters.
-  */
-  void ParserBase::CheckName(const string_type &a_sName,
-                             const string_type &a_szCharSet) const
-  {
-    if ( !a_sName.length() ||
-        (a_sName.find_first_not_of(a_szCharSet)!=string_type::npos) ||
-        (a_sName[0]>='0' && a_sName[0]<='9'))
-    {
-      Error(ecINVALID_NAME);
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Set the formula. 
-      \param a_strFormula Formula as string_type
-      \throw ParserException in case of syntax errors.
-
-      Triggers first time calculation thus the creation of the bytecode and
-      scanning of used variables.
-  */
-  void ParserBase::SetExpr(const string_type &a_sExpr)
-  {
-    // Check locale compatibility
-    if (m_pTokenReader->GetArgSep()==std::use_facet<numpunct<char_type> >(s_locale).decimal_point())
-      Error(ecLOCALE);
-
-    // <ibg> 20060222: Bugfix for Borland-Kylix:
-    // adding a space to the expression will keep Borlands KYLIX from going wild
-    // when calling tellg on a stringstream created from the expression after 
-    // reading a value at the end of an expression. (mu::Parser::IsVal function)
-    // (tellg returns -1 otherwise causing the parser to ignore the value)
-    string_type sBuf(a_sExpr + _T(" ") );
-    m_pTokenReader->SetFormula(sBuf);
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Get the default symbols used for the built in operators. 
-      \sa c_DefaultOprt
-  */
-  const char_type** ParserBase::GetOprtDef() const
-  {
-    return (const char_type **)(&c_DefaultOprt[0]);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Define the set of valid characters to be used in names of
-             functions, variables, constants.
-  */
-  void ParserBase::DefineNameChars(const char_type *a_szCharset)
-  {
-    m_sNameChars = a_szCharset;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Define the set of valid characters to be used in names of
-             binary operators and postfix operators.
-  */
-  void ParserBase::DefineOprtChars(const char_type *a_szCharset)
-  {
-    m_sOprtChars = a_szCharset;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Define the set of valid characters to be used in names of
-             infix operators.
-  */
-  void ParserBase::DefineInfixOprtChars(const char_type *a_szCharset)
-  {
-    m_sInfixOprtChars = a_szCharset;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Virtual function that defines the characters allowed in name identifiers. 
-      \sa #ValidOprtChars, #ValidPrefixOprtChars
-  */ 
-  const char_type* ParserBase::ValidNameChars() const
-  {
-    assert(m_sNameChars.size());
-    return m_sNameChars.c_str();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Virtual function that defines the characters allowed in operator definitions. 
-      \sa #ValidNameChars, #ValidPrefixOprtChars
-  */
-  const char_type* ParserBase::ValidOprtChars() const
-  {
-    assert(m_sOprtChars.size());
-    return m_sOprtChars.c_str();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Virtual function that defines the characters allowed in infix operator definitions.
-      \sa #ValidNameChars, #ValidOprtChars
-  */
-  const char_type* ParserBase::ValidInfixOprtChars() const
-  {
-    assert(m_sInfixOprtChars.size());
-    return m_sInfixOprtChars.c_str();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a user defined operator. 
-      \post Will reset the Parser to string parsing mode.
-  */
-  void ParserBase::DefinePostfixOprt(const string_type &a_sName, 
-                                     fun_type1 a_pFun,
-                                     bool a_bAllowOpt)
-  {
-    AddCallback(a_sName, 
-                ParserCallback(a_pFun, a_bAllowOpt, prPOSTFIX, cmOPRT_POSTFIX),
-                m_PostOprtDef, 
-                ValidOprtChars() );
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Initialize user defined functions. 
-   
-    Calls the virtual functions InitFun(), InitConst() and InitOprt().
-  */
-  void ParserBase::Init()
-  {
-    InitCharSets();
-    InitFun();
-    InitConst();
-    InitOprt();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a user defined operator. 
-      \post Will reset the Parser to string parsing mode.
-      \param [in] a_sName  operator Identifier 
-      \param [in] a_pFun  Operator callback function
-      \param [in] a_iPrec  Operator Precedence (default=prSIGN)
-      \param [in] a_bAllowOpt  True if operator is volatile (default=false)
-      \sa EPrec
-  */
-  void ParserBase::DefineInfixOprt(const string_type &a_sName, 
-                                  fun_type1 a_pFun, 
-                                  int a_iPrec, 
-                                  bool a_bAllowOpt)
-  {
-    AddCallback(a_sName, 
-                ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, cmOPRT_INFIX), 
-                m_InfixOprtDef, 
-                ValidInfixOprtChars() );
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Define a binary operator. 
-      \param [in] a_sName The identifier of the operator.
-      \param [in] a_pFun Pointer to the callback function.
-      \param [in] a_iPrec Precedence of the operator.
-      \param [in] a_eAssociativity The associativity of the operator.
-      \param [in] a_bAllowOpt If this is true the operator may be optimized away.
-      
-      Adds a new Binary operator the the parser instance. 
-  */
-  void ParserBase::DefineOprt( const string_type &a_sName, 
-                               fun_type2 a_pFun, 
-                               unsigned a_iPrec, 
-                               EOprtAssociativity a_eAssociativity,
-                               bool a_bAllowOpt )
-  {
-    // Check for conflicts with built in operator names
-    for (int i=0; m_bBuiltInOp && i<cmENDIF; ++i)
-      if (a_sName == string_type(c_DefaultOprt[i]))
-        Error(ecBUILTIN_OVERLOAD, -1, a_sName);
-
-    AddCallback(a_sName, 
-                ParserCallback(a_pFun, a_bAllowOpt, a_iPrec, a_eAssociativity), 
-                m_OprtDef, 
-                ValidOprtChars() );
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Define a new string constant.
-      \param [in] a_strName The name of the constant.
-      \param [in] a_strVal the value of the constant. 
-  */
-  void ParserBase::DefineStrConst(const string_type &a_strName, const string_type &a_strVal)
-  {
-    // Test if a constant with that names already exists
-    if (m_StrVarDef.find(a_strName)!=m_StrVarDef.end())
-      Error(ecNAME_CONFLICT);
-
-    CheckName(a_strName, ValidNameChars());
-    
-    m_vStringVarBuf.push_back(a_strVal);                // Store variable string in internal buffer
-    m_StrVarDef[a_strName] = m_vStringVarBuf.size()-1;  // bind buffer index to variable name
-
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a user defined variable. 
-      \param [in] a_sName the variable name
-      \param [in] a_pVar A pointer to the variable value.
-      \post Will reset the Parser to string parsing mode.
-      \throw ParserException in case the name contains invalid signs or a_pVar is NULL.
-  */
-  void ParserBase::DefineVar(const string_type &a_sName, value_type *a_pVar)
-  {
-    if (a_pVar==0)
-      Error(ecINVALID_VAR_PTR);
-
-    // Test if a constant with that names already exists
-    if (m_ConstDef.find(a_sName)!=m_ConstDef.end())
-      Error(ecNAME_CONFLICT);
-
-    CheckName(a_sName, ValidNameChars());
-    m_VarDef[a_sName] = a_pVar;
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a user defined constant. 
-      \param [in] a_sName The name of the constant.
-      \param [in] a_fVal the value of the constant.
-      \post Will reset the Parser to string parsing mode.
-      \throw ParserException in case the name contains invalid signs.
-  */
-  void ParserBase::DefineConst(const string_type &a_sName, value_type a_fVal)
-  {
-    CheckName(a_sName, ValidNameChars());
-    m_ConstDef[a_sName] = a_fVal;
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Get operator priority.
-      \throw ParserException if a_Oprt is no operator code
-  */
-  int ParserBase::GetOprtPrecedence(const token_type &a_Tok) const
-  {
-    switch (a_Tok.GetCode())
-    {
-    // built in operators
-    case cmEND:      return -5;
-    case cmARG_SEP:  return -4;
-    case cmASSIGN:   return -1;               
-    case cmELSE:
-    case cmIF:       return  0;
-    case cmLAND:     return  prLAND;
-    case cmLOR:      return  prLOR;
-    case cmLT:
-    case cmGT:
-    case cmLE:
-    case cmGE:
-    case cmNEQ:
-    case cmEQ:       return  prCMP; 
-    case cmADD:
-    case cmSUB:      return  prADD_SUB;
-    case cmMUL:
-    case cmDIV:      return  prMUL_DIV;
-    case cmPOW:      return  prPOW;
-
-    // user defined binary operators
-    case cmOPRT_INFIX: 
-    case cmOPRT_BIN: return a_Tok.GetPri();
-    default:  Error(ecINTERNAL_ERROR, 5);
-              return 999;
-    }  
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Get operator priority.
-      \throw ParserException if a_Oprt is no operator code
-  */
-  EOprtAssociativity ParserBase::GetOprtAssociativity(const token_type &a_Tok) const
-  {
-    switch (a_Tok.GetCode())
-    {
-    case cmASSIGN:
-    case cmLAND:
-    case cmLOR:
-    case cmLT:
-    case cmGT:
-    case cmLE:
-    case cmGE:
-    case cmNEQ:
-    case cmEQ: 
-    case cmADD:
-    case cmSUB:
-    case cmMUL:
-    case cmDIV:      return oaLEFT;
-    case cmPOW:      return oaRIGHT;
-    case cmOPRT_BIN: return a_Tok.GetAssociativity();
-    default:         return oaNONE;
-    }  
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return a map containing the used variables only. */
-  const varmap_type& ParserBase::GetUsedVar() const
-  {
-    try
-    {
-      m_pTokenReader->IgnoreUndefVar(true);
-      CreateRPN(); // try to create bytecode, but don't use it for any further calculations since it
-                   // may contain references to nonexisting variables.
-      m_pParseFormula = &ParserBase::ParseString;
-      m_pTokenReader->IgnoreUndefVar(false);
-    }
-    catch(exception_type & /*e*/)
-    {
-      // Make sure to stay in string parse mode, don't call ReInit()
-      // because it deletes the array with the used variables
-      m_pParseFormula = &ParserBase::ParseString;
-      m_pTokenReader->IgnoreUndefVar(false);
-      throw;
-    }
-    
-    return m_pTokenReader->GetUsedVar();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return a map containing the used variables only. */
-  const varmap_type& ParserBase::GetVar() const
-  {
-    return m_VarDef;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return a map containing all parser constants. */
-  const valmap_type& ParserBase::GetConst() const
-  {
-    return m_ConstDef;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return prototypes of all parser functions.
-      \return #m_FunDef
-      \sa FunProt
-      \throw nothrow
-      
-      The return type is a map of the public type #funmap_type containing the prototype
-      definitions for all numerical parser functions. String functions are not part of 
-      this map. The Prototype definition is encapsulated in objects of the class FunProt
-      one per parser function each associated with function names via a map construct.
-  */
-  const funmap_type& ParserBase::GetFunDef() const
-  {
-    return m_FunDef;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Retrieve the formula. */
-  const string_type& ParserBase::GetExpr() const
-  {
-    return m_pTokenReader->GetExpr();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Execute a function that takes a single string argument.
-      \param a_FunTok Function token.
-      \throw exception_type If the function token is not a string function
-  */
-  ParserBase::token_type ParserBase::ApplyStrFunc(const token_type &a_FunTok,
-                                                  const std::vector<token_type> &a_vArg) const
-  {
-    if (a_vArg.back().GetCode()!=cmSTRING)
-      Error(ecSTRING_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());
-
-    token_type  valTok;
-    generic_fun_type pFunc = a_FunTok.GetFuncAddr();
-    assert(pFunc);
-
-    try
-    {
-      // Check function arguments; write dummy value into valtok to represent the result
-      switch(a_FunTok.GetArgCount())
-      {
-      case 0: valTok.SetVal(1); a_vArg[0].GetAsString();  break;
-      case 1: valTok.SetVal(1); a_vArg[1].GetAsString();  a_vArg[0].GetVal();  break;
-      case 2: valTok.SetVal(1); a_vArg[2].GetAsString();  a_vArg[1].GetVal();  a_vArg[0].GetVal();  break;
-      default: Error(ecINTERNAL_ERROR);
-      }
-    }
-    catch(ParserError& )
-    {
-      Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), a_FunTok.GetAsString());
-    }
-
-    // string functions won't be optimized
-    m_vRPN.AddStrFun(pFunc, a_FunTok.GetArgCount(), a_vArg.back().GetIdx());
-    
-    // Push dummy value representing the function result to the stack
-    return valTok;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Apply a function token. 
-      \param iArgCount Number of Arguments actually gathered used only for multiarg functions.
-      \post The result is pushed to the value stack
-      \post The function token is removed from the stack
-      \throw exception_type if Argument count does not match function requirements.
-  */
-  void ParserBase::ApplyFunc( ParserStack<token_type> &a_stOpt,
-                              ParserStack<token_type> &a_stVal, 
-                              int a_iArgCount) const
-  { 
-    assert(m_pTokenReader.get());
-
-    // Operator stack empty or does not contain tokens with callback functions
-    if (a_stOpt.empty() || a_stOpt.top().GetFuncAddr()==0 )
-      return;
-
-    token_type funTok = a_stOpt.pop();
-    assert(funTok.GetFuncAddr());
-
-    // Binary operators must rely on their internal operator number
-    // since counting of operators relies on commas for function arguments
-    // binary operators do not have commas in their expression
-    int iArgCount = (funTok.GetCode()==cmOPRT_BIN) ? funTok.GetArgCount() : a_iArgCount;
-
-    // determine how many parameters the function needs. To remember iArgCount includes the 
-    // string parameter whilst GetArgCount() counts only numeric parameters.
-    int iArgRequired = funTok.GetArgCount() + ((funTok.GetType()==tpSTR) ? 1 : 0);
-
-    // That's the number of numerical parameters
-    int iArgNumerical = iArgCount - ((funTok.GetType()==tpSTR) ? 1 : 0);
-
-    if (funTok.GetCode()==cmFUNC_STR && iArgCount-iArgNumerical>1)
-      Error(ecINTERNAL_ERROR);
-
-    if (funTok.GetArgCount()>=0 && iArgCount>iArgRequired) 
-      Error(ecTOO_MANY_PARAMS, m_pTokenReader->GetPos()-1, funTok.GetAsString());
-
-    if (funTok.GetCode()!=cmOPRT_BIN && iArgCount<iArgRequired )
-      Error(ecTOO_FEW_PARAMS, m_pTokenReader->GetPos()-1, funTok.GetAsString());
-
-    if (funTok.GetCode()==cmFUNC_STR && iArgCount>iArgRequired )
-      Error(ecTOO_MANY_PARAMS, m_pTokenReader->GetPos()-1, funTok.GetAsString());
-
-    // Collect the numeric function arguments from the value stack and store them
-    // in a vector
-    std::vector<token_type> stArg;  
-    for (int i=0; i<iArgNumerical; ++i)
-    {
-      stArg.push_back( a_stVal.pop() );
-      if ( stArg.back().GetType()==tpSTR && funTok.GetType()!=tpSTR )
-        Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), funTok.GetAsString());
-    }
-
-    switch(funTok.GetCode())
-    {
-    case  cmFUNC_STR:  
-          stArg.push_back(a_stVal.pop());
-          
-          if ( stArg.back().GetType()==tpSTR && funTok.GetType()!=tpSTR )
-            Error(ecVAL_EXPECTED, m_pTokenReader->GetPos(), funTok.GetAsString());
-
-          ApplyStrFunc(funTok, stArg); 
-          break;
-
-    case  cmFUNC_BULK: 
-          m_vRPN.AddBulkFun(funTok.GetFuncAddr(), (int)stArg.size()); 
-          break;
-
-    case  cmOPRT_BIN:
-    case  cmOPRT_POSTFIX:
-    case  cmOPRT_INFIX:
-    case  cmFUNC:
-          if (funTok.GetArgCount()==-1 && iArgCount==0)
-            Error(ecTOO_FEW_PARAMS, m_pTokenReader->GetPos(), funTok.GetAsString());
-
-          m_vRPN.AddFun(funTok.GetFuncAddr(), (funTok.GetArgCount()==-1) ? -iArgNumerical : iArgNumerical);
-          break;
-    default:
-        break;
-    }
-
-    // Push dummy value representing the function result to the stack
-    token_type token;
-    token.SetVal(1);  
-    a_stVal.push(token);
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserBase::ApplyIfElse(ParserStack<token_type> &a_stOpt,
-                               ParserStack<token_type> &a_stVal) const
-  {
-    // Check if there is an if Else clause to be calculated
-    while (a_stOpt.size() && a_stOpt.top().GetCode()==cmELSE)
-    {
-      token_type opElse = a_stOpt.pop();
-      MUP_ASSERT(a_stOpt.size()>0);
-
-      // Take the value associated with the else branch from the value stack
-      token_type vVal2 = a_stVal.pop();
-
-      MUP_ASSERT(a_stOpt.size()>0);
-      MUP_ASSERT(a_stVal.size()>=2);
-
-      // it then else is a ternary operator Pop all three values from the value s
-      // tack and just return the right value
-      token_type vVal1 = a_stVal.pop();
-      token_type vExpr = a_stVal.pop();
-
-      a_stVal.push( (vExpr.GetVal()!=0) ? vVal1 : vVal2);
-
-      token_type opIf = a_stOpt.pop();
-      MUP_ASSERT(opElse.GetCode()==cmELSE);
-      MUP_ASSERT(opIf.GetCode()==cmIF);
-
-      m_vRPN.AddIfElse(cmENDIF);
-    } // while pending if-else-clause found
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Performs the necessary steps to write code for
-             the execution of binary operators into the bytecode. 
-  */
-  void ParserBase::ApplyBinOprt(ParserStack<token_type> &a_stOpt,
-                                ParserStack<token_type> &a_stVal) const
-  {
-    // is it a user defined binary operator?
-    if (a_stOpt.top().GetCode()==cmOPRT_BIN)
-    {
-      ApplyFunc(a_stOpt, a_stVal, 2);
-    }
-    else
-    {
-      MUP_ASSERT(a_stVal.size()>=2);
-      token_type valTok1 = a_stVal.pop(),
-                 valTok2 = a_stVal.pop(),
-                 optTok  = a_stOpt.pop(),
-                 resTok; 
-
-      if ( valTok1.GetType()!=valTok2.GetType() || 
-          (valTok1.GetType()==tpSTR && valTok2.GetType()==tpSTR) )
-        Error(ecOPRT_TYPE_CONFLICT, m_pTokenReader->GetPos(), optTok.GetAsString());
-
-      if (optTok.GetCode()==cmASSIGN)
-      {
-        if (valTok2.GetCode()!=cmVAR)
-          Error(ecUNEXPECTED_OPERATOR, -1, _T("="));
-                      
-        m_vRPN.AddAssignOp(valTok2.GetVar());
-      }
-      else
-        m_vRPN.AddOp(optTok.GetCode());
-
-      resTok.SetVal(1);
-      a_stVal.push(resTok);
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Apply a binary operator. 
-      \param a_stOpt The operator stack
-      \param a_stVal The value stack
-  */
-  void ParserBase::ApplyRemainingOprt(ParserStack<token_type> &stOpt,
-                                      ParserStack<token_type> &stVal) const
-  {
-    while (stOpt.size() && 
-           stOpt.top().GetCode() != cmBO &&
-           stOpt.top().GetCode() != cmIF)
-    {
-      token_type tok = stOpt.top();
-      switch (tok.GetCode())
-      {
-      case cmOPRT_INFIX:
-      case cmOPRT_BIN:
-      case cmLE:
-      case cmGE:
-      case cmNEQ:
-      case cmEQ:
-      case cmLT:
-      case cmGT:
-      case cmADD:
-      case cmSUB:
-      case cmMUL:
-      case cmDIV:
-      case cmPOW:
-      case cmLAND:
-      case cmLOR:
-      case cmASSIGN:
-          if (stOpt.top().GetCode()==cmOPRT_INFIX)
-            ApplyFunc(stOpt, stVal, 1);
-          else
-            ApplyBinOprt(stOpt, stVal);
-          break;
-
-      case cmELSE:
-          ApplyIfElse(stOpt, stVal);
-          break;
-
-      default:
-          Error(ecINTERNAL_ERROR);
-      }
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Parse the command code.
-      \sa ParseString(...)
-
-      Command code contains precalculated stack positions of the values and the
-      associated operators. The Stack is filled beginning from index one the 
-      value at index zero is not used at all.
-  */
-  value_type ParserBase::ParseCmdCode() const
-  {
-    return ParseCmdCodeBulk(0, 0);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Evaluate the RPN. 
-      \param nOffset The offset added to variable addresses (for bulk mode)
-      \param nThreadID OpenMP Thread id of the calling thread
-  */
-  value_type ParserBase::ParseCmdCodeBulk(int nOffset, int nThreadID) const
-  {
-    assert(nThreadID<=s_MaxNumOpenMPThreads);
-
-    // Note: The check for nOffset==0 and nThreadID here is not necessary but 
-    //       brings a minor performance gain when not in bulk mode.
-    value_type *Stack = ((nOffset==0) && (nThreadID==0)) ? &m_vStackBuffer[0] : &m_vStackBuffer[nThreadID * (m_vStackBuffer.size() / s_MaxNumOpenMPThreads)];
-    value_type buf;
-    int sidx(0);
-    for (const SToken *pTok = m_vRPN.GetBase(); pTok->Cmd!=cmEND ; ++pTok)
-    {
-      switch (pTok->Cmd)
-      {
-      // built in binary operators
-      case  cmLE:   --sidx; Stack[sidx]  = Stack[sidx] <= Stack[sidx+1]; continue;
-      case  cmGE:   --sidx; Stack[sidx]  = Stack[sidx] >= Stack[sidx+1]; continue;
-      case  cmNEQ:  --sidx; Stack[sidx]  = Stack[sidx] != Stack[sidx+1]; continue;
-      case  cmEQ:   --sidx; Stack[sidx]  = Stack[sidx] == Stack[sidx+1]; continue;
-      case  cmLT:   --sidx; Stack[sidx]  = Stack[sidx] < Stack[sidx+1];  continue;
-      case  cmGT:   --sidx; Stack[sidx]  = Stack[sidx] > Stack[sidx+1];  continue;
-      case  cmADD:  --sidx; Stack[sidx] += Stack[1+sidx]; continue;
-      case  cmSUB:  --sidx; Stack[sidx] -= Stack[1+sidx]; continue;
-      case  cmMUL:  --sidx; Stack[sidx] *= Stack[1+sidx]; continue;
-      case  cmDIV:  --sidx;
-
-  #if defined(MUP_MATH_EXCEPTIONS)
-                  if (Stack[1+sidx]==0)
-                    Error(ecDIV_BY_ZERO);
-  #endif
-                  Stack[sidx] /= Stack[1+sidx]; 
-                  continue;
-
-      case  cmPOW: 
-              --sidx; Stack[sidx] = MathImpl<value_type>::Pow(Stack[sidx], Stack[1+sidx]);
-              continue;
-
-      case  cmLAND: --sidx; Stack[sidx]  = Stack[sidx] && Stack[sidx+1]; continue;
-      case  cmLOR:  --sidx; Stack[sidx]  = Stack[sidx] || Stack[sidx+1]; continue;
-
-      case  cmASSIGN: 
-          // Bugfix for Bulkmode:
-          // for details see:
-          //    https://groups.google.com/forum/embed/?place=forum/muparser-dev&showsearch=true&showpopout=true&showtabs=false&parenturl=http://muparser.beltoforion.de/mup_forum.html&afterlogin&pli=1#!topic/muparser-dev/szgatgoHTws
-          --sidx; Stack[sidx] = *(pTok->Oprt.ptr + nOffset) = Stack[sidx + 1]; continue;
-          // original code:
-          //--sidx; Stack[sidx] = *pTok->Oprt.ptr = Stack[sidx+1]; continue;
-
-      //case  cmBO:  // unused, listed for compiler optimization purposes
-      //case  cmBC:
-      //      MUP_FAIL(INVALID_CODE_IN_BYTECODE);
-      //      continue;
-
-      case  cmIF:
-            if (Stack[sidx--]==0)
-              pTok += pTok->Oprt.offset;
-            continue;
-
-      case  cmELSE:
-            pTok += pTok->Oprt.offset;
-            continue;
-
-      case  cmENDIF:
-            continue;
-
-      //case  cmARG_SEP:
-      //      MUP_FAIL(INVALID_CODE_IN_BYTECODE);
-      //      continue;
-
-      // value and variable tokens
-      case  cmVAR:    Stack[++sidx] = *(pTok->Val.ptr + nOffset);  continue;
-      case  cmVAL:    Stack[++sidx] =  pTok->Val.data2;  continue;
-      
-      case  cmVARPOW2: buf = *(pTok->Val.ptr + nOffset);
-                       Stack[++sidx] = buf*buf;
-                       continue;
-
-      case  cmVARPOW3: buf = *(pTok->Val.ptr + nOffset);
-                       Stack[++sidx] = buf*buf*buf;
-                       continue;
-
-      case  cmVARPOW4: buf = *(pTok->Val.ptr + nOffset);
-                       Stack[++sidx] = buf*buf*buf*buf;
-                       continue;
-      
-      case  cmVARMUL:  Stack[++sidx] = *(pTok->Val.ptr + nOffset) * pTok->Val.data + pTok->Val.data2;
-                       continue;
-
-      // Next is treatment of numeric functions
-      case  cmFUNC:
-            {
-              int iArgCount = pTok->Fun.argc;
-
-              // switch according to argument count
-              switch(iArgCount)  
-              {
-              case 0: sidx += 1; Stack[sidx] = (*(fun_type0)pTok->Fun.ptr)(); continue;
-              case 1:            Stack[sidx] = (*(fun_type1)pTok->Fun.ptr)(Stack[sidx]);   continue;
-              case 2: sidx -= 1; Stack[sidx] = (*(fun_type2)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1]); continue;
-              case 3: sidx -= 2; Stack[sidx] = (*(fun_type3)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2]); continue;
-              case 4: sidx -= 3; Stack[sidx] = (*(fun_type4)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3]); continue;
-              case 5: sidx -= 4; Stack[sidx] = (*(fun_type5)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4]); continue;
-              case 6: sidx -= 5; Stack[sidx] = (*(fun_type6)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5]); continue;
-              case 7: sidx -= 6; Stack[sidx] = (*(fun_type7)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6]); continue;
-              case 8: sidx -= 7; Stack[sidx] = (*(fun_type8)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6], Stack[sidx+7]); continue;
-              case 9: sidx -= 8; Stack[sidx] = (*(fun_type9)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6], Stack[sidx+7], Stack[sidx+8]); continue;
-              case 10:sidx -= 9; Stack[sidx] = (*(fun_type10)pTok->Fun.ptr)(Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6], Stack[sidx+7], Stack[sidx+8], Stack[sidx+9]); continue;
-              default:
-                if (iArgCount>0) // function with variable arguments store the number as a negative value
-                  Error(ecINTERNAL_ERROR, 1);
-
-                sidx -= -iArgCount - 1;
-                Stack[sidx] =(*(multfun_type)pTok->Fun.ptr)(&Stack[sidx], -iArgCount);
-                continue;
-              }
-            }
-
-      // Next is treatment of string functions
-      case  cmFUNC_STR:
-            {
-              sidx -= pTok->Fun.argc -1;
-
-              // The index of the string argument in the string table
-              int iIdxStack = pTok->Fun.idx;  
-              MUP_ASSERT( iIdxStack>=0 && iIdxStack<(int)m_vStringBuf.size() );
-
-              switch(pTok->Fun.argc)  // switch according to argument count
-              {
-              case 0: Stack[sidx] = (*(strfun_type1)pTok->Fun.ptr)(m_vStringBuf[iIdxStack].c_str()); continue;
-              case 1: Stack[sidx] = (*(strfun_type2)pTok->Fun.ptr)(m_vStringBuf[iIdxStack].c_str(), Stack[sidx]); continue;
-              case 2: Stack[sidx] = (*(strfun_type3)pTok->Fun.ptr)(m_vStringBuf[iIdxStack].c_str(), Stack[sidx], Stack[sidx+1]); continue;
-              }
-
-              continue;
-            }
-
-        case  cmFUNC_BULK:
-              {
-                int iArgCount = pTok->Fun.argc;
-
-                // switch according to argument count
-                switch(iArgCount)  
-                {
-                case 0: sidx += 1; Stack[sidx] = (*(bulkfun_type0 )pTok->Fun.ptr)(nOffset, nThreadID); continue;
-                case 1:            Stack[sidx] = (*(bulkfun_type1 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx]); continue;
-                case 2: sidx -= 1; Stack[sidx] = (*(bulkfun_type2 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1]); continue;
-                case 3: sidx -= 2; Stack[sidx] = (*(bulkfun_type3 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2]); continue;
-                case 4: sidx -= 3; Stack[sidx] = (*(bulkfun_type4 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3]); continue;
-                case 5: sidx -= 4; Stack[sidx] = (*(bulkfun_type5 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4]); continue;
-                case 6: sidx -= 5; Stack[sidx] = (*(bulkfun_type6 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5]); continue;
-                case 7: sidx -= 6; Stack[sidx] = (*(bulkfun_type7 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6]); continue;
-                case 8: sidx -= 7; Stack[sidx] = (*(bulkfun_type8 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6], Stack[sidx+7]); continue;
-                case 9: sidx -= 8; Stack[sidx] = (*(bulkfun_type9 )pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6], Stack[sidx+7], Stack[sidx+8]); continue;
-                case 10:sidx -= 9; Stack[sidx] = (*(bulkfun_type10)pTok->Fun.ptr)(nOffset, nThreadID, Stack[sidx], Stack[sidx+1], Stack[sidx+2], Stack[sidx+3], Stack[sidx+4], Stack[sidx+5], Stack[sidx+6], Stack[sidx+7], Stack[sidx+8], Stack[sidx+9]); continue;
-                default:
-                  Error(ecINTERNAL_ERROR, 2);
-                  continue;
-                }
-              }
-
-        default:
-              Error(ecINTERNAL_ERROR, 3);
-              return 0;
-      } // switch CmdCode
-    } // for all bytecode tokens
-
-    return Stack[m_nFinalResultIdx];  
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserBase::CreateRPN() const
-  {
-    if (!m_pTokenReader->GetExpr().length())
-      Error(ecUNEXPECTED_EOF, 0);
-
-    ParserStack<token_type> stOpt, stVal;
-    ParserStack<int> stArgCount;
-    token_type opta, opt;  // for storing operators
-    token_type val, tval;  // for storing value
-
-    ReInit();
-    
-    // The outermost counter counts the number of separated items
-    // such as in "a=10,b=20,c=c+a"
-    stArgCount.push(1);
-    
-    for(;;)
-    {
-      opt = m_pTokenReader->ReadNextToken();
-
-      switch (opt.GetCode())
-      {
-        //
-        // Next three are different kind of value entries
-        //
-        case cmSTRING:
-                opt.SetIdx((int)m_vStringBuf.size());      // Assign buffer index to token 
-                stVal.push(opt);
-		            m_vStringBuf.push_back(opt.GetAsString()); // Store string in internal buffer
-                break;
-   
-        case cmVAR:
-                stVal.push(opt);
-                m_vRPN.AddVar( static_cast<value_type*>(opt.GetVar()) );
-                break;
-
-        case cmVAL:
-		        stVal.push(opt);
-                m_vRPN.AddVal( opt.GetVal() );
-                break;
-
-        case cmELSE:
-                m_nIfElseCounter--;
-                if (m_nIfElseCounter<0)
-                  Error(ecMISPLACED_COLON, m_pTokenReader->GetPos());
-
-                ApplyRemainingOprt(stOpt, stVal);
-                m_vRPN.AddIfElse(cmELSE);
-                stOpt.push(opt);
-                break;
-
-
-        case cmARG_SEP:
-                if (stArgCount.empty())
-                  Error(ecUNEXPECTED_ARG_SEP, m_pTokenReader->GetPos());
-
-                ++stArgCount.top();
-                // Falls through.
-                // intentional (no break!)
-
-        case cmEND:
-                ApplyRemainingOprt(stOpt, stVal);
-                break;
-
-       case cmBC:
-                {
-                  // The argument count for parameterless functions is zero
-                  // by default an opening bracket sets parameter count to 1
-                  // in preparation of arguments to come. If the last token
-                  // was an opening bracket we know better...
-                  if (opta.GetCode()==cmBO)
-                    --stArgCount.top();
-                  
-                  ApplyRemainingOprt(stOpt, stVal);
-
-                  // Check if the bracket content has been evaluated completely
-                  if (stOpt.size() && stOpt.top().GetCode()==cmBO)
-                  {
-                    // if opt is ")" and opta is "(" the bracket has been evaluated, now its time to check
-                    // if there is either a function or a sign pending
-                    // neither the opening nor the closing bracket will be pushed back to
-                    // the operator stack
-                    // Check if a function is standing in front of the opening bracket, 
-                    // if yes evaluate it afterwards check for infix operators
-                    assert(stArgCount.size());
-                    int iArgCount = stArgCount.pop();
-                    
-                    stOpt.pop(); // Take opening bracket from stack
-
-                    if (iArgCount>1 && ( stOpt.size()==0 || 
-                                        (stOpt.top().GetCode()!=cmFUNC && 
-                                         stOpt.top().GetCode()!=cmFUNC_BULK && 
-                                         stOpt.top().GetCode()!=cmFUNC_STR) ) )
-                      Error(ecUNEXPECTED_ARG, m_pTokenReader->GetPos());
-                    
-                    // The opening bracket was popped from the stack now check if there
-                    // was a function before this bracket
-                    if (stOpt.size() && 
-                        stOpt.top().GetCode()!=cmOPRT_INFIX && 
-                        stOpt.top().GetCode()!=cmOPRT_BIN && 
-                        stOpt.top().GetFuncAddr()!=0)
-                    {
-                      ApplyFunc(stOpt, stVal, iArgCount);
-                    }
-                  }
-                } // if bracket content is evaluated
-                break;
-
-        //
-        // Next are the binary operator entries
-        //
-        //case cmAND:   // built in binary operators
-        //case cmOR:
-        //case cmXOR:
-        case cmIF:
-                m_nIfElseCounter++;
-                // Falls through.
-                // intentional (no break!)
-
-        case cmLAND:
-        case cmLOR:
-        case cmLT:
-        case cmGT:
-        case cmLE:
-        case cmGE:
-        case cmNEQ:
-        case cmEQ:
-        case cmADD:
-        case cmSUB:
-        case cmMUL:
-        case cmDIV:
-        case cmPOW:
-        case cmASSIGN:
-        case cmOPRT_BIN:
-
-                // A binary operator (user defined or built in) has been found. 
-                while ( stOpt.size() && 
-                        stOpt.top().GetCode() != cmBO &&
-                        stOpt.top().GetCode() != cmELSE &&
-                        stOpt.top().GetCode() != cmIF)
-                {
-                  int nPrec1 = GetOprtPrecedence(stOpt.top()),
-                      nPrec2 = GetOprtPrecedence(opt);
-
-                  if (stOpt.top().GetCode()==opt.GetCode())
-                  {
-
-                    // Deal with operator associativity
-                    EOprtAssociativity eOprtAsct = GetOprtAssociativity(opt);
-                    if ( (eOprtAsct==oaRIGHT && (nPrec1 <= nPrec2)) || 
-                         (eOprtAsct==oaLEFT  && (nPrec1 <  nPrec2)) )
-                    {
-                      break;
-                    }
-                  }
-                  else if (nPrec1 < nPrec2)
-                  {
-                    // In case the operators are not equal the precedence decides alone...
-                    break;
-                  }
-                  
-                  if (stOpt.top().GetCode()==cmOPRT_INFIX)
-                    ApplyFunc(stOpt, stVal, 1);
-                  else
-                    ApplyBinOprt(stOpt, stVal);
-                } // while ( ... )
-
-                if (opt.GetCode()==cmIF)
-                  m_vRPN.AddIfElse(opt.GetCode());
-
-    			      // The operator can't be evaluated right now, push back to the operator stack
-                stOpt.push(opt);
-                break;
-
-        //
-        // Last section contains functions and operators implicitly mapped to functions
-        //
-        case cmBO:
-                stArgCount.push(1);
-                stOpt.push(opt);
-                break;
-
-        case cmOPRT_INFIX:
-        case cmFUNC:
-        case cmFUNC_BULK:
-        case cmFUNC_STR:  
-                stOpt.push(opt);
-                break;
-
-        case cmOPRT_POSTFIX:
-                stOpt.push(opt);
-                ApplyFunc(stOpt, stVal, 1);  // this is the postfix operator
-                break;
-
-        default:  Error(ecINTERNAL_ERROR, 3);
-      } // end of switch operator-token
-
-      opta = opt;
-
-      if ( opt.GetCode() == cmEND )
-      {
-        m_vRPN.Finalize();
-        break;
-      }
-
-      if (ParserBase::g_DbgDumpStack)
-      {
-        StackDump(stVal, stOpt);
-        m_vRPN.AsciiDump();
-      }
-    } // while (true)
-
-    if (ParserBase::g_DbgDumpCmdCode)
-      m_vRPN.AsciiDump();
-
-    if (m_nIfElseCounter>0)
-      Error(ecMISSING_ELSE_CLAUSE);
-
-    // get the last value (= final result) from the stack
-    MUP_ASSERT(stArgCount.size()==1);
-    m_nFinalResultIdx = stArgCount.top();
-    if (m_nFinalResultIdx==0)
-      Error(ecINTERNAL_ERROR, 9);
-
-    if (stVal.size()==0)
-      Error(ecEMPTY_EXPRESSION);
-
-    if (stVal.top().GetType()!=tpDBL)
-      Error(ecSTR_RESULT);
-
-    m_vStackBuffer.resize(m_vRPN.GetMaxStackSize() * s_MaxNumOpenMPThreads);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief One of the two main parse functions.
-      \sa ParseCmdCode(...)
-
-    Parse expression from input string. Perform syntax checking and create 
-    bytecode. After parsing the string and creating the bytecode the function 
-    pointer #m_pParseFormula will be changed to the second parse routine the 
-    uses bytecode instead of string parsing.
-  */
-  value_type ParserBase::ParseString() const
-  {
-    try
-    {
-      CreateRPN();
-      m_pParseFormula = &ParserBase::ParseCmdCode;
-      return (this->*m_pParseFormula)(); 
-    }
-    catch(ParserError &exc)
-    {
-      exc.SetFormula(m_pTokenReader->GetExpr());
-      throw;
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Create an error containing the parse error position.
-
-    This function will create an Parser Exception object containing the error text and
-    its position.
-
-    \param a_iErrc [in] The error code of type #EErrorCodes.
-    \param a_iPos [in] The position where the error was detected.
-    \param a_strTok [in] The token string representation associated with the error.
-    \throw ParserException always throws that's the only purpose of this function.
-  */
-  void  ParserBase::Error(EErrorCodes a_iErrc, int a_iPos, const string_type &a_sTok) const
-  {
-    throw exception_type(a_iErrc, a_sTok, m_pTokenReader->GetExpr(), a_iPos);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Clear all user defined variables.
-      \throw nothrow
-
-      Resets the parser to string parsing mode by calling #ReInit.
-  */
-  void ParserBase::ClearVar()
-  {
-    m_VarDef.clear();
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Remove a variable from internal storage.
-      \throw nothrow
-
-      Removes a variable if it exists. If the Variable does not exist nothing will be done.
-  */
-  void ParserBase::RemoveVar(const string_type &a_strVarName)
-  {
-    varmap_type::iterator item = m_VarDef.find(a_strVarName);
-    if (item!=m_VarDef.end())
-    {
-      m_VarDef.erase(item);
-      ReInit();
-    }
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Clear all functions.
-      \post Resets the parser to string parsing mode.
-      \throw nothrow
-  */
-  void ParserBase::ClearFun()
-  {
-    m_FunDef.clear();
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Clear all user defined constants.
-
-      Both numeric and string constants will be removed from the internal storage.
-      \post Resets the parser to string parsing mode.
-      \throw nothrow
-  */
-  void ParserBase::ClearConst()
-  {
-    m_ConstDef.clear();
-    m_StrVarDef.clear();
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Clear all user defined postfix operators.
-      \post Resets the parser to string parsing mode.
-      \throw nothrow
-  */
-  void ParserBase::ClearPostfixOprt()
-  {
-    m_PostOprtDef.clear();
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Clear all user defined binary operators.
-      \post Resets the parser to string parsing mode.
-      \throw nothrow
-  */
-  void ParserBase::ClearOprt()
-  {
-    m_OprtDef.clear();
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Clear the user defined Prefix operators. 
-      \post Resets the parser to string parser mode.
-      \throw nothrow
-  */
-  void ParserBase::ClearInfixOprt()
-  {
-    m_InfixOprtDef.clear();
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Enable or disable the formula optimization feature. 
-      \post Resets the parser to string parser mode.
-      \throw nothrow
-  */
-  void ParserBase::EnableOptimizer(bool a_bIsOn)
-  {
-    m_vRPN.EnableOptimizer(a_bIsOn);
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Enable the dumping of bytecode and stack content on the console. 
-      \param bDumpCmd Flag to enable dumping of the current bytecode to the console.
-      \param bDumpStack Flag to enable dumping of the stack content is written to the console.
-
-     This function is for debug purposes only!
-  */
-  void ParserBase::EnableDebugDump(bool bDumpCmd, bool bDumpStack)
-  {
-    ParserBase::g_DbgDumpCmdCode = bDumpCmd;
-    ParserBase::g_DbgDumpStack   = bDumpStack;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Enable or disable the built in binary operators.
-      \throw nothrow
-      \sa m_bBuiltInOp, ReInit()
-
-    If you disable the built in binary operators there will be no binary operators
-    defined. Thus you must add them manually one by one. It is not possible to
-    disable built in operators selectively. This function will Reinitialize the
-    parser by calling ReInit().
-  */
-  void ParserBase::EnableBuiltInOprt(bool a_bIsOn)
-  {
-    m_bBuiltInOp = a_bIsOn;
-    ReInit();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Query status of built in variables.
-      \return #m_bBuiltInOp; true if built in operators are enabled.
-      \throw nothrow
-  */
-  bool ParserBase::HasBuiltInOprt() const
-  {
-    return m_bBuiltInOp;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Get the argument separator character. 
-  */
-  char_type ParserBase::GetArgSep() const
-  {
-    return m_pTokenReader->GetArgSep();
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Set argument separator. 
-      \param cArgSep the argument separator character.
-  */
-  void ParserBase::SetArgSep(char_type cArgSep)
-  {
-    m_pTokenReader->SetArgSep(cArgSep);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Dump stack content. 
-
-      This function is used for debugging only.
-  */
-  void ParserBase::StackDump(const ParserStack<token_type> &a_stVal, 
-                             const ParserStack<token_type> &a_stOprt) const
-  {
-    ParserStack<token_type> stOprt(a_stOprt), 
-                            stVal(a_stVal);
-
-    mu::console() << _T("\nValue stack:\n");
-    while ( !stVal.empty() ) 
-    {
-      token_type val = stVal.pop();
-      if (val.GetType()==tpSTR)
-        mu::console() << _T(" \"") << val.GetAsString() << _T("\" ");
-      else
-        mu::console() << _T(" ") << val.GetVal() << _T(" ");
-    }
-    mu::console() << "\nOperator stack:\n";
-
-    while ( !stOprt.empty() )
-    {
-      if (stOprt.top().GetCode()<=cmASSIGN) 
-      {
-        mu::console() << _T("OPRT_INTRNL \"")
-                      << ParserBase::c_DefaultOprt[stOprt.top().GetCode()] 
-                      << _T("\" \n");
-      }
-      else
-      {
-        switch(stOprt.top().GetCode())
-        {
-        case cmVAR:   mu::console() << _T("VAR\n");  break;
-        case cmVAL:   mu::console() << _T("VAL\n");  break;
-        case cmFUNC:  mu::console() << _T("FUNC \"") 
-                                    << stOprt.top().GetAsString() 
-                                    << _T("\"\n");   break;
-        case cmFUNC_BULK:  mu::console() << _T("FUNC_BULK \"") 
-                                         << stOprt.top().GetAsString() 
-                                         << _T("\"\n");   break;
-        case cmOPRT_INFIX: mu::console() << _T("OPRT_INFIX \"")
-                                         << stOprt.top().GetAsString() 
-                                         << _T("\"\n");      break;
-        case cmOPRT_BIN:   mu::console() << _T("OPRT_BIN \"") 
-                                         << stOprt.top().GetAsString() 
-                                         << _T("\"\n");           break;
-        case cmFUNC_STR: mu::console() << _T("FUNC_STR\n");       break;
-        case cmEND:      mu::console() << _T("END\n");            break;
-        case cmUNKNOWN:  mu::console() << _T("UNKNOWN\n");        break;
-        case cmBO:       mu::console() << _T("BRACKET \"(\"\n");  break;
-        case cmBC:       mu::console() << _T("BRACKET \")\"\n");  break;
-        case cmIF:       mu::console() << _T("IF\n");  break;
-        case cmELSE:     mu::console() << _T("ELSE\n");  break;
-        case cmENDIF:    mu::console() << _T("ENDIF\n");  break;
-        default:         mu::console() << stOprt.top().GetCode() << _T(" ");  break;
-        }
-      }	
-      stOprt.pop();
-    }
-
-    mu::console() << dec << endl;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Evaluate an expression containing comma separated subexpressions 
-      \param [out] nStackSize The total number of results available
-      \return Pointer to the array containing all expression results
-
-      This member function can be used to retrieve all results of an expression
-      made up of multiple comma separated subexpressions (i.e. "x+y,sin(x),cos(y)")
-  */
-  value_type* ParserBase::Eval(int &nStackSize) const
-  {
-    (this->*m_pParseFormula)(); 
-    nStackSize = m_nFinalResultIdx;
-
-    // (for historic reasons the stack starts at position 1)
-    return &m_vStackBuffer[1];
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return the number of results on the calculation stack. 
-  
-    If the expression contains comma separated subexpressions (i.e. "sin(y), x+y"). 
-    There may be more than one return value. This function returns the number of 
-    available results.
-  */
-  int ParserBase::GetNumResults() const
-  {
-    return m_nFinalResultIdx;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Calculate the result.
-
-    A note on const correctness: 
-    I consider it important that Calc is a const function.
-    Due to caching operations Calc changes only the state of internal variables with one exception
-    m_UsedVar this is reset during string parsing and accessible from the outside. Instead of making
-    Calc non const GetUsedVar is non const because it explicitly calls Eval() forcing this update. 
-
-    \pre A formula must be set.
-    \pre Variables must have been set (if needed)
-
-    \sa #m_pParseFormula
-    \return The evaluation result
-    \throw ParseException if no Formula is set or in case of any other error related to the formula.
-  */
-  value_type ParserBase::Eval() const
-  {
-    return (this->*m_pParseFormula)(); 
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserBase::Eval(value_type *results, int nBulkSize)
-  {
-/* <ibg 2014-09-24/> Commented because it is making a unit test impossible
-
-    // Parallelization does not make sense for fewer than 10000 computations 
-    // due to thread creation overhead. If the bulk size is below 2000
-    // computation is refused. 
-    if (nBulkSize<2000)
-    {
-      throw ParserError(ecUNREASONABLE_NUMBER_OF_COMPUTATIONS);
-    }
-*/
-    CreateRPN();
+		int nMaxThreads = std::min(omp_get_max_threads(), s_MaxNumOpenMPThreads);
+		int nThreadID = 0;
+
+#ifdef DEBUG_OMP_STUFF
+		int ct = 0;
+#endif
+		omp_set_num_threads(nMaxThreads);
 
-    int i = 0;
+#pragma omp parallel for schedule(static, std::max(nBulkSize/nMaxThreads, 1)) private(nThreadID)
+		for (i = 0; i < nBulkSize; ++i)
+		{
+			nThreadID = omp_get_thread_num();
+			results[i] = ParseCmdCodeBulk(i, nThreadID);
 
-#ifdef MUP_USE_OPENMP
-//#define DEBUG_OMP_STUFF
-    #ifdef DEBUG_OMP_STUFF
-    int *pThread = new int[nBulkSize];
-    int *pIdx = new int[nBulkSize];
-    #endif
-
-    int nMaxThreads = std::min(omp_get_max_threads(), s_MaxNumOpenMPThreads);
-	int nThreadID = 0, ct = 0;
-    omp_set_num_threads(nMaxThreads);
-
-    #pragma omp parallel for schedule(static, nBulkSize/nMaxThreads) private(nThreadID)
-    for (i=0; i<nBulkSize; ++i)
-    {
-      nThreadID = omp_get_thread_num();
-      results[i] = ParseCmdCodeBulk(i, nThreadID);
-
-      #ifdef DEBUG_OMP_STUFF
-      #pragma omp critical
-      {
-        pThread[ct] = nThreadID;  
-        pIdx[ct] = i; 
-        ct++;
-      }
-      #endif
-    }
+#ifdef DEBUG_OMP_STUFF
+#pragma omp critical
+			{
+				pThread[ct] = nThreadID;
+				pIdx[ct] = i;
+				ct++;
+			}
+#endif
+		}
 
 #ifdef DEBUG_OMP_STUFF
-    FILE *pFile = fopen("bulk_dbg.txt", "w");
-    for (i=0; i<nBulkSize; ++i)
-    {
-      fprintf(pFile, "idx: %d  thread: %d \n", pIdx[i], pThread[i]);
-    }
-    
-    delete [] pIdx;
-    delete [] pThread;
-
-    fclose(pFile);
+		FILE* pFile = fopen("bulk_dbg.txt", "w");
+		for (i = 0; i < nBulkSize; ++i)
+		{
+			fprintf(pFile, "idx: %d  thread: %d \n", pIdx[i], pThread[i]);
+		}
+
+		delete[] pIdx;
+		delete[] pThread;
+
+		fclose(pFile);
 #endif
 
 #else
-    for (i=0; i<nBulkSize; ++i)
-    {
-      results[i] = ParseCmdCodeBulk(i, 0);
-    }
+		for (i = 0; i < nBulkSize; ++i)
+		{
+			results[i] = ParseCmdCodeBulk(i, 0);
+		}
 #endif
 
-  }
+	}
 } // namespace mu
+
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
+
diff --git a/src/muParserBytecode.cpp b/src/muParserBytecode.cpp
index 401d47d..54427b9 100644
--- a/src/muParserBytecode.cpp
+++ b/src/muParserBytecode.cpp
@@ -1,32 +1,34 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "muParserBytecode.h"
 
 #include <algorithm>
-#include <cassert>
 #include <string>
 #include <stack>
 #include <vector>
@@ -35,556 +37,608 @@
 #include "muParserDef.h"
 #include "muParserError.h"
 #include "muParserToken.h"
-#include "muParserStack.h"
 #include "muParserTemplateMagic.h"
 
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
+#endif
+
 
 namespace mu
 {
-  //---------------------------------------------------------------------------
-  /** \brief Bytecode default constructor. */
-  ParserByteCode::ParserByteCode()
-    :m_iStackPos(0)
-    ,m_iMaxStackSize(0)
-    ,m_vRPN()
-    ,m_bEnableOptimizer(true)
-  {
-    m_vRPN.reserve(50);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Copy constructor. 
-    
-      Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)
-  */
-  ParserByteCode::ParserByteCode(const ParserByteCode &a_ByteCode)
-  {
-    Assign(a_ByteCode);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Assignment operator.
-    
-      Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)
-  */
-  ParserByteCode& ParserByteCode::operator=(const ParserByteCode &a_ByteCode)
-  {
-    Assign(a_ByteCode);
-    return *this;
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserByteCode::EnableOptimizer(bool bStat)
-  {
-    m_bEnableOptimizer = bStat;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Copy state of another object to this. 
-    
-      \throw nowthrow
-  */
-  void ParserByteCode::Assign(const ParserByteCode &a_ByteCode)
-  {
-    if (this==&a_ByteCode)    
-      return;
-
-    m_iStackPos = a_ByteCode.m_iStackPos;
-    m_vRPN = a_ByteCode.m_vRPN;
-    m_iMaxStackSize = a_ByteCode.m_iMaxStackSize;
-	m_bEnableOptimizer = a_ByteCode.m_bEnableOptimizer;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a Variable pointer to bytecode. 
-      \param a_pVar Pointer to be added.
-      \throw nothrow
-  */
-  void ParserByteCode::AddVar(value_type *a_pVar)
-  {
-    ++m_iStackPos;
-    m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
-
-    // optimization does not apply
-    SToken tok;
-    tok.Cmd       = cmVAR;
-    tok.Val.ptr   = a_pVar;
-    tok.Val.data  = 1;
-    tok.Val.data2 = 0;
-    m_vRPN.push_back(tok);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a Variable pointer to bytecode. 
-
-      Value entries in byte code consist of:
-      <ul>
-        <li>value array position of the value</li>
-        <li>the operator code according to ParserToken::cmVAL</li>
-        <li>the value stored in #mc_iSizeVal number of bytecode entries.</li>
-      </ul>
-
-      \param a_pVal Value to be added.
-      \throw nothrow
-  */
-  void ParserByteCode::AddVal(value_type a_fVal)
-  {
-    ++m_iStackPos;
-    m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
-
-    // If optimization does not apply
-    SToken tok;
-    tok.Cmd = cmVAL;
-    tok.Val.ptr   = NULL;
-    tok.Val.data  = 0;
-    tok.Val.data2 = a_fVal;
-    m_vRPN.push_back(tok);
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserByteCode::ConstantFolding(ECmdCode a_Oprt)
-  {
-    std::size_t sz = m_vRPN.size();
-    value_type &x = m_vRPN[sz-2].Val.data2,
-               &y = m_vRPN[sz-1].Val.data2;
-    switch (a_Oprt)
-    {
-    case cmLAND: x = (int)x && (int)y; m_vRPN.pop_back(); break;
-    case cmLOR:  x = (int)x || (int)y; m_vRPN.pop_back(); break;
-    case cmLT:   x = x < y;  m_vRPN.pop_back();  break;
-    case cmGT:   x = x > y;  m_vRPN.pop_back();  break;
-    case cmLE:   x = x <= y; m_vRPN.pop_back();  break;
-    case cmGE:   x = x >= y; m_vRPN.pop_back();  break;
-    case cmNEQ:  x = x != y; m_vRPN.pop_back();  break;
-    case cmEQ:   x = x == y; m_vRPN.pop_back();  break;
-    case cmADD:  x = x + y;  m_vRPN.pop_back();  break;
-    case cmSUB:  x = x - y;  m_vRPN.pop_back();  break;
-    case cmMUL:  x = x * y;  m_vRPN.pop_back();  break;
-    case cmDIV: 
-
-#if defined(MUP_MATH_EXCEPTIONS)
-        if (y==0)
-          throw ParserError(ecDIV_BY_ZERO, _T("0"));
-#endif
-
-        x = x / y;   
-        m_vRPN.pop_back();
-        break;
-
-    case cmPOW: x = MathImpl<value_type>::Pow(x, y); 
-                m_vRPN.pop_back();
-                break;
-
-    default:
-        break;
-    } // switch opcode
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add an operator identifier to bytecode. 
-    
-      Operator entries in byte code consist of:
-      <ul>
-        <li>value array position of the result</li>
-        <li>the operator code according to ParserToken::ECmdCode</li>
-      </ul>
-
-      \sa  ParserToken::ECmdCode
-  */
-  void ParserByteCode::AddOp(ECmdCode a_Oprt)
-  {
-    bool bOptimized = false;
-
-    if (m_bEnableOptimizer)
-    {
-      std::size_t sz = m_vRPN.size();
-
-      // Check for foldable constants like:
-      //   cmVAL cmVAL cmADD 
-      // where cmADD can stand fopr any binary operator applied to
-      // two constant values.
-      if (sz>=2 && m_vRPN[sz-2].Cmd == cmVAL && m_vRPN[sz-1].Cmd == cmVAL)
-      {
-        ConstantFolding(a_Oprt);
-        bOptimized = true;
-      }
-      else
-      {
-        switch(a_Oprt)
-        {
-        case  cmPOW:
-              // Optimization for polynomials of low order
-              if (m_vRPN[sz-2].Cmd == cmVAR && m_vRPN[sz-1].Cmd == cmVAL)
-              {
-                if (m_vRPN[sz-1].Val.data2==2)
-                  m_vRPN[sz-2].Cmd = cmVARPOW2;
-                else if (m_vRPN[sz-1].Val.data2==3)
-                  m_vRPN[sz-2].Cmd = cmVARPOW3;
-                else if (m_vRPN[sz-1].Val.data2==4)
-                  m_vRPN[sz-2].Cmd = cmVARPOW4;
-                else
-                  break;
-
-                m_vRPN.pop_back();
-                bOptimized = true;
-              }
-              break;
-
-        case  cmSUB:
-        case  cmADD:
-              // Simple optimization based on pattern recognition for a shitload of different
-              // bytecode combinations of addition/subtraction
-              if ( (m_vRPN[sz-1].Cmd == cmVAR    && m_vRPN[sz-2].Cmd == cmVAL)    ||
-                   (m_vRPN[sz-1].Cmd == cmVAL    && m_vRPN[sz-2].Cmd == cmVAR)    || 
-                   (m_vRPN[sz-1].Cmd == cmVAL    && m_vRPN[sz-2].Cmd == cmVARMUL) ||
-                   (m_vRPN[sz-1].Cmd == cmVARMUL && m_vRPN[sz-2].Cmd == cmVAL)    ||
-                   (m_vRPN[sz-1].Cmd == cmVAR    && m_vRPN[sz-2].Cmd == cmVAR    && m_vRPN[sz-2].Val.ptr == m_vRPN[sz-1].Val.ptr) ||
-                   (m_vRPN[sz-1].Cmd == cmVAR    && m_vRPN[sz-2].Cmd == cmVARMUL && m_vRPN[sz-2].Val.ptr == m_vRPN[sz-1].Val.ptr) ||
-                   (m_vRPN[sz-1].Cmd == cmVARMUL && m_vRPN[sz-2].Cmd == cmVAR    && m_vRPN[sz-2].Val.ptr == m_vRPN[sz-1].Val.ptr) ||
-                   (m_vRPN[sz-1].Cmd == cmVARMUL && m_vRPN[sz-2].Cmd == cmVARMUL && m_vRPN[sz-2].Val.ptr == m_vRPN[sz-1].Val.ptr) )
-              {
-                assert( (m_vRPN[sz-2].Val.ptr==NULL && m_vRPN[sz-1].Val.ptr!=NULL) ||
-                        (m_vRPN[sz-2].Val.ptr!=NULL && m_vRPN[sz-1].Val.ptr==NULL) || 
-                        (m_vRPN[sz-2].Val.ptr == m_vRPN[sz-1].Val.ptr) );
-
-                m_vRPN[sz-2].Cmd = cmVARMUL;
-                m_vRPN[sz-2].Val.ptr    = (value_type*)((long long)(m_vRPN[sz-2].Val.ptr) | (long long)(m_vRPN[sz-1].Val.ptr));    // variable
-                m_vRPN[sz-2].Val.data2 += ((a_Oprt==cmSUB) ? -1 : 1) * m_vRPN[sz-1].Val.data2;  // offset
-                m_vRPN[sz-2].Val.data  += ((a_Oprt==cmSUB) ? -1 : 1) * m_vRPN[sz-1].Val.data;   // multiplicand
-                m_vRPN.pop_back();
-                bOptimized = true;
-              } 
-              break;
-
-        case  cmMUL:
-              if ( (m_vRPN[sz-1].Cmd == cmVAR && m_vRPN[sz-2].Cmd == cmVAL) ||
-                   (m_vRPN[sz-1].Cmd == cmVAL && m_vRPN[sz-2].Cmd == cmVAR) ) 
-              {
-                m_vRPN[sz-2].Cmd        = cmVARMUL;
-                m_vRPN[sz-2].Val.ptr    = (value_type*)((long long)(m_vRPN[sz-2].Val.ptr) | (long long)(m_vRPN[sz-1].Val.ptr));
-                m_vRPN[sz-2].Val.data   = m_vRPN[sz-2].Val.data2 + m_vRPN[sz-1].Val.data2;
-                m_vRPN[sz-2].Val.data2  = 0;
-                m_vRPN.pop_back();
-                bOptimized = true;
-              } 
-              else if ( (m_vRPN[sz-1].Cmd == cmVAL    && m_vRPN[sz-2].Cmd == cmVARMUL) ||
-                        (m_vRPN[sz-1].Cmd == cmVARMUL && m_vRPN[sz-2].Cmd == cmVAL) )
-              {
-                // Optimization: 2*(3*b+1) or (3*b+1)*2 -> 6*b+2
-                m_vRPN[sz-2].Cmd     = cmVARMUL;
-                m_vRPN[sz-2].Val.ptr = (value_type*)((long long)(m_vRPN[sz-2].Val.ptr) | (long long)(m_vRPN[sz-1].Val.ptr));
-                if (m_vRPN[sz-1].Cmd == cmVAL)
-                {
-                  m_vRPN[sz-2].Val.data  *= m_vRPN[sz-1].Val.data2;
-                  m_vRPN[sz-2].Val.data2 *= m_vRPN[sz-1].Val.data2;
-                }
-                else
-                {
-                  m_vRPN[sz-2].Val.data  = m_vRPN[sz-1].Val.data  * m_vRPN[sz-2].Val.data2;
-                  m_vRPN[sz-2].Val.data2 = m_vRPN[sz-1].Val.data2 * m_vRPN[sz-2].Val.data2;
-                }
-                m_vRPN.pop_back();
-                bOptimized = true;
-              }
-              else if (m_vRPN[sz-1].Cmd == cmVAR && m_vRPN[sz-2].Cmd == cmVAR &&
-                       m_vRPN[sz-1].Val.ptr == m_vRPN[sz-2].Val.ptr)
-              {
-                // Optimization: a*a -> a^2
-                m_vRPN[sz-2].Cmd = cmVARPOW2;
-                m_vRPN.pop_back();
-                bOptimized = true;
-              }
-              break;
-
-        case cmDIV:
-              if (m_vRPN[sz-1].Cmd == cmVAL && m_vRPN[sz-2].Cmd == cmVARMUL && m_vRPN[sz-1].Val.data2!=0)
-              {
-                // Optimization: 4*a/2 -> 2*a
-                m_vRPN[sz-2].Val.data  /= m_vRPN[sz-1].Val.data2;
-                m_vRPN[sz-2].Val.data2 /= m_vRPN[sz-1].Val.data2;
-                m_vRPN.pop_back();
-                bOptimized = true;
-              }
-              break;
-        default:
-            // no optimization for other opcodes
-            break;
-        } // switch a_Oprt
-      }
-    }
-
-    // If optimization can't be applied just write the value
-    if (!bOptimized)
-    {
-      --m_iStackPos;
-      SToken tok;
-      tok.Cmd = a_Oprt;
-      m_vRPN.push_back(tok);
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserByteCode::AddIfElse(ECmdCode a_Oprt)
-  {
-    SToken tok;
-    tok.Cmd = a_Oprt;
-    m_vRPN.push_back(tok);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add an assignment operator
-    
-      Operator entries in byte code consist of:
-      <ul>
-        <li>cmASSIGN code</li>
-        <li>the pointer of the destination variable</li>
-      </ul>
-
-      \sa  ParserToken::ECmdCode
-  */
-  void ParserByteCode::AddAssignOp(value_type *a_pVar)
-  {
-    --m_iStackPos;
-
-    SToken tok;
-    tok.Cmd = cmASSIGN;
-    tok.Oprt.ptr = a_pVar;
-    m_vRPN.push_back(tok);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add function to bytecode. 
-
-      \param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
-      \param a_pFun Pointer to function callback.
-  */
-  void ParserByteCode::AddFun(generic_fun_type a_pFun, int a_iArgc)
-  {
-    if (a_iArgc>=0)
-    {
-      m_iStackPos = m_iStackPos - a_iArgc + 1; 
-    }
-    else
-    {
-      // function with unlimited number of arguments
-      m_iStackPos = m_iStackPos + a_iArgc + 1; 
-    }
-    m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
-
-    SToken tok;
-    tok.Cmd = cmFUNC;
-    tok.Fun.argc = a_iArgc;
-    tok.Fun.ptr = a_pFun;
-    m_vRPN.push_back(tok);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add a bulk function to bytecode. 
-
-      \param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
-      \param a_pFun Pointer to function callback.
-  */
-  void ParserByteCode::AddBulkFun(generic_fun_type a_pFun, int a_iArgc)
-  {
-    m_iStackPos = m_iStackPos - a_iArgc + 1; 
-    m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
-
-    SToken tok;
-    tok.Cmd = cmFUNC_BULK;
-    tok.Fun.argc = a_iArgc;
-    tok.Fun.ptr = a_pFun;
-    m_vRPN.push_back(tok);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add Strung function entry to the parser bytecode. 
-      \throw nothrow
-
-      A string function entry consists of the stack position of the return value,
-      followed by a cmSTRFUNC code, the function pointer and an index into the 
-      string buffer maintained by the parser.
-  */
-  void ParserByteCode::AddStrFun(generic_fun_type a_pFun, int a_iArgc, int a_iIdx)
-  {
-    m_iStackPos = m_iStackPos - a_iArgc + 1;
-
-    SToken tok;
-    tok.Cmd = cmFUNC_STR;
-    tok.Fun.argc = a_iArgc;
-    tok.Fun.idx = a_iIdx;
-    tok.Fun.ptr = a_pFun;
-    m_vRPN.push_back(tok);
-
-    m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Add end marker to bytecode.
-      
-      \throw nothrow 
-  */
-  void ParserByteCode::Finalize()
-  {
-    SToken tok;
-    tok.Cmd = cmEND;
-    m_vRPN.push_back(tok);
-    rpn_type(m_vRPN).swap(m_vRPN);     // shrink bytecode vector to fit
-
-    // Determine the if-then-else jump offsets
-    ParserStack<int> stIf, stElse;
-    int idx;
-    for (int i=0; i<(int)m_vRPN.size(); ++i)
-    {
-      switch(m_vRPN[i].Cmd)
-      {
-      case cmIF:
-            stIf.push(i);
-            break;
-
-      case  cmELSE:
-            stElse.push(i);
-            idx = stIf.pop();
-            m_vRPN[idx].Oprt.offset = i - idx;
-            break;
-      
-      case cmENDIF:
-            idx = stElse.pop();
-            m_vRPN[idx].Oprt.offset = i - idx;
-            break;
-
-      default:
-            break;
-      }
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  const SToken* ParserByteCode::GetBase() const
-  {
-    if (m_vRPN.size()==0)
-      throw ParserError(ecINTERNAL_ERROR);
-    else
-      return &m_vRPN[0];
-  }
-
-  //---------------------------------------------------------------------------
-  std::size_t ParserByteCode::GetMaxStackSize() const
-  {
-    return m_iMaxStackSize+1;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Returns the number of entries in the bytecode. */
-  std::size_t ParserByteCode::GetSize() const
-  {
-    return m_vRPN.size();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Delete the bytecode. 
-  
-      \throw nothrow
-
-      The name of this function is a violation of my own coding guidelines
-      but this way it's more in line with the STL functions thus more 
-      intuitive.
-  */
-  void ParserByteCode::clear()
-  {
-    m_vRPN.clear();
-    m_iStackPos = 0;
-    m_iMaxStackSize = 0;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Dump bytecode (for debugging only!). */
-  void ParserByteCode::AsciiDump()
-  {
-    if (!m_vRPN.size()) 
-    {
-      mu::console() << _T("No bytecode available\n");
-      return;
-    }
-
-    mu::console() << _T("Number of RPN tokens:") << (int)m_vRPN.size() << _T("\n");
-    for (std::size_t i=0; i<m_vRPN.size() && m_vRPN[i].Cmd!=cmEND; ++i)
-    {
-      mu::console() << std::dec << i << _T(" : \t");
-      switch (m_vRPN[i].Cmd)
-      {
-      case cmVAL:   mu::console() << _T("VAL \t");
-                    mu::console() << _T("[") << m_vRPN[i].Val.data2 << _T("]\n");
-                    break;
-
-      case cmVAR:   mu::console() << _T("VAR \t");
-	                  mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n"); 
-                    break;
-
-      case cmVARPOW2: mu::console() << _T("VARPOW2 \t");
-	                    mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n"); 
-                      break;
-
-      case cmVARPOW3: mu::console() << _T("VARPOW3 \t");
-	                    mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n"); 
-                      break;
-
-      case cmVARPOW4: mu::console() << _T("VARPOW4 \t");
-	                    mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n"); 
-                      break;
-
-      case cmVARMUL:  mu::console() << _T("VARMUL \t");
-	                    mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]"); 
-                      mu::console() << _T(" * [") << m_vRPN[i].Val.data << _T("]");
-                      mu::console() << _T(" + [") << m_vRPN[i].Val.data2 << _T("]\n");
-                      break;
-
-      case cmFUNC:  mu::console() << _T("CALL\t");
-                    mu::console() << _T("[ARG:") << std::dec << m_vRPN[i].Fun.argc << _T("]"); 
-                    mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Fun.ptr << _T("]"); 
-                    mu::console() << _T("\n");
-                    break;
-
-      case cmFUNC_STR:
-                    mu::console() << _T("CALL STRFUNC\t");
-                    mu::console() << _T("[ARG:") << std::dec << m_vRPN[i].Fun.argc << _T("]");
-                    mu::console() << _T("[IDX:") << std::dec << m_vRPN[i].Fun.idx << _T("]");
-                    mu::console() << _T("[ADDR: 0x") << m_vRPN[i].Fun.ptr << _T("]\n"); 
-                    break;
-
-      case cmLT:    mu::console() << _T("LT\n");  break;
-      case cmGT:    mu::console() << _T("GT\n");  break;
-      case cmLE:    mu::console() << _T("LE\n");  break;
-      case cmGE:    mu::console() << _T("GE\n");  break;
-      case cmEQ:    mu::console() << _T("EQ\n");  break;
-      case cmNEQ:   mu::console() << _T("NEQ\n"); break;
-      case cmADD:   mu::console() << _T("ADD\n"); break;
-      case cmLAND:  mu::console() << _T("&&\n"); break;
-      case cmLOR:   mu::console() << _T("||\n"); break;
-      case cmSUB:   mu::console() << _T("SUB\n"); break;
-      case cmMUL:   mu::console() << _T("MUL\n"); break;
-      case cmDIV:   mu::console() << _T("DIV\n"); break;
-      case cmPOW:   mu::console() << _T("POW\n"); break;
-
-      case cmIF:    mu::console() << _T("IF\t");
-                    mu::console() << _T("[OFFSET:") << std::dec << m_vRPN[i].Oprt.offset << _T("]\n");
-                    break;
-
-      case cmELSE:  mu::console() << _T("ELSE\t");
-                    mu::console() << _T("[OFFSET:") << std::dec << m_vRPN[i].Oprt.offset << _T("]\n");
-                    break;
-
-      case cmENDIF: mu::console() << _T("ENDIF\n"); break;
-
-      case cmASSIGN: 
-                    mu::console() << _T("ASSIGN\t");
-                    mu::console() << _T("[ADDR: 0x") << m_vRPN[i].Oprt.ptr << _T("]\n"); 
-                    break; 
-
-      default:      mu::console() << _T("(unknown code: ") << m_vRPN[i].Cmd << _T(")\n"); 
-                    break;
-      } // switch cmdCode
-    } // while bytecode
-
-    mu::console() << _T("END") << std::endl;
-  }
+	/** \brief Bytecode default constructor. */
+	ParserByteCode::ParserByteCode()
+		:m_iStackPos(0)
+		, m_iMaxStackSize(0)
+		, m_vRPN()
+		, m_bEnableOptimizer(true)
+	{
+		m_vRPN.reserve(50);
+	}
+
+
+	/** \brief Copy constructor.
+
+		Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)
+	*/
+	ParserByteCode::ParserByteCode(const ParserByteCode& a_ByteCode)
+	{
+		Assign(a_ByteCode);
+	}
+
+
+	/** \brief Assignment operator.
+
+		Implemented in Terms of Assign(const ParserByteCode &a_ByteCode)
+	*/
+	ParserByteCode& ParserByteCode::operator=(const ParserByteCode& a_ByteCode)
+	{
+		Assign(a_ByteCode);
+		return *this;
+	}
+
+
+	void ParserByteCode::EnableOptimizer(bool bStat)
+	{
+		m_bEnableOptimizer = bStat;
+	}
+
+
+	/** \brief Copy state of another object to this.
+
+		\throw nowthrow
+	*/
+	void ParserByteCode::Assign(const ParserByteCode& a_ByteCode)
+	{
+		if (this == &a_ByteCode)
+			return;
+
+		m_iStackPos = a_ByteCode.m_iStackPos;
+		m_vRPN = a_ByteCode.m_vRPN;
+		m_iMaxStackSize = a_ByteCode.m_iMaxStackSize;
+		m_bEnableOptimizer = a_ByteCode.m_bEnableOptimizer;
+	}
+
+
+	/** \brief Add a Variable pointer to bytecode.
+		\param a_pVar Pointer to be added.
+		\throw nothrow
+	*/
+	void ParserByteCode::AddVar(value_type* a_pVar)
+	{
+		++m_iStackPos;
+		m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
+
+		// optimization does not apply
+		SToken tok;
+		tok.Cmd = cmVAR;
+		tok.Val.ptr = a_pVar;
+		tok.Val.data = 1;
+		tok.Val.data2 = 0;
+		m_vRPN.push_back(tok);
+	}
+
+
+	/** \brief Add a Variable pointer to bytecode.
+
+		Value entries in byte code consist of:
+		<ul>
+		  <li>value array position of the value</li>
+		  <li>the operator code according to ParserToken::cmVAL</li>
+		  <li>the value stored in #mc_iSizeVal number of bytecode entries.</li>
+		</ul>
+
+		\param a_pVal Value to be added.
+		\throw nothrow
+	*/
+	void ParserByteCode::AddVal(value_type a_fVal)
+	{
+		++m_iStackPos;
+		m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
+
+		// If optimization does not apply
+		SToken tok;
+		tok.Cmd = cmVAL;
+		tok.Val.ptr = nullptr;
+		tok.Val.data = 0;
+		tok.Val.data2 = a_fVal;
+		m_vRPN.push_back(tok);
+	}
+
+
+	void ParserByteCode::ConstantFolding(ECmdCode a_Oprt)
+	{
+		std::size_t sz = m_vRPN.size();
+		value_type& x = m_vRPN[sz - 2].Val.data2;
+		value_type& y = m_vRPN[sz - 1].Val.data2;
+
+		switch (a_Oprt)
+		{
+		case cmLAND: x = (int)x && (int)y; m_vRPN.pop_back(); break;
+		case cmLOR:  x = (int)x || (int)y; m_vRPN.pop_back(); break;
+		case cmLT:   x = x < y;  m_vRPN.pop_back();  break;
+		case cmGT:   x = x > y;  m_vRPN.pop_back();  break;
+		case cmLE:   x = x <= y; m_vRPN.pop_back();  break;
+		case cmGE:   x = x >= y; m_vRPN.pop_back();  break;
+		case cmNEQ:  x = x != y; m_vRPN.pop_back();  break;
+		case cmEQ:   x = x == y; m_vRPN.pop_back();  break;
+		case cmADD:  x = x + y;  m_vRPN.pop_back();  break;
+		case cmSUB:  x = x - y;  m_vRPN.pop_back();  break;
+		case cmMUL:  x = x * y;  m_vRPN.pop_back();  break;
+		case cmDIV:
+			x = x / y;
+			m_vRPN.pop_back();
+			break;
+
+		case cmPOW: x = MathImpl<value_type>::Pow(x, y);
+			m_vRPN.pop_back();
+			break;
+
+		default:
+			break;
+		} // switch opcode
+	}
+
+
+	/** \brief Add an operator identifier to bytecode.
+
+		Operator entries in byte code consist of:
+		<ul>
+		  <li>value array position of the result</li>
+		  <li>the operator code according to ParserToken::ECmdCode</li>
+		</ul>
+
+		\sa  ParserToken::ECmdCode
+	*/
+	void ParserByteCode::AddOp(ECmdCode a_Oprt)
+	{
+		bool bOptimized = false;
+
+		if (m_bEnableOptimizer)
+		{
+			std::size_t sz = m_vRPN.size();
+
+			// Check for foldable constants like:
+			//   cmVAL cmVAL cmADD 
+			// where cmADD can stand fopr any binary operator applied to
+			// two constant values.
+			if (sz >= 2 && m_vRPN[sz - 2].Cmd == cmVAL && m_vRPN[sz - 1].Cmd == cmVAL)
+			{
+				ConstantFolding(a_Oprt);
+				bOptimized = true;
+			}
+			else
+			{
+				switch (a_Oprt)
+				{
+				case  cmPOW:
+					// Optimization for polynomials of low order
+					if (m_vRPN[sz - 2].Cmd == cmVAR && m_vRPN[sz - 1].Cmd == cmVAL)
+					{
+						if (m_vRPN[sz - 1].Val.data2 == 0)
+						{
+							m_vRPN[sz - 2].Cmd = cmVAL;
+							m_vRPN[sz - 2].Val.ptr = nullptr;
+							m_vRPN[sz - 2].Val.data = 0;
+							m_vRPN[sz - 2].Val.data2 = 1;
+						}
+						else if (m_vRPN[sz - 1].Val.data2 == 1)
+							m_vRPN[sz - 2].Cmd = cmVAR;
+						else if (m_vRPN[sz - 1].Val.data2 == 2)
+							m_vRPN[sz - 2].Cmd = cmVARPOW2;
+						else if (m_vRPN[sz - 1].Val.data2 == 3)
+							m_vRPN[sz - 2].Cmd = cmVARPOW3;
+						else if (m_vRPN[sz - 1].Val.data2 == 4)
+							m_vRPN[sz - 2].Cmd = cmVARPOW4;
+						else
+							break;
+
+						m_vRPN.pop_back();
+						bOptimized = true;
+					}
+					break;
+
+				case  cmSUB:
+				case  cmADD:
+					// Simple optimization based on pattern recognition for a shitload of different
+					// bytecode combinations of addition/subtraction
+					if ((m_vRPN[sz - 1].Cmd == cmVAR && m_vRPN[sz - 2].Cmd == cmVAL) ||
+						(m_vRPN[sz - 1].Cmd == cmVAL && m_vRPN[sz - 2].Cmd == cmVAR) ||
+						(m_vRPN[sz - 1].Cmd == cmVAL && m_vRPN[sz - 2].Cmd == cmVARMUL) ||
+						(m_vRPN[sz - 1].Cmd == cmVARMUL && m_vRPN[sz - 2].Cmd == cmVAL) ||
+						(m_vRPN[sz - 1].Cmd == cmVAR && m_vRPN[sz - 2].Cmd == cmVAR && m_vRPN[sz - 2].Val.ptr == m_vRPN[sz - 1].Val.ptr) ||
+						(m_vRPN[sz - 1].Cmd == cmVAR && m_vRPN[sz - 2].Cmd == cmVARMUL && m_vRPN[sz - 2].Val.ptr == m_vRPN[sz - 1].Val.ptr) ||
+						(m_vRPN[sz - 1].Cmd == cmVARMUL && m_vRPN[sz - 2].Cmd == cmVAR && m_vRPN[sz - 2].Val.ptr == m_vRPN[sz - 1].Val.ptr) ||
+						(m_vRPN[sz - 1].Cmd == cmVARMUL && m_vRPN[sz - 2].Cmd == cmVARMUL && m_vRPN[sz - 2].Val.ptr == m_vRPN[sz - 1].Val.ptr))
+					{
+						MUP_ASSERT(
+							(m_vRPN[sz - 2].Val.ptr == nullptr && m_vRPN[sz - 1].Val.ptr != nullptr) ||
+							(m_vRPN[sz - 2].Val.ptr != nullptr && m_vRPN[sz - 1].Val.ptr == nullptr) ||
+							(m_vRPN[sz - 2].Val.ptr == m_vRPN[sz - 1].Val.ptr));
+
+						m_vRPN[sz - 2].Cmd = cmVARMUL;
+						m_vRPN[sz - 2].Val.ptr = (value_type*)((long long)(m_vRPN[sz - 2].Val.ptr) | (long long)(m_vRPN[sz - 1].Val.ptr));    // variable
+						m_vRPN[sz - 2].Val.data2 += ((a_Oprt == cmSUB) ? -1 : 1) * m_vRPN[sz - 1].Val.data2;  // offset
+						m_vRPN[sz - 2].Val.data += ((a_Oprt == cmSUB) ? -1 : 1) * m_vRPN[sz - 1].Val.data;   // multiplicand
+						m_vRPN.pop_back();
+						bOptimized = true;
+					}
+					break;
+
+				case  cmMUL:
+					if ((m_vRPN[sz - 1].Cmd == cmVAR && m_vRPN[sz - 2].Cmd == cmVAL) ||
+						(m_vRPN[sz - 1].Cmd == cmVAL && m_vRPN[sz - 2].Cmd == cmVAR))
+					{
+						m_vRPN[sz - 2].Cmd = cmVARMUL;
+						m_vRPN[sz - 2].Val.ptr = (value_type*)((long long)(m_vRPN[sz - 2].Val.ptr) | (long long)(m_vRPN[sz - 1].Val.ptr));
+						m_vRPN[sz - 2].Val.data = m_vRPN[sz - 2].Val.data2 + m_vRPN[sz - 1].Val.data2;
+						m_vRPN[sz - 2].Val.data2 = 0;
+						m_vRPN.pop_back();
+						bOptimized = true;
+					}
+					else if (
+						(m_vRPN[sz - 1].Cmd == cmVAL && m_vRPN[sz - 2].Cmd == cmVARMUL) ||
+						(m_vRPN[sz - 1].Cmd == cmVARMUL && m_vRPN[sz - 2].Cmd == cmVAL))
+					{
+						// Optimization: 2*(3*b+1) or (3*b+1)*2 -> 6*b+2
+						m_vRPN[sz - 2].Cmd = cmVARMUL;
+						m_vRPN[sz - 2].Val.ptr = (value_type*)((long long)(m_vRPN[sz - 2].Val.ptr) | (long long)(m_vRPN[sz - 1].Val.ptr));
+						if (m_vRPN[sz - 1].Cmd == cmVAL)
+						{
+							m_vRPN[sz - 2].Val.data *= m_vRPN[sz - 1].Val.data2;
+							m_vRPN[sz - 2].Val.data2 *= m_vRPN[sz - 1].Val.data2;
+						}
+						else
+						{
+							m_vRPN[sz - 2].Val.data = m_vRPN[sz - 1].Val.data * m_vRPN[sz - 2].Val.data2;
+							m_vRPN[sz - 2].Val.data2 = m_vRPN[sz - 1].Val.data2 * m_vRPN[sz - 2].Val.data2;
+						}
+						m_vRPN.pop_back();
+						bOptimized = true;
+					}
+					else if (
+						m_vRPN[sz - 1].Cmd == cmVAR && m_vRPN[sz - 2].Cmd == cmVAR &&
+						m_vRPN[sz - 1].Val.ptr == m_vRPN[sz - 2].Val.ptr)
+					{
+						// Optimization: a*a -> a^2
+						m_vRPN[sz - 2].Cmd = cmVARPOW2;
+						m_vRPN.pop_back();
+						bOptimized = true;
+					}
+					break;
+
+				case cmDIV:
+					if (m_vRPN[sz - 1].Cmd == cmVAL && m_vRPN[sz - 2].Cmd == cmVARMUL && m_vRPN[sz - 1].Val.data2 != 0)
+					{
+						// Optimization: 4*a/2 -> 2*a
+						m_vRPN[sz - 2].Val.data /= m_vRPN[sz - 1].Val.data2;
+						m_vRPN[sz - 2].Val.data2 /= m_vRPN[sz - 1].Val.data2;
+						m_vRPN.pop_back();
+						bOptimized = true;
+					}
+					break;
+
+					// no optimization for other opcodes
+				default:
+					break;
+				} // switch a_Oprt
+			}
+		}
+
+		// If optimization can't be applied just write the value
+		if (!bOptimized)
+		{
+			--m_iStackPos;
+			SToken tok;
+			tok.Cmd = a_Oprt;
+			m_vRPN.push_back(tok);
+		}
+	}
+
+
+	void ParserByteCode::AddIfElse(ECmdCode a_Oprt)
+	{
+		SToken tok;
+		tok.Cmd = a_Oprt;
+		m_vRPN.push_back(tok);
+	}
+
+
+	/** \brief Add an assignment operator
+
+		Operator entries in byte code consist of:
+		<ul>
+		  <li>cmASSIGN code</li>
+		  <li>the pointer of the destination variable</li>
+		</ul>
+
+		\sa  ParserToken::ECmdCode
+	*/
+	void ParserByteCode::AddAssignOp(value_type* a_pVar)
+	{
+		--m_iStackPos;
+
+		SToken tok;
+		tok.Cmd = cmASSIGN;
+		tok.Oprt.ptr = a_pVar;
+		m_vRPN.push_back(tok);
+	}
+
+
+	/** \brief Add function to bytecode.
+
+		\param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
+		\param a_pFun Pointer to function callback.
+	*/
+	void ParserByteCode::AddFun(generic_callable_type a_pFun, int a_iArgc, bool isFunctionOptimizable)
+	{
+		std::size_t sz = m_vRPN.size();
+		bool optimize = false;
+
+		// only optimize functions with fixed number of more than a single arguments
+		if (isFunctionOptimizable && m_bEnableOptimizer && a_iArgc > 0)
+		{
+			// <ibg 2020-06-10/> Unary Plus is a no-op
+			if (a_pFun == generic_callable_type{(erased_fun_type)&MathImpl<value_type>::UnaryPlus, nullptr})
+				return;
+
+			optimize = true;
+
+			for (int i = 0; i < std::abs(a_iArgc); ++i)
+			{
+				if (m_vRPN[sz - i - 1].Cmd != cmVAL)
+				{
+					optimize = false;
+					break;
+				}
+			}
+		}
+
+		if (optimize)
+		{
+			value_type val = 0;
+			switch (a_iArgc)
+			{
+			case 1:  val = a_pFun.call_fun<1>(m_vRPN[sz - 1].Val.data2); break;
+			case 2:  val = a_pFun.call_fun<2>(m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 3:  val = a_pFun.call_fun<3>(m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 4:  val = a_pFun.call_fun<4>(m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 5:  val = a_pFun.call_fun<5>(m_vRPN[sz - 5].Val.data2, m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 6:  val = a_pFun.call_fun<6>(m_vRPN[sz - 6].Val.data2, m_vRPN[sz - 5].Val.data2, m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 7:  val = a_pFun.call_fun<7>(m_vRPN[sz - 7].Val.data2, m_vRPN[sz - 6].Val.data2, m_vRPN[sz - 5].Val.data2, m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 8:  val = a_pFun.call_fun<8>(m_vRPN[sz - 8].Val.data2, m_vRPN[sz - 7].Val.data2, m_vRPN[sz - 6].Val.data2, m_vRPN[sz - 5].Val.data2, m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 9:  val = a_pFun.call_fun<9>(m_vRPN[sz - 9].Val.data2, m_vRPN[sz - 8].Val.data2, m_vRPN[sz - 7].Val.data2, m_vRPN[sz - 6].Val.data2, m_vRPN[sz - 5].Val.data2, m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			case 10: val = a_pFun.call_fun<10>(m_vRPN[sz - 10].Val.data2, m_vRPN[sz - 9].Val.data2, m_vRPN[sz - 8].Val.data2, m_vRPN[sz - 7].Val.data2, m_vRPN[sz - 6].Val.data2, m_vRPN[sz - 5].Val.data2, m_vRPN[sz - 4].Val.data2, m_vRPN[sz - 3].Val.data2, m_vRPN[sz - 2].Val.data2, m_vRPN[sz - 1].Val.data2); break;
+			default:
+				// For now functions with unlimited number of arguments are not optimized
+				throw ParserError(ecINTERNAL_ERROR);
+			}
+
+			// remove the folded values
+			m_vRPN.erase(m_vRPN.end() - a_iArgc, m_vRPN.end());
+
+			SToken tok;
+			tok.Cmd = cmVAL;
+			tok.Val.data = 0;
+			tok.Val.data2 = val;
+			tok.Val.ptr = nullptr;
+			m_vRPN.push_back(tok);
+		}
+		else
+		{
+			SToken tok;
+			tok.Cmd = cmFUNC;
+			tok.Fun.argc = a_iArgc;
+			tok.Fun.cb = a_pFun;
+			m_vRPN.push_back(tok);
+		}
+
+		m_iStackPos = m_iStackPos - std::abs(a_iArgc) + 1;
+		m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
+
+	}
+
+
+	/** \brief Add a bulk function to bytecode.
+
+		\param a_iArgc Number of arguments, negative numbers indicate multiarg functions.
+		\param a_pFun Pointer to function callback.
+	*/
+	void ParserByteCode::AddBulkFun(generic_callable_type a_pFun, int a_iArgc)
+	{
+		m_iStackPos = m_iStackPos - a_iArgc + 1;
+		m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
+
+		SToken tok;
+		tok.Cmd = cmFUNC_BULK;
+		tok.Fun.argc = a_iArgc;
+		tok.Fun.cb = a_pFun;
+		m_vRPN.push_back(tok);
+	}
+
+
+	/** \brief Add Strung function entry to the parser bytecode.
+		\throw nothrow
+
+		A string function entry consists of the stack position of the return value,
+		followed by a cmSTRFUNC code, the function pointer and an index into the
+		string buffer maintained by the parser.
+	*/
+	void ParserByteCode::AddStrFun(generic_callable_type a_pFun, int a_iArgc, int a_iIdx)
+	{
+		m_iStackPos = m_iStackPos - a_iArgc + 1;
+
+		SToken tok;
+		tok.Cmd = cmFUNC_STR;
+		tok.Fun.argc = a_iArgc;
+		tok.Fun.idx = a_iIdx;
+		tok.Fun.cb = a_pFun;
+		m_vRPN.push_back(tok);
+
+		m_iMaxStackSize = std::max(m_iMaxStackSize, (size_t)m_iStackPos);
+	}
+
+
+	/** \brief Add end marker to bytecode.
+
+		\throw nothrow
+	*/
+	void ParserByteCode::Finalize()
+	{
+		SToken tok;
+		tok.Cmd = cmEND;
+		m_vRPN.push_back(tok);
+		rpn_type(m_vRPN).swap(m_vRPN);     // shrink bytecode vector to fit
+
+		// Determine the if-then-else jump offsets
+		std::stack<int> stIf, stElse;
+		int idx;
+		for (int i = 0; i < (int)m_vRPN.size(); ++i)
+		{
+			switch (m_vRPN[i].Cmd)
+			{
+			case cmIF:
+				stIf.push(i);
+				break;
+
+			case cmELSE:
+				stElse.push(i);
+				idx = stIf.top();
+				stIf.pop();
+				m_vRPN[idx].Oprt.offset = i - idx;
+				break;
+
+			case cmENDIF:
+				idx = stElse.top();
+				stElse.pop();
+				m_vRPN[idx].Oprt.offset = i - idx;
+				break;
+
+			default:
+				break;
+			}
+		}
+	}
+
+
+	std::size_t ParserByteCode::GetMaxStackSize() const
+	{
+		return m_iMaxStackSize + 1;
+	}
+
+
+	/** \brief Delete the bytecode.
+
+		\throw nothrow
+
+		The name of this function is a violation of my own coding guidelines
+		but this way it's more in line with the STL functions thus more
+		intuitive.
+	*/
+	void ParserByteCode::clear()
+	{
+		m_vRPN.clear();
+		m_iStackPos = 0;
+		m_iMaxStackSize = 0;
+	}
+
+
+	/** \brief Dump bytecode (for debugging only!). */
+	void ParserByteCode::AsciiDump()
+	{
+		if (!m_vRPN.size())
+		{
+			mu::console() << _T("No bytecode available\n");
+			return;
+		}
+
+		mu::console() << _T("Number of RPN tokens:") << (int)m_vRPN.size() << _T("\n");
+		for (std::size_t i = 0; i < m_vRPN.size() && m_vRPN[i].Cmd != cmEND; ++i)
+		{
+			mu::console() << std::dec << i << _T(" : \t");
+			switch (m_vRPN[i].Cmd)
+			{
+			case cmVAL:   mu::console() << _T("VAL \t");
+				mu::console() << _T("[") << m_vRPN[i].Val.data2 << _T("]\n");
+				break;
+
+			case cmVAR:   mu::console() << _T("VAR \t");
+				mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
+				break;
+
+			case cmVARPOW2: mu::console() << _T("VARPOW2 \t");
+				mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
+				break;
+
+			case cmVARPOW3: mu::console() << _T("VARPOW3 \t");
+				mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
+				break;
+
+			case cmVARPOW4: mu::console() << _T("VARPOW4 \t");
+				mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
+				break;
+
+			case cmVARMUL:  mu::console() << _T("VARMUL \t");
+				mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]");
+				mu::console() << _T(" * [") << m_vRPN[i].Val.data << _T("]");
+				mu::console() << _T(" + [") << m_vRPN[i].Val.data2 << _T("]\n");
+				break;
+
+			case cmFUNC:  mu::console() << _T("CALL\t");
+				mu::console() << _T("[ARG:") << std::dec << m_vRPN[i].Fun.argc << _T("]");
+				mu::console() << _T("[ADDR: 0x") << std::hex << reinterpret_cast<void*>(m_vRPN[i].Fun.cb._pRawFun) << _T("]");
+				mu::console() << _T("[USERDATA: 0x") << std::hex << reinterpret_cast<void*>(m_vRPN[i].Fun.cb._pUserData) << _T("]");
+				mu::console() << _T("\n");
+				break;
+
+			case cmFUNC_STR:
+				mu::console() << _T("CALL STRFUNC\t");
+				mu::console() << _T("[ARG:") << std::dec << m_vRPN[i].Fun.argc << _T("]");
+				mu::console() << _T("[IDX:") << std::dec << m_vRPN[i].Fun.idx << _T("]");
+				mu::console() << _T("[ADDR: 0x") << std::hex << reinterpret_cast<void*>(m_vRPN[i].Fun.cb._pRawFun) << _T("]");
+				mu::console() << _T("[USERDATA: 0x") << std::hex << reinterpret_cast<void*>(m_vRPN[i].Fun.cb._pUserData) << _T("]");
+				mu::console() << _T("\n");
+				break;
+
+			case cmLT:    mu::console() << _T("LT\n");  break;
+			case cmGT:    mu::console() << _T("GT\n");  break;
+			case cmLE:    mu::console() << _T("LE\n");  break;
+			case cmGE:    mu::console() << _T("GE\n");  break;
+			case cmEQ:    mu::console() << _T("EQ\n");  break;
+			case cmNEQ:   mu::console() << _T("NEQ\n"); break;
+			case cmADD:   mu::console() << _T("ADD\n"); break;
+			case cmLAND:  mu::console() << _T("&&\n"); break;
+			case cmLOR:   mu::console() << _T("||\n"); break;
+			case cmSUB:   mu::console() << _T("SUB\n"); break;
+			case cmMUL:   mu::console() << _T("MUL\n"); break;
+			case cmDIV:   mu::console() << _T("DIV\n"); break;
+			case cmPOW:   mu::console() << _T("POW\n"); break;
+
+			case cmIF:    mu::console() << _T("IF\t");
+				mu::console() << _T("[OFFSET:") << std::dec << m_vRPN[i].Oprt.offset << _T("]\n");
+				break;
+
+			case cmELSE:  mu::console() << _T("ELSE\t");
+				mu::console() << _T("[OFFSET:") << std::dec << m_vRPN[i].Oprt.offset << _T("]\n");
+				break;
+
+			case cmENDIF: mu::console() << _T("ENDIF\n"); break;
+
+			case cmASSIGN:
+				mu::console() << _T("ASSIGN\t");
+				mu::console() << _T("[ADDR: 0x") << m_vRPN[i].Oprt.ptr << _T("]\n");
+				break;
+
+			default:      mu::console() << _T("(unknown code: ") << m_vRPN[i].Cmd << _T(")\n");
+				break;
+			} // switch cmdCode
+		} // while bytecode
+
+		mu::console() << _T("END") << std::endl;
+	}
 } // namespace mu
+
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
diff --git a/src/muParserCallback.cpp b/src/muParserCallback.cpp
index b6aec1a..8f2265b 100644
--- a/src/muParserCallback.cpp
+++ b/src/muParserCallback.cpp
@@ -1,463 +1,894 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2004-2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2022 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "muParserCallback.h"
 
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
+#endif
+
 /** \file
-    \brief Implementation of the parser callback class.
+	\brief Implementation of the parser callback class.
 */
 
 
 namespace mu
 {
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type0 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(0)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(1)
-    ,m_iPri(a_iPrec)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(a_iCode)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Constructor for constructing function callbacks taking two arguments. 
-      \throw nothrow
-  */
-  ParserCallback::ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(2)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  /** \brief Constructor for constructing binary operator callbacks. 
-      \param a_pFun Pointer to a static function taking two arguments
-      \param a_bAllowOpti A flag indicating this function can be optimized
-      \param a_iPrec The operator precedence
-      \param a_eOprtAsct The operators associativity
-      \throw nothrow
-  */
-  ParserCallback::ParserCallback(fun_type2 a_pFun, 
-                                 bool a_bAllowOpti, 
-                                 int a_iPrec, 
-                                 EOprtAssociativity a_eOprtAsct)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(2)
-    ,m_iPri(a_iPrec)
-    ,m_eOprtAsct(a_eOprtAsct)
-    ,m_iCode(cmOPRT_BIN)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type3 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(3)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type4 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(4)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type5 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(5)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type6 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(6)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type7 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(7)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type8 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(8)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type9 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(9)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(fun_type10 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(10)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(0)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(1)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Constructor for constructing function callbacks taking two arguments. 
-      \throw nothrow
-  */
-  ParserCallback::ParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(2)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(3)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(4)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(5)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(6)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(7)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(8)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(9)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(10)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_BULK)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(multfun_type a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(-1)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC)
-    ,m_iType(tpDBL)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(0)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_STR)
-    ,m_iType(tpSTR)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(1)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_STR)
-    ,m_iType(tpSTR)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  ParserCallback::ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti)
-    :m_pFun((void*)a_pFun)
-    ,m_iArgc(2)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmFUNC_STR)
-    ,m_iType(tpSTR)
-    ,m_bAllowOpti(a_bAllowOpti)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Default constructor. 
-      \throw nothrow
-  */
-  ParserCallback::ParserCallback()
-    :m_pFun(0)
-    ,m_iArgc(0)
-    ,m_iPri(-1)
-    ,m_eOprtAsct(oaNONE)
-    ,m_iCode(cmUNKNOWN)
-    ,m_iType(tpVOID)
-    ,m_bAllowOpti(0)
-  {}
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Copy constructor. 
-      \throw nothrow
-  */
-  ParserCallback::ParserCallback(const ParserCallback &ref)
-  {
-    m_pFun       = ref.m_pFun;
-    m_iArgc      = ref.m_iArgc;
-    m_bAllowOpti = ref.m_bAllowOpti;
-    m_iCode      = ref.m_iCode;
-    m_iType      = ref.m_iType;
-    m_iPri       = ref.m_iPri;
-    m_eOprtAsct  = ref.m_eOprtAsct;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Clone this instance and return a pointer to the new instance. */
-  ParserCallback* ParserCallback::Clone() const
-  {
-    return new ParserCallback(*this);
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return tru if the function is conservative.
-
-      Conservative functions return always the same result for the same argument.
-      \throw nothrow
-  */
-  bool ParserCallback::IsOptimizable() const  
-  { 
-    return m_bAllowOpti; 
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Get the callback address for the parser function. 
-  
-      The type of the address is void. It needs to be recasted according to the
-      argument number to the right type.
-
-      \throw nothrow
-      \return #pFun
-  */
-  void* ParserCallback::GetAddr() const 
-  { 
-    return m_pFun;  
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return the callback code. */
-  ECmdCode  ParserCallback::GetCode() const 
-  { 
-    return m_iCode; 
-  }
-  
-  //---------------------------------------------------------------------------
-  ETypeCode ParserCallback::GetType() const 
-  { 
-    return m_iType; 
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Return the operator precedence. 
-      \throw nothrown
-
-     Only valid if the callback token is an operator token (binary or infix).
-  */
-  int ParserCallback::GetPri()  const 
-  { 
-    return m_iPri;  
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return the operators associativity. 
-      \throw nothrown
-
-     Only valid if the callback token is a binary operator token.
-  */
-  EOprtAssociativity ParserCallback::GetAssociativity() const
-  {
-    return m_eOprtAsct;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Returns the number of function Arguments. */
-  int ParserCallback::GetArgc() const 
-  { 
-    return m_iArgc; 
-  }
+	static constexpr int CALLBACK_INTERNAL_VAR_ARGS         = 1 << 14;
+	static constexpr int CALLBACK_INTERNAL_FIXED_ARGS_MASK  = 0xf;
+	static constexpr int CALLBACK_INTERNAL_WITH_USER_DATA	= 1 << 13;
+
+	struct CbWithUserData
+	{
+		void*	pFun;
+		void* 	pUserData;
+	};
+
+
+	ParserCallback::ParserCallback(fun_type0 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(0)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti, int a_iPrec, ECmdCode a_iCode)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(1)
+		, m_iPri(a_iPrec)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(a_iCode)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type1 a_pFun, bool a_bAllowOpti)
+		: ParserCallback(a_pFun, a_bAllowOpti, -1, cmFUNC)
+	{}
+
+	
+	/** \brief Constructor for constructing function callbacks taking two arguments.
+		\throw nothrow
+	*/
+	ParserCallback::ParserCallback(fun_type2 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(2)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	/** \brief Constructor for constructing binary operator callbacks.
+		\param a_pFun Pointer to a static function taking two arguments
+		\param a_bAllowOpti A flag indicating this function can be optimized
+		\param a_iPrec The operator precedence
+		\param a_eOprtAsct The operators associativity
+		\throw nothrow
+	*/
+	ParserCallback::ParserCallback(fun_type2 a_pFun,
+		bool a_bAllowOpti,
+		int a_iPrec,
+		EOprtAssociativity a_eOprtAsct)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(2)
+		, m_iPri(a_iPrec)
+		, m_eOprtAsct(a_eOprtAsct)
+		, m_iCode(cmOPRT_BIN)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type3 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(3)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type4 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(4)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type5 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(5)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type6 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(6)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type7 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(7)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type8 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(8)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type9 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(9)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_type10 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(10)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type0 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(0 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type1 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(1 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type2 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(2 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type3 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(3 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type4 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(4 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type5 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(5 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type6 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(6 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type7 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(7 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type8 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(8 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type9 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(9 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(fun_userdata_type10 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(10 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type0 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(0)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type1 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(1)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	/** \brief Constructor for constructing function callbacks taking two arguments.
+		\throw nothrow
+	*/
+	ParserCallback::ParserCallback(bulkfun_type2 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(2)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type3 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(3)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type4 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(4)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type5 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(5)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type6 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(6)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type7 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(7)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type8 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(8)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type9 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(9)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_type10 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(10)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type0 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(0 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type1 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(1 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type2 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(2 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type3 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(3 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type4 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(4 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type5 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(5 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type6 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(6 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type7 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(7 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type8 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(8 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type9 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(9 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(bulkfun_userdata_type10 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(10 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_BULK)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(multfun_type a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(CALLBACK_INTERNAL_VAR_ARGS)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(multfun_userdata_type a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(CALLBACK_INTERNAL_VAR_ARGS | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC)
+		, m_iType(tpDBL)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_type1 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(0)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_type2 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(1)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_type3 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(2)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_type4 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(3)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_type5 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(4)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+	ParserCallback::ParserCallback(strfun_type6 a_pFun, bool a_bAllowOpti)
+		:m_pFun((void*)a_pFun)
+		, m_iArgc(5)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_userdata_type1 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(0 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_userdata_type2 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(1 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_userdata_type3 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(2 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_userdata_type4 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(3 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_userdata_type5 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{reinterpret_cast<void*>(a_pFun), a_pUserData})
+		, m_iArgc(4 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+
+	ParserCallback::ParserCallback(strfun_userdata_type6 a_pFun, void* a_pUserData, bool a_bAllowOpti)
+		:m_pFun(new CbWithUserData{ reinterpret_cast<void*>(a_pFun), a_pUserData })
+		, m_iArgc(5 | CALLBACK_INTERNAL_WITH_USER_DATA)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmFUNC_STR)
+		, m_iType(tpSTR)
+		, m_bAllowOpti(a_bAllowOpti)
+	{}
+
+	/** \brief Default constructor.
+		\throw nothrow
+	*/
+	ParserCallback::ParserCallback()
+		:m_pFun(0)
+		, m_iArgc(0)
+		, m_iPri(-1)
+		, m_eOprtAsct(oaNONE)
+		, m_iCode(cmUNKNOWN)
+		, m_iType(tpVOID)
+		, m_bAllowOpti(0)
+	{}
+
+
+	/** \brief Copy constructor.
+		\throw nothrow
+	*/
+	ParserCallback::ParserCallback(const ParserCallback& ref)
+		:ParserCallback()
+	{
+		Assign(ref);
+	}
+
+	ParserCallback & ParserCallback::operator=(const ParserCallback & ref)
+	{
+		Assign(ref);
+		return *this;
+	}
+
+
+	ParserCallback::~ParserCallback()
+	{
+		if (m_iArgc & CALLBACK_INTERNAL_WITH_USER_DATA)
+			delete reinterpret_cast<CbWithUserData*>(m_pFun);
+	}
+
+
+	/** \brief Copy callback from argument.
+
+		\throw nothrow
+	*/
+	void ParserCallback::Assign(const ParserCallback& ref)
+	{
+		if (this == &ref)
+			return;
+
+		if (m_iArgc & CALLBACK_INTERNAL_WITH_USER_DATA) {
+			delete reinterpret_cast<CbWithUserData*>(m_pFun);
+			m_pFun = nullptr;
+		}
+
+		if (ref.m_iArgc & CALLBACK_INTERNAL_WITH_USER_DATA)
+			m_pFun = new CbWithUserData(*reinterpret_cast<CbWithUserData*>(ref.m_pFun));
+		else
+			m_pFun = ref.m_pFun;
+		m_iArgc = ref.m_iArgc;
+		m_bAllowOpti = ref.m_bAllowOpti;
+		m_iCode = ref.m_iCode;
+		m_iType = ref.m_iType;
+		m_iPri = ref.m_iPri;
+		m_eOprtAsct = ref.m_eOprtAsct;
+	}
+
+
+	/** \brief Clone this instance and return a pointer to the new instance. */
+	ParserCallback* ParserCallback::Clone() const
+	{
+		return new ParserCallback(*this);
+	}
+
+
+	/** \brief Return tru if the function is conservative.
+
+		Conservative functions return always the same result for the same argument.
+		\throw nothrow
+	*/
+	bool ParserCallback::IsOptimizable() const
+	{
+		return m_bAllowOpti;
+	}
+
+
+	/** \brief Get the callback address for the parser function.
+
+		The type of the address is void. It needs to be recasted according to the
+		argument number to the right type.
+
+		\throw nothrow
+	*/
+	void* ParserCallback::GetAddr() const
+	{
+		if (m_iArgc & CALLBACK_INTERNAL_WITH_USER_DATA)
+			return reinterpret_cast<CbWithUserData*>(m_pFun)->pFun;
+		else
+			return m_pFun;
+	}
+
+
+	/** \brief Get the user data if present, else nullptr
+
+		\throw nothrow
+	*/
+	void* ParserCallback::GetUserData() const
+	{
+		if (m_iArgc & CALLBACK_INTERNAL_WITH_USER_DATA)
+			return reinterpret_cast<CbWithUserData*>(m_pFun)->pUserData;
+		else
+			return nullptr;
+	}
+
+
+	/** \brief Check that the callback looks valid
+		\throw nothrow
+
+		Check that the function pointer is not null,
+		and if there are user data that they are not null.
+	*/
+	bool ParserCallback::IsValid() const
+	{
+		return GetAddr() != nullptr
+			&& !((m_iArgc & CALLBACK_INTERNAL_WITH_USER_DATA)
+			     && GetUserData() == nullptr);
+	}
+
+
+	/** \brief Return the callback code. */
+	ECmdCode  ParserCallback::GetCode() const
+	{
+		return m_iCode;
+	}
+
+
+	ETypeCode ParserCallback::GetType() const
+	{
+		return m_iType;
+	}
+
+
+	/** \brief Return the operator precedence.
+		\throw nothrown
+
+	   Only valid if the callback token is an operator token (binary or infix).
+	*/
+	int ParserCallback::GetPri()  const
+	{
+		return m_iPri;
+	}
+
+
+	/** \brief Return the operators associativity.
+		\throw nothrown
+
+	   Only valid if the callback token is a binary operator token.
+	*/
+	EOprtAssociativity ParserCallback::GetAssociativity() const
+	{
+		return m_eOprtAsct;
+	}
+
+
+	/** \brief Returns the number of numeric function Arguments.
+
+	   This number is negative for functions with variable number of arguments.
+	*/
+	int ParserCallback::GetArgc() const
+	{
+		return (m_iArgc & CALLBACK_INTERNAL_VAR_ARGS) ? -1 : (m_iArgc & CALLBACK_INTERNAL_FIXED_ARGS_MASK);
+	}
 } // namespace mu
+
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
diff --git a/src/muParserDLL.cpp b/src/muParserDLL.cpp
index a32b785..846f65e 100644
--- a/src/muParserDLL.cpp
+++ b/src/muParserDLL.cpp
@@ -1,106 +1,127 @@
 /*
-                 __________
-                 _____   __ __\______   \_____  _______  ______  ____ _______
-                 /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-                 |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-                 |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|
-                 \/                       \/            \/      \/
-                 Copyright (C) 2004-2011 Ingo Berg
-
-                 Permission is hereby granted, free of charge, to any person obtaining a copy of this
-                 software and associated documentation files (the "Software"), to deal in the Software
-                 without restriction, including without limitation the rights to use, copy, modify,
-                 merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
-                 permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-                 The above copyright notice and this permission notice shall be included in all copies or
-                 substantial portions of the Software.
-
-                 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-                 NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-                 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-                 DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-                 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-                 */
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
 #if defined(MUPARSER_DLL) 
 
 #if defined(_WIN32)
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+	#define WIN32_LEAN_AND_MEAN
+	#define _CRT_SECURE_NO_WARNINGS
+	#define _CRT_SECURE_NO_DEPRECATE
+
+	#include <windows.h>
 #endif
 
+#include <cassert>
+
 #include "muParserDLL.h"
 #include "muParser.h"
 #include "muParserInt.h"
 #include "muParserError.h"
 
+#if _UNICODE
+	#include <wchar.h>
+#endif
+
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
+#endif
 
 #define MU_TRY  \
-    try     \
+		try		\
         {
 
-#define MU_CATCH                                                 \
-        }                                                        \
-        catch (muError_t &e)                                      \
-        {                                                        \
-        ParserTag *pTag = static_cast<ParserTag*>(a_hParser);  \
-        pTag->exc = e;                                         \
-        pTag->bError = true;                                   \
-if (pTag->errHandler)                                  \
-    (pTag->errHandler)(a_hParser);                       \
-        }                                                        \
-        catch (...)                                               \
-        {                                                        \
-        ParserTag *pTag = static_cast<ParserTag*>(a_hParser);  \
-        pTag->exc = muError_t(mu::ecINTERNAL_ERROR);           \
-        pTag->bError = true;                                   \
-if (pTag->errHandler)                                  \
-    (pTag->errHandler)(a_hParser);                       \
+#define MU_CATCH							                       \
+        }								                           \
+        catch (muError_t &e)		                               \
+        {						                                   \
+	        ParserTag *pTag = static_cast<ParserTag*>(a_hParser);  \
+			pTag->exc = e;                                         \
+			pTag->bError = true;                                   \
+			if (pTag->errHandler)                                  \
+				(pTag->errHandler)(a_hParser);                     \
+        }					                                       \
+        catch (...)		                                           \
+        {		                                                   \
+	        ParserTag *pTag = static_cast<ParserTag*>(a_hParser);  \
+	        pTag->exc = muError_t(mu::ecINTERNAL_ERROR);           \
+	        pTag->bError = true;                                   \
+			if (pTag->errHandler)                                  \
+				(pTag->errHandler)(a_hParser);                     \
         }
 
 /** \file
-    \brief This file contains the implementation of the DLL interface of muparser.
-    */
+	\brief This file contains the implementation of the DLL interface of muparser.
+*/
 
-//---------------------------------------------------------------------------
-// private types
 typedef mu::ParserBase::exception_type muError_t;
 typedef mu::ParserBase muParser_t;
-
 int g_nBulkSize;
 
-//---------------------------------------------------------------------------
+
 class ParserTag
 {
 public:
-    ParserTag(int nType)
-        :pParser((nType == muBASETYPE_FLOAT) ? (mu::ParserBase*)new mu::Parser() :
-        (nType == muBASETYPE_INT) ? (mu::ParserBase*)new mu::ParserInt() : NULL)
-        , exc()
-        , errHandler(NULL)
-        , bError(false)
-        , m_nParserType(nType)
-    {}
-
-    ~ParserTag()
-    {
-        delete pParser;
-    }
-
-    mu::ParserBase *pParser;
-    mu::ParserBase::exception_type exc;
-    muErrorHandler_t errHandler;
-    bool bError;
+	ParserTag(int nType)
+		: pParser((nType == muBASETYPE_FLOAT)
+			? (mu::ParserBase*)new mu::Parser()
+			: (nType == muBASETYPE_INT) ? (mu::ParserBase*)new mu::ParserInt() : nullptr)
+		, exc()
+		, errHandler(nullptr)
+		, bError(false)
+		, m_nParserType(nType)
+	{}
+
+	~ParserTag()
+	{
+		delete pParser;
+	}
+
+	mu::ParserBase* pParser;
+	mu::ParserBase::exception_type exc;
+	muErrorHandler_t errHandler;
+	bool bError;
 
 private:
-    ParserTag(const ParserTag &ref);
-    ParserTag& operator=(const ParserTag &ref);
+	ParserTag(const ParserTag& ref);
+	ParserTag& operator=(const ParserTag& ref);
 
-    int m_nParserType;
+	int m_nParserType;
 };
 
 static muChar_t s_tmpOutBuf[2048];
 
+template <typename T>
+constexpr std::size_t count_of(const T& array) 
+{
+	return (sizeof(array) / sizeof(array[0]));
+}
+
 //---------------------------------------------------------------------------
 //
 //
@@ -109,38 +130,35 @@ static muChar_t s_tmpOutBuf[2048];
 //
 //---------------------------------------------------------------------------
 
-//---------------------------------------------------------------------------
+
 inline muParser_t* AsParser(muParserHandle_t a_hParser)
 {
-    return static_cast<ParserTag*>(a_hParser)->pParser;
+	return static_cast<ParserTag*>(a_hParser)->pParser;
 }
 
-//---------------------------------------------------------------------------
+
 inline ParserTag* AsParserTag(muParserHandle_t a_hParser)
 {
-    return static_cast<ParserTag*>(a_hParser);
+	return static_cast<ParserTag*>(a_hParser);
 }
 
-//---------------------------------------------------------------------------
+
 #if defined(_WIN32)
-#define _CRT_SECURE_NO_DEPRECATE
 
-BOOL APIENTRY DllMain(HANDLE /*hModule*/,
-    DWORD ul_reason_for_call,
-    LPVOID /*lpReserved*/)
+BOOL APIENTRY DllMain(HANDLE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
 {
-    switch (ul_reason_for_call)
-    {
-    case  DLL_PROCESS_ATTACH:
-        break;
+	switch (ul_reason_for_call)
+	{
+	case  DLL_PROCESS_ATTACH:
+		break;
 
-    case  DLL_THREAD_ATTACH:
-    case  DLL_THREAD_DETACH:
-    case  DLL_PROCESS_DETACH:
-        break;
-    }
+	case  DLL_THREAD_ATTACH:
+	case  DLL_THREAD_DETACH:
+	case  DLL_PROCESS_DETACH:
+		break;
+	}
 
-    return TRUE;
+	return TRUE;
 }
 
 #endif
@@ -153,944 +171,1106 @@ BOOL APIENTRY DllMain(HANDLE /*hModule*/,
 //
 //---------------------------------------------------------------------------
 
-API_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void *pUserData)
+API_EXPORT(void) mupSetVarFactory(muParserHandle_t a_hParser, muFacFun_t a_pFactory, void* pUserData)
 {
-    MU_TRY
-        muParser_t* p(AsParser(a_hParser));
-    p->SetVarFactory(a_pFactory, pUserData);
-    MU_CATCH
+	MU_TRY
+		muParser_t* p(AsParser(a_hParser));
+		p->SetVarFactory(a_pFactory, pUserData);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-/** \brief Create a new Parser instance and return its handle.
-*/
+
+/** \brief Create a new Parser instance and return its handle. */
 API_EXPORT(muParserHandle_t) mupCreate(int nBaseType)
 {
-    switch (nBaseType)
-    {
-    case  muBASETYPE_FLOAT:   return (void*)(new ParserTag(muBASETYPE_FLOAT));
-    case  muBASETYPE_INT:     return (void*)(new ParserTag(muBASETYPE_INT));
-    default:                  return NULL;
-    }
+	switch (nBaseType)
+	{
+	case  muBASETYPE_FLOAT:   return (void*)(new ParserTag(muBASETYPE_FLOAT));
+	case  muBASETYPE_INT:     return (void*)(new ParserTag(muBASETYPE_INT));
+	default:                  return nullptr;
+	}
 }
 
-//---------------------------------------------------------------------------
-/** \brief Release the parser instance related with a parser handle.
-*/
+
+/** \brief Release the parser instance related with a parser handle. */
 API_EXPORT(void) mupRelease(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        ParserTag* p = static_cast<ParserTag*>(a_hParser);
-    delete p;
-    MU_CATCH
+	MU_TRY
+		ParserTag* p = static_cast<ParserTag*>(a_hParser);
+		delete p;
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 API_EXPORT(const muChar_t*) mupGetVersion(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
 
 #ifndef _UNICODE
-    sprintf(s_tmpOutBuf, "%s", p->GetVersion().c_str());
+		sprintf(s_tmpOutBuf, "%s", p->GetVersion().c_str());
 #else
-    wsprintf(s_tmpOutBuf, _T("%s"), p->GetVersion().c_str());
+//		wsprintf(s_tmpOutBuf, _T("%s"), p->GetVersion().c_str());
+		swprintf(s_tmpOutBuf, count_of(s_tmpOutBuf), _T("%s"), p->GetVersion().c_str());
 #endif
 
-    return s_tmpOutBuf;
-    MU_CATCH
-
-        return _T("");
+		return s_tmpOutBuf;
+	MU_CATCH
+	return _T("");
 }
 
-//---------------------------------------------------------------------------
-/** \brief Evaluate the expression.
-*/
+
+/** \brief Evaluate the expression. */
 API_EXPORT(muFloat_t) mupEval(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    return p->Eval();
-    MU_CATCH
-
-        return 0;
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		return p->Eval();
+	MU_CATCH
+	return 0;
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(muFloat_t*) mupEvalMulti(muParserHandle_t a_hParser, int *nNum)
-{
-    MU_TRY
-        assert(nNum != NULL);
 
-    muParser_t* const p(AsParser(a_hParser));
-    return p->Eval(*nNum);
-    MU_CATCH
+API_EXPORT(muFloat_t*) mupEvalMulti(muParserHandle_t a_hParser, int* nNum)
+{
+	MU_TRY
+		if (nNum == nullptr)
+			throw std::runtime_error("Argument is null!"); 
 
-        return 0;
+		muParser_t* const p(AsParser(a_hParser));
+		return p->Eval(*nNum);
+	MU_CATCH
+	return 0;
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupEvalBulk(muParserHandle_t a_hParser, muFloat_t *a_res, int nSize)
+
+API_EXPORT(void) mupEvalBulk(muParserHandle_t a_hParser, muFloat_t* a_res, int nSize)
 {
-    MU_TRY
-        muParser_t* p(AsParser(a_hParser));
-    p->Eval(a_res, nSize);
-    MU_CATCH
+	MU_TRY
+		muParser_t* p(AsParser(a_hParser));
+		p->Eval(a_res, nSize);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 API_EXPORT(void) mupSetExpr(muParserHandle_t a_hParser, const muChar_t* a_szExpr)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->SetExpr(a_szExpr);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->SetExpr(a_szExpr);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 API_EXPORT(void) mupRemoveVar(muParserHandle_t a_hParser, const muChar_t* a_szName)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->RemoveVar(a_szName);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->RemoveVar(a_szName);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Release all parser variables.
-    \param a_hParser Handle to the parser instance.
-    */
+	\param a_hParser Handle to the parser instance.
+*/
 API_EXPORT(void) mupClearVar(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->ClearVar();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->ClearVar();
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Release all parser variables.
-    \param a_hParser Handle to the parser instance.
-    */
+	\param a_hParser Handle to the parser instance.
+*/
 API_EXPORT(void) mupClearConst(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->ClearConst();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->ClearConst();
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Clear all user defined operators.
-    \param a_hParser Handle to the parser instance.
-    */
+	\param a_hParser Handle to the parser instance.
+*/
 API_EXPORT(void) mupClearOprt(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->ClearOprt();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->ClearOprt();
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 API_EXPORT(void) mupClearFun(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->ClearFun();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->ClearFun();
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 API_EXPORT(void) mupDefineFun0(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muFun0_t a_pFun,
-    muBool_t a_bAllowOpt)
+	const muChar_t* a_szName,
+	muFun0_t a_pFun,
+	muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muFun1_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun1(muParserHandle_t a_hParser,	const muChar_t* a_szName, muFun1_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muFun2_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun2_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun3_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun3_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun4_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun4_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun5_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun5_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun6(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun6_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun6_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun7(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun7_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun7_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun8(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun8_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun8_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun9(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun9_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun9_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineFun10(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFun10_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun10_t a_pFun, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun0(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muBulkFun0_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData0(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData0_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun1(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muBulkFun1_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData1(muParserHandle_t a_hParser,	const muChar_t* a_szName, muFunUserData1_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun2(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muBulkFun2_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData2(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData2_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun3(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun3_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData3(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData3_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun4(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun4_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData4(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData4_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun5(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun5_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData5(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData5_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun6(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun6_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData6(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData6_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun7(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun7_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData7(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData7_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun8(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun8_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData8(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData8_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun9(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun9_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData9(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData9_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkFun10(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muBulkFun10_t a_pFun)
+
+API_EXPORT(void) mupDefineFunUserData10(muParserHandle_t a_hParser, const muChar_t* a_szName, muFunUserData10_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muStrFun1_t a_pFun)
+
+API_EXPORT(void) mupDefineBulkFun0(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun0_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muStrFun2_t a_pFun)
+
+API_EXPORT(void) mupDefineBulkFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun1_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muStrFun3_t a_pFun)
+
+API_EXPORT(void) mupDefineBulkFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun2_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, false);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineMultFun(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muMultFun_t a_pFun,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineBulkFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun3_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineOprt(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muFun2_t a_pFun,
-    muInt_t a_nPrec,
-    muInt_t a_nOprtAsct,
-    muBool_t a_bAllowOpt)
-{
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineOprt(a_szName,
-        a_pFun,
-        a_nPrec,
-        (mu::EOprtAssociativity)a_nOprtAsct,
-        a_bAllowOpt != 0);
-    MU_CATCH
+
+API_EXPORT(void) mupDefineBulkFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun4_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineVar(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFloat_t *a_pVar)
+
+API_EXPORT(void) mupDefineBulkFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun5_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineVar(a_szName, a_pVar);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineBulkVar(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFloat_t *a_pVar)
+
+API_EXPORT(void) mupDefineBulkFun6(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun6_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineVar(a_szName, a_pVar);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineConst(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    muFloat_t a_fVal)
+
+API_EXPORT(void) mupDefineBulkFun7(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun7_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineConst(a_szName, a_fVal);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineStrConst(muParserHandle_t a_hParser,
-    const muChar_t *a_szName,
-    const muChar_t *a_szVal)
+
+API_EXPORT(void) mupDefineBulkFun8(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun8_t a_pFun)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineStrConst(a_szName, a_szVal);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
+API_EXPORT(void) mupDefineBulkFun9(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun9_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFun10(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFun10_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData0(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData0_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData1(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData1_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData2(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData2_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData3(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData3_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData4(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData4_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData5(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData5_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData6(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData6_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData7(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData7_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData8(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData8_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData9(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData9_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkFunUserData10(muParserHandle_t a_hParser, const muChar_t* a_szName, muBulkFunUserData10_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFun1(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun1_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFun2(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun2_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFun3(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun3_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFun4(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun4_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFun5(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFun5_t a_pFun)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFunUserData1(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData1_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFunUserData2(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData2_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFunUserData3(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData3_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFunUserData4(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData4_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrFunUserData5(muParserHandle_t a_hParser, const muChar_t* a_szName, muStrFunUserData5_t a_pFun, void* a_pUserData)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, false);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineMultFun(muParserHandle_t a_hParser, const muChar_t* a_szName, muMultFun_t a_pFun,	muBool_t a_bAllowOpt)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFun(a_szName, a_pFun, a_bAllowOpt != 0);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineMultFunUserData(muParserHandle_t a_hParser, const muChar_t* a_szName, muMultFunUserData_t a_pFun, void* a_pUserData, muBool_t a_bAllowOpt)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineFunUserData(a_szName, a_pFun, a_pUserData, a_bAllowOpt != 0);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineOprt(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun2_t a_pFun, muInt_t a_nPrec, muInt_t a_nOprtAsct, muBool_t a_bAllowOpt)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineOprt(a_szName, a_pFun,	a_nPrec, (mu::EOprtAssociativity)a_nOprtAsct, a_bAllowOpt != 0);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineVar(muParserHandle_t a_hParser, const muChar_t* a_szName,	muFloat_t* a_pVar)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineVar(a_szName, a_pVar);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineBulkVar(muParserHandle_t a_hParser, const muChar_t* a_szName,	muFloat_t* a_pVar)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineVar(a_szName, a_pVar);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineConst(muParserHandle_t a_hParser,	const muChar_t* a_szName, muFloat_t a_fVal)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineConst(a_szName, a_fVal);
+	MU_CATCH
+}
+
+
+API_EXPORT(void) mupDefineStrConst(muParserHandle_t a_hParser, const muChar_t* a_szName, const muChar_t* a_szVal)
+{
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineStrConst(a_szName, a_szVal);
+	MU_CATCH
+}
+
+
 API_EXPORT(const muChar_t*) mupGetExpr(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
 
-    // C# explodes when pMsg is returned directly. For some reason it can't access
-    // the memory where the message lies directly.
+		// C# explodes when pMsg is returned directly. For some reason it can't access
+		// the memory where the message lies directly.
 #ifndef _UNICODE
-    sprintf(s_tmpOutBuf, "%s", p->GetExpr().c_str());
+		sprintf(s_tmpOutBuf, "%s", p->GetExpr().c_str());
 #else
-    wsprintf(s_tmpOutBuf, _T("%s"), p->GetExpr().c_str());
+//		wsprintf(s_tmpOutBuf, _T("%s"), p->GetExpr().c_str());
+		swprintf(s_tmpOutBuf, count_of(s_tmpOutBuf), _T("%s"), p->GetExpr().c_str());
 #endif
 
-    return s_tmpOutBuf;
-
-    MU_CATCH
+		return s_tmpOutBuf;
+	MU_CATCH
 
-        return _T("");
+	return _T("");
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefinePostfixOprt(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muFun1_t a_pOprt,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefinePostfixOprt(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pOprt, muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefinePostfixOprt(a_szName, a_pOprt, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefinePostfixOprt(a_szName, a_pOprt, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineInfixOprt(muParserHandle_t a_hParser,
-    const muChar_t* a_szName,
-    muFun1_t a_pOprt,
-    muBool_t a_bAllowOpt)
+
+API_EXPORT(void) mupDefineInfixOprt(muParserHandle_t a_hParser, const muChar_t* a_szName, muFun1_t a_pOprt,	muBool_t a_bAllowOpt)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->DefineInfixOprt(a_szName, a_pOprt, a_bAllowOpt != 0);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->DefineInfixOprt(a_szName, a_pOprt, a_bAllowOpt != 0);
+	MU_CATCH
 }
 
 // Define character sets for identifiers
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser,
-    const muChar_t* a_szCharset)
+API_EXPORT(void) mupDefineNameChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset)
 {
-    muParser_t* const p(AsParser(a_hParser));
-    p->DefineNameChars(a_szCharset);
+	muParser_t* const p(AsParser(a_hParser));
+	p->DefineNameChars(a_szCharset);
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser,
-    const muChar_t* a_szCharset)
+
+API_EXPORT(void) mupDefineOprtChars(muParserHandle_t a_hParser,	const muChar_t* a_szCharset)
 {
-    muParser_t* const p(AsParser(a_hParser));
-    p->DefineOprtChars(a_szCharset);
+	muParser_t* const p(AsParser(a_hParser));
+	p->DefineOprtChars(a_szCharset);
 }
 
-//---------------------------------------------------------------------------
-API_EXPORT(void) mupDefineInfixOprtChars(muParserHandle_t a_hParser,
-    const muChar_t *a_szCharset)
+
+API_EXPORT(void) mupDefineInfixOprtChars(muParserHandle_t a_hParser, const muChar_t* a_szCharset)
 {
-    muParser_t* const p(AsParser(a_hParser));
-    p->DefineInfixOprtChars(a_szCharset);
+	muParser_t* const p(AsParser(a_hParser));
+	p->DefineInfixOprtChars(a_szCharset);
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Get the number of variables defined in the parser.
-    \param a_hParser [in] Must be a valid parser handle.
-    \return The number of used variables.
-    \sa mupGetExprVar
-    */
+	\param a_hParser [in] Must be a valid parser handle.
+	\return The number of used variables.
+	\sa mupGetExprVar
+*/
 API_EXPORT(int) mupGetVarNum(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    const mu::varmap_type VarMap = p->GetVar();
-    return (int)VarMap.size();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		const mu::varmap_type VarMap = p->GetVar();
+		return (int)VarMap.size();
+	MU_CATCH
 
-        return 0; // never reached
+	return 0; // never reached
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Return a variable that is used in an expression.
-    \param a_hParser [in] A valid parser handle.
-    \param a_iVar [in] The index of the variable to return.
-    \param a_szName [out] Pointer to the variable name.
-    \param a_pVar [out] Pointer to the variable.
-    \throw nothrow
-
-    Prior to calling this function call mupGetExprVarNum in order to get the
-    number of variables in the expression. If the parameter a_iVar is greater
-    than the number of variables both a_szName and a_pVar will be set to zero.
-    As a side effect this function will trigger an internal calculation of the
-    expression undefined variables will be set to zero during this calculation.
-    During the calculation user defined callback functions present in the expression
-    will be called, this is unavoidable.
-    */
-API_EXPORT(void) mupGetVar(muParserHandle_t a_hParser,
-    unsigned a_iVar,
-    const muChar_t **a_szName,
-    muFloat_t **a_pVar)
-{
-    // A static buffer is needed for the name since i can't return the
-    // pointer from the map.
-    static muChar_t  szName[1024];
-
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    const mu::varmap_type VarMap = p->GetVar();
-
-    if (a_iVar >= VarMap.size())
-    {
-        *a_szName = 0;
-        *a_pVar = 0;
-        return;
-    }
-    mu::varmap_type::const_iterator item;
-
-    item = VarMap.begin();
-    for (unsigned i = 0; i < a_iVar; ++i)
-        ++item;
+	\param a_hParser [in] A valid parser handle.
+	\param a_iVar [in] The index of the variable to return.
+	\param a_szName [out] Pointer to the variable name.
+	\param a_pVar [out] Pointer to the variable.
+	\throw nothrow
+
+	Prior to calling this function call mupGetExprVarNum in order to get the
+	number of variables in the expression. If the parameter a_iVar is greater
+	than the number of variables both a_szName and a_pVar will be set to zero.
+	As a side effect this function will trigger an internal calculation of the
+	expression undefined variables will be set to zero during this calculation.
+	During the calculation user defined callback functions present in the expression
+	will be called, this is unavoidable.
+*/
+API_EXPORT(void) mupGetVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_szName, muFloat_t** a_pVar)
+{
+	// A static buffer is needed for the name since i can't return the
+	// pointer from the map.
+	static muChar_t  szName[1024];
+
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		const mu::varmap_type VarMap = p->GetVar();
+
+		if (a_iVar >= VarMap.size())
+		{
+			*a_szName = 0;
+			*a_pVar = 0;
+			return;
+		}
+		mu::varmap_type::const_iterator item;
+
+		item = VarMap.begin();
+		for (unsigned i = 0; i < a_iVar; ++i)
+			++item;
 
 #ifndef _UNICODE
-    strncpy(szName, item->first.c_str(), sizeof(szName));
+		strncpy(szName, item->first.c_str(), count_of(szName));
 #else
-    wcsncpy(szName, item->first.c_str(), sizeof(szName));
+		wcsncpy(szName, item->first.c_str(), count_of(szName));
 #endif
 
-    szName[sizeof(szName)-1] = 0;
+		szName[count_of(szName) - 1] = 0;
 
-    *a_szName = &szName[0];
-    *a_pVar = item->second;
-    return;
+		*a_szName = &szName[0];
+		*a_pVar = item->second;
+		return;
+	MU_CATCH
 
-    MU_CATCH
-
-        *a_szName = 0;
-    *a_pVar = 0;
+	* a_szName = 0;
+	*a_pVar = 0;
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Get the number of variables used in the expression currently set in the parser.
-    \param a_hParser [in] Must be a valid parser handle.
-    \return The number of used variables.
-    \sa mupGetExprVar
-    */
+	\param a_hParser [in] Must be a valid parser handle.
+	\return The number of used variables.
+	\sa mupGetExprVar
+	*/
 API_EXPORT(int) mupGetExprVarNum(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    const mu::varmap_type VarMap = p->GetUsedVar();
-    return (int)VarMap.size();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		const mu::varmap_type VarMap = p->GetUsedVar();
+		return (int)VarMap.size();
+	MU_CATCH
 
-        return 0; // never reached
+	return 0; // never reached
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Return a variable that is used in an expression.
 
-    Prior to calling this function call mupGetExprVarNum in order to get the
-    number of variables in the expression. If the parameter a_iVar is greater
-    than the number of variables both a_szName and a_pVar will be set to zero.
-    As a side effect this function will trigger an internal calculation of the
-    expression undefined variables will be set to zero during this calculation.
-    During the calculation user defined callback functions present in the expression
-    will be called, this is unavoidable.
-
-    \param a_hParser [in] A valid parser handle.
-    \param a_iVar [in] The index of the variable to return.
-    \param a_szName [out] Pointer to the variable name.
-    \param a_pVar [out] Pointer to the variable.
-    \throw nothrow
-    */
-API_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser,
-    unsigned a_iVar,
-    const muChar_t **a_szName,
-    muFloat_t **a_pVar)
-{
-    // A static buffer is needed for the name since i can't return the
-    // pointer from the map.
-    static muChar_t  szName[1024];
-
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    const mu::varmap_type VarMap = p->GetUsedVar();
-
-    if (a_iVar >= VarMap.size())
-    {
-        *a_szName = 0;
-        *a_pVar = 0;
-        return;
-    }
-    mu::varmap_type::const_iterator item;
-
-    item = VarMap.begin();
-    for (unsigned i = 0; i < a_iVar; ++i)
-        ++item;
+	Prior to calling this function call mupGetExprVarNum in order to get the
+	number of variables in the expression. If the parameter a_iVar is greater
+	than the number of variables both a_szName and a_pVar will be set to zero.
+	As a side effect this function will trigger an internal calculation of the
+	expression undefined variables will be set to zero during this calculation.
+	During the calculation user defined callback functions present in the expression
+	will be called, this is unavoidable.
+
+	\param a_hParser [in] A valid parser handle.
+	\param a_iVar [in] The index of the variable to return.
+	\param a_szName [out] Pointer to the variable name.
+	\param a_pVar [out] Pointer to the variable.
+	\throw nothrow
+*/
+API_EXPORT(void) mupGetExprVar(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_szName, muFloat_t** a_pVar)
+{
+	// A static buffer is needed for the name since i can't return the
+	// pointer from the map.
+	static muChar_t  szName[1024];
+
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		const mu::varmap_type VarMap = p->GetUsedVar();
+
+		if (a_iVar >= VarMap.size())
+		{
+			*a_szName = 0;
+			*a_pVar = 0;
+			return;
+		}
+		mu::varmap_type::const_iterator item;
+
+		item = VarMap.begin();
+		for (unsigned i = 0; i < a_iVar; ++i)
+			++item;
 
 #ifndef _UNICODE
-    strncpy(szName, item->first.c_str(), sizeof(szName));
+		strncpy(szName, item->first.c_str(), count_of(szName));
 #else
-    wcsncpy(szName, item->first.c_str(), sizeof(szName));
+		wcsncpy(szName, item->first.c_str(), count_of(szName));
 #endif
 
-    szName[sizeof(szName)-1] = 0;
-
-    *a_szName = &szName[0];
-    *a_pVar = item->second;
-    return;
+		szName[count_of(szName) - 1] = 0;
 
-    MU_CATCH
+		*a_szName = &szName[0];
+		*a_pVar = item->second;
+		return;
+	MU_CATCH
 
-        *a_szName = 0;
-    *a_pVar = 0;
+	* a_szName = 0;
+	*a_pVar = 0;
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Return the number of constants defined in a parser. */
 API_EXPORT(int) mupGetConstNum(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    const mu::valmap_type ValMap = p->GetConst();
-    return (int)ValMap.size();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		const mu::valmap_type ValMap = p->GetConst();
+		return (int)ValMap.size();
+	MU_CATCH
 
-        return 0; // never reached
+	return 0; // never reached
 }
 
-//-----------------------------------------------------------------------------------------------------
+
 API_EXPORT(void) mupSetArgSep(muParserHandle_t a_hParser, const muChar_t cArgSep)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->SetArgSep(cArgSep);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->SetArgSep(cArgSep);
+	MU_CATCH
 }
 
-//-----------------------------------------------------------------------------------------------------
+
 API_EXPORT(void) mupResetLocale(muParserHandle_t a_hParser)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->ResetLocale();
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->ResetLocale();
+	MU_CATCH
 }
 
-//-----------------------------------------------------------------------------------------------------
+
 API_EXPORT(void) mupSetDecSep(muParserHandle_t a_hParser, const muChar_t cDecSep)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->SetDecSep(cDecSep);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+	p->SetDecSep(cDecSep);
+	MU_CATCH
 }
 
-//-----------------------------------------------------------------------------------------------------
+
 API_EXPORT(void) mupSetThousandsSep(muParserHandle_t a_hParser, const muChar_t cThousandsSep)
 {
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    p->SetThousandsSep(cThousandsSep);
-    MU_CATCH
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		p->SetThousandsSep(cThousandsSep);
+	MU_CATCH
 }
 
 //---------------------------------------------------------------------------
 /** \brief Retrieve name and value of a single parser constant.
-    \param a_hParser [in] a valid parser handle
-    \param a_iVar [in] Index of the constant to query
-    \param a_pszName [out] pointer to a null terminated string with the constant name
-    \param [out] The constant value
-    */
-API_EXPORT(void) mupGetConst(muParserHandle_t a_hParser,
-    unsigned a_iVar,
-    const muChar_t **a_pszName,
-    muFloat_t *a_fVal)
-{
-    // A static buffer is needed for the name since i can't return the
-    // pointer from the map.
-    static muChar_t szName[1024];
-
-    MU_TRY
-        muParser_t* const p(AsParser(a_hParser));
-    const mu::valmap_type ValMap = p->GetConst();
-
-    if (a_iVar >= ValMap.size())
-    {
-        *a_pszName = 0;
-        *a_fVal = 0;
-        return;
-    }
-
-    mu::valmap_type::const_iterator item;
-    item = ValMap.begin();
-    for (unsigned i = 0; i < a_iVar; ++i)
-        ++item;
+	\param a_hParser [in] a valid parser handle
+	\param a_iVar [in] Index of the constant to query
+	\param a_pszName [out] pointer to a null terminated string with the constant name
+	\param [out] The constant value
+	*/
+API_EXPORT(void) mupGetConst(muParserHandle_t a_hParser, unsigned a_iVar, const muChar_t** a_pszName, muFloat_t* a_fVal)
+{
+	// A static buffer is needed for the name since i can't return the
+	// pointer from the map.
+	static muChar_t szName[1024];
+
+	MU_TRY
+		muParser_t* const p(AsParser(a_hParser));
+		const mu::valmap_type ValMap = p->GetConst();
+
+		if (a_iVar >= ValMap.size())
+		{
+			*a_pszName = 0;
+			*a_fVal = 0;
+			return;
+		}
+
+		mu::valmap_type::const_iterator item;
+		item = ValMap.begin();
+		for (unsigned i = 0; i < a_iVar; ++i)
+			++item;
 
 #ifndef _UNICODE
-    strncpy(szName, item->first.c_str(), sizeof(szName));
+		strncpy(szName, item->first.c_str(), count_of(szName));
 #else
-    wcsncpy(szName, item->first.c_str(), sizeof(szName));
+		wcsncpy(szName, item->first.c_str(), count_of(szName));
 #endif
 
-    szName[sizeof(szName)-1] = 0;
+		szName[count_of(szName) - 1] = 0;
 
-    *a_pszName = &szName[0];
-    *a_fVal = item->second;
-    return;
+		*a_pszName = &szName[0];
+		*a_fVal = item->second;
+		return;
 
-    MU_CATCH
+	MU_CATCH
 
-        *a_pszName = 0;
-    *a_fVal = 0;
+	* a_pszName = 0;
+	*a_fVal = 0;
 }
 
-//---------------------------------------------------------------------------
-/** \brief Add a custom value recognition function.
-*/
-API_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser,
-    muIdentFun_t a_pFun)
+
+/** \brief Add a custom value recognition function. */
+API_EXPORT(void) mupAddValIdent(muParserHandle_t a_hParser,	muIdentFun_t a_pFun)
 {
-    MU_TRY
-        muParser_t* p(AsParser(a_hParser));
-    p->AddValIdent(a_pFun);
-    MU_CATCH
+	MU_TRY
+		muParser_t* p(AsParser(a_hParser));
+		p->AddValIdent(a_pFun);
+	MU_CATCH
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Query if an error occurred.
 
-    After querying the internal error bit will be reset. So a consecutive call
-    will return false.
-    */
+	After querying the internal error bit will be reset. So a consecutive call
+	will return false.
+*/
 API_EXPORT(muBool_t) mupError(muParserHandle_t a_hParser)
 {
-    bool bError(AsParserTag(a_hParser)->bError);
-    AsParserTag(a_hParser)->bError = false;
-    return bError;
+	bool bError(AsParserTag(a_hParser)->bError);
+	AsParserTag(a_hParser)->bError = false;
+	return bError;
 }
 
-//---------------------------------------------------------------------------
-/** \brief Reset the internal error flag.
-*/
+
+/** \brief Reset the internal error flag. */
 API_EXPORT(void) mupErrorReset(muParserHandle_t a_hParser)
 {
-    AsParserTag(a_hParser)->bError = false;
+	AsParserTag(a_hParser)->bError = false;
 }
 
-//---------------------------------------------------------------------------
+
 API_EXPORT(void) mupSetErrorHandler(muParserHandle_t a_hParser, muErrorHandler_t a_pHandler)
 {
-    AsParserTag(a_hParser)->errHandler = a_pHandler;
+	AsParserTag(a_hParser)->errHandler = a_pHandler;
 }
 
-//---------------------------------------------------------------------------
-/** \brief Return the message associated with the last error.
-*/
+
+/** \brief Return the message associated with the last error. */
 API_EXPORT(const muChar_t*) mupGetErrorMsg(muParserHandle_t a_hParser)
 {
-    ParserTag* const p(AsParserTag(a_hParser));
-    const muChar_t *pMsg = p->exc.GetMsg().c_str();
+	ParserTag* const p(AsParserTag(a_hParser));
+	const muChar_t* pMsg = p->exc.GetMsg().c_str();
 
-    // C# explodes when pMsg is returned directly. For some reason it can't access
-    // the memory where the message lies directly.
+	// C# explodes when pMsg is returned directly. For some reason it can't access
+	// the memory where the message lies directly.
 #ifndef _UNICODE
-    sprintf(s_tmpOutBuf, "%s", pMsg);
+	sprintf(s_tmpOutBuf, "%s", pMsg);
 #else
-    wsprintf(s_tmpOutBuf, _T("%s"), pMsg);
+	//wsprintf(s_tmpOutBuf, _T("%s"), pMsg);
+	swprintf(s_tmpOutBuf, count_of(s_tmpOutBuf), _T("%s"), pMsg);
 #endif
 
-    return s_tmpOutBuf;
+	return s_tmpOutBuf;
 }
 
-//---------------------------------------------------------------------------
-/** \brief Return the message associated with the last error.
-*/
+
+/** \brief Return the message associated with the last error. */
 API_EXPORT(const muChar_t*) mupGetErrorToken(muParserHandle_t a_hParser)
 {
-    ParserTag* const p(AsParserTag(a_hParser));
-    const muChar_t *pToken = p->exc.GetToken().c_str();
+	ParserTag* const p(AsParserTag(a_hParser));
+	const muChar_t* pToken = p->exc.GetToken().c_str();
 
-    // C# explodes when pMsg is returned directly. For some reason it can't access
-    // the memory where the message lies directly.
+	// C# explodes when pMsg is returned directly. For some reason it can't access
+	// the memory where the message lies directly.
 #ifndef _UNICODE
-    sprintf(s_tmpOutBuf, "%s", pToken);
+	sprintf(s_tmpOutBuf, "%s", pToken);
 #else
-    wsprintf(s_tmpOutBuf, _T("%s"), pToken);
+	//wsprintf(s_tmpOutBuf, _T("%s"), pToken);
+	swprintf(s_tmpOutBuf, count_of(s_tmpOutBuf), _T("%s"), pToken);
 #endif
 
-    return s_tmpOutBuf;
+	return s_tmpOutBuf;
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Return the code associated with the last error.
 */
 API_EXPORT(int) mupGetErrorCode(muParserHandle_t a_hParser)
 {
-    return AsParserTag(a_hParser)->exc.GetCode();
+	return AsParserTag(a_hParser)->exc.GetCode();
 }
 
-//---------------------------------------------------------------------------
+
 /** \brief Return the position associated with the last error. */
 API_EXPORT(int) mupGetErrorPos(muParserHandle_t a_hParser)
 {
-    return (int)AsParserTag(a_hParser)->exc.GetPos();
+	return (int)AsParserTag(a_hParser)->exc.GetPos();
 }
 
-////-----------------------------------------------------------------------------------------------------
-//API_EXPORT(const muChar_t*) mupGetErrorExpr(muParserHandle_t a_hParser)
-//{
-//  return AsParserTag(a_hParser)->exc.GetExpr().c_str();
-//}
 
-//-----------------------------------------------------------------------------------------------------
 API_EXPORT(muFloat_t*) mupCreateVar()
 {
-    return new muFloat_t(0);
+	return new muFloat_t(0);
 }
 
-//-----------------------------------------------------------------------------------------------------
-API_EXPORT(void) mupReleaseVar(muFloat_t *ptr)
+
+API_EXPORT(void) mupReleaseVar(muFloat_t* ptr)
 {
-    delete ptr;
+	delete ptr;
 }
 
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
+
 #endif      // MUPARSER_DLL
diff --git a/src/muParserError.cpp b/src/muParserError.cpp
index a140bd9..960e48a 100644
--- a/src/muParserError.cpp
+++ b/src/muParserError.cpp
@@ -1,319 +1,335 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
+
 #include "muParserError.h"
+#include <exception>
 
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) // MSVC wants to force me te use enum classes or bother me with pointless warnings
+#endif
 
 namespace mu
 {
-  //------------------------------------------------------------------------------
-  const ParserErrorMsg& ParserErrorMsg::Instance()
-  {
-    static const ParserErrorMsg instance;
-    return instance;
-  }
-
-  //------------------------------------------------------------------------------
-  string_type ParserErrorMsg::operator[](unsigned a_iIdx) const
-  {
-    return (a_iIdx<m_vErrMsg.size()) ? m_vErrMsg[a_iIdx] : string_type();
-  }
-
-  //---------------------------------------------------------------------------
-  ParserErrorMsg::ParserErrorMsg()
-    :m_vErrMsg(0)
-  {
-    m_vErrMsg.resize(ecCOUNT);
-
-    m_vErrMsg[ecUNASSIGNABLE_TOKEN]     = _T("Unexpected token \"$TOK$\" found at position $POS$.");
-    m_vErrMsg[ecINTERNAL_ERROR]         = _T("Internal error");
-    m_vErrMsg[ecINVALID_NAME]           = _T("Invalid function-, variable- or constant name: \"$TOK$\".");
-    m_vErrMsg[ecINVALID_BINOP_IDENT]    = _T("Invalid binary operator identifier: \"$TOK$\".");
-    m_vErrMsg[ecINVALID_INFIX_IDENT]    = _T("Invalid infix operator identifier: \"$TOK$\".");
-    m_vErrMsg[ecINVALID_POSTFIX_IDENT]  = _T("Invalid postfix operator identifier: \"$TOK$\".");
-    m_vErrMsg[ecINVALID_FUN_PTR]        = _T("Invalid pointer to callback function.");
-    m_vErrMsg[ecEMPTY_EXPRESSION]       = _T("Expression is empty.");
-    m_vErrMsg[ecINVALID_VAR_PTR]        = _T("Invalid pointer to variable.");
-    m_vErrMsg[ecUNEXPECTED_OPERATOR]    = _T("Unexpected operator \"$TOK$\" found at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_EOF]         = _T("Unexpected end of expression at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_ARG_SEP]     = _T("Unexpected argument separator at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_PARENS]      = _T("Unexpected parenthesis \"$TOK$\" at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_FUN]         = _T("Unexpected function \"$TOK$\" at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_VAL]         = _T("Unexpected value \"$TOK$\" found at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_VAR]         = _T("Unexpected variable \"$TOK$\" found at position $POS$");
-    m_vErrMsg[ecUNEXPECTED_ARG]         = _T("Function arguments used without a function (position: $POS$)");
-    m_vErrMsg[ecMISSING_PARENS]         = _T("Missing parenthesis");
-    m_vErrMsg[ecTOO_MANY_PARAMS]        = _T("Too many parameters for function \"$TOK$\" at expression position $POS$");
-    m_vErrMsg[ecTOO_FEW_PARAMS]         = _T("Too few parameters for function \"$TOK$\" at expression position $POS$");
-    m_vErrMsg[ecDIV_BY_ZERO]            = _T("Divide by zero");
-    m_vErrMsg[ecDOMAIN_ERROR]           = _T("Domain error");
-    m_vErrMsg[ecNAME_CONFLICT]          = _T("Name conflict");
-    m_vErrMsg[ecOPT_PRI]                = _T("Invalid value for operator priority (must be greater or equal to zero).");
-    m_vErrMsg[ecBUILTIN_OVERLOAD]       = _T("user defined binary operator \"$TOK$\" conflicts with a built in operator.");
-    m_vErrMsg[ecUNEXPECTED_STR]         = _T("Unexpected string token found at position $POS$.");
-    m_vErrMsg[ecUNTERMINATED_STRING]    = _T("Unterminated string starting at position $POS$.");
-    m_vErrMsg[ecSTRING_EXPECTED]        = _T("String function called with a non string type of argument.");
-    m_vErrMsg[ecVAL_EXPECTED]           = _T("String value used where a numerical argument is expected.");
-    m_vErrMsg[ecOPRT_TYPE_CONFLICT]     = _T("No suitable overload for operator \"$TOK$\" at position $POS$.");
-    m_vErrMsg[ecSTR_RESULT]             = _T("Function result is a string.");
-    m_vErrMsg[ecGENERIC]                = _T("Parser error.");
-    m_vErrMsg[ecLOCALE]                 = _T("Decimal separator is identic to function argument separator.");
-    m_vErrMsg[ecUNEXPECTED_CONDITIONAL] = _T("The \"$TOK$\" operator must be preceded by a closing bracket.");
-    m_vErrMsg[ecMISSING_ELSE_CLAUSE]    = _T("If-then-else operator is missing an else clause");
-    m_vErrMsg[ecMISPLACED_COLON]        = _T("Misplaced colon at position $POS$");
-    m_vErrMsg[ecUNREASONABLE_NUMBER_OF_COMPUTATIONS] = _T("Number of computations to small for bulk mode. (Vectorisation overhead too costly)");
-    
-    #if defined(_DEBUG)
-      for (int i=0; i<ecCOUNT; ++i)
-        if (!m_vErrMsg[i].length())
-          assert(false);
-    #endif
-  }
-
-  //---------------------------------------------------------------------------
-  //
-  //  ParserError class
-  //
-  //---------------------------------------------------------------------------
-
-  /** \brief Default constructor. */
-  ParserError::ParserError()
-    :m_strMsg()
-    ,m_strFormula()
-    ,m_strTok()
-    ,m_iPos(-1)
-    ,m_iErrc(ecUNDEFINED)
-    ,m_ErrMsg(ParserErrorMsg::Instance())
-  {
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief This Constructor is used for internal exceptions only. 
-      
-    It does not contain any information but the error code.
-  */
-  ParserError::ParserError(EErrorCodes a_iErrc) 
-    :m_strMsg()
-    ,m_strFormula()
-    ,m_strTok()
-    ,m_iPos(-1)
-    ,m_iErrc(a_iErrc)
-    ,m_ErrMsg(ParserErrorMsg::Instance())
-  {
-    m_strMsg = m_ErrMsg[m_iErrc];
-    stringstream_type stream;
-    stream << (int)m_iPos;
-    ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
-    ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Construct an error from a message text. */
-  ParserError::ParserError(const string_type &sMsg) 
-    :m_ErrMsg(ParserErrorMsg::Instance())
-  {
-    Reset();
-    m_strMsg = sMsg;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Construct an error object. 
-      \param [in] a_iErrc the error code.
-      \param [in] sTok The token string related to this error.
-      \param [in] sExpr The expression related to the error.
-      \param [in] a_iPos the position in the expression where the error occurred. 
-  */
-  ParserError::ParserError( EErrorCodes iErrc,
-                            const string_type &sTok,
-                            const string_type &sExpr,
-                            int iPos )
-    :m_strMsg()
-    ,m_strFormula(sExpr)
-    ,m_strTok(sTok)
-    ,m_iPos(iPos)
-    ,m_iErrc(iErrc)
-    ,m_ErrMsg(ParserErrorMsg::Instance())
-  {
-    m_strMsg = m_ErrMsg[m_iErrc];
-    stringstream_type stream;
-    stream << (int)m_iPos;
-    ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
-    ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Construct an error object. 
-      \param [in] iErrc the error code.
-      \param [in] iPos the position in the expression where the error occurred. 
-      \param [in] sTok The token string related to this error.
-  */
-  ParserError::ParserError(EErrorCodes iErrc, int iPos, const string_type &sTok) 
-    :m_strMsg()
-    ,m_strFormula()
-    ,m_strTok(sTok)
-    ,m_iPos(iPos)
-    ,m_iErrc(iErrc)
-    ,m_ErrMsg(ParserErrorMsg::Instance())
-  {
-    m_strMsg = m_ErrMsg[m_iErrc];
-    stringstream_type stream;
-    stream << (int)m_iPos;
-    ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
-    ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Construct an error object. 
-      \param [in] szMsg The error message text.
-      \param [in] iPos the position related to the error.
-      \param [in] sTok The token string related to this error.
-  */
-  ParserError::ParserError(const char_type *szMsg, int iPos, const string_type &sTok) 
-    :m_strMsg(szMsg)
-    ,m_strFormula()
-    ,m_strTok(sTok)
-    ,m_iPos(iPos)
-    ,m_iErrc(ecGENERIC)
-    ,m_ErrMsg(ParserErrorMsg::Instance())
-  {
-    stringstream_type stream;
-    stream << (int)m_iPos;
-    ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
-    ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Copy constructor. */
-  ParserError::ParserError(const ParserError &a_Obj)
-    :m_strMsg(a_Obj.m_strMsg)
-    ,m_strFormula(a_Obj.m_strFormula)
-    ,m_strTok(a_Obj.m_strTok)
-    ,m_iPos(a_Obj.m_iPos)
-    ,m_iErrc(a_Obj.m_iErrc)
-    ,m_ErrMsg(ParserErrorMsg::Instance())
-  {
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Assignment operator. */
-  ParserError& ParserError::operator=(const ParserError &a_Obj)
-  {
-    if (this==&a_Obj)
-      return *this;
-
-    m_strMsg = a_Obj.m_strMsg;
-    m_strFormula = a_Obj.m_strFormula;
-    m_strTok = a_Obj.m_strTok;
-    m_iPos = a_Obj.m_iPos;
-    m_iErrc = a_Obj.m_iErrc;
-    return *this;
-  }
-
-  //------------------------------------------------------------------------------
-  ParserError::~ParserError()
-  {}
-
-  //------------------------------------------------------------------------------
-  /** \brief Replace all occurrences of a substring with another string. 
-      \param strFind The string that shall be replaced.
-      \param strReplaceWith The string that should be inserted instead of strFind
-  */
-  void ParserError::ReplaceSubString( string_type &strSource,
-                                      const string_type &strFind,
-                                      const string_type &strReplaceWith)
-  {
-    string_type strResult;
-    string_type::size_type iPos(0), iNext(0);
-
-    for(;;)
-    {
-      iNext = strSource.find(strFind, iPos);
-      strResult.append(strSource, iPos, iNext-iPos);
-
-      if( iNext==string_type::npos )
-        break;
-
-      strResult.append(strReplaceWith);
-      iPos = iNext + strFind.length();
-    } 
-
-    strSource.swap(strResult);
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Reset the erro object. */
-  void ParserError::Reset()
-  {
-    m_strMsg = _T("");
-    m_strFormula = _T("");
-    m_strTok = _T("");
-    m_iPos = -1;
-    m_iErrc = ecUNDEFINED;
-  }
-      
-  //------------------------------------------------------------------------------
-  /** \brief Set the expression related to this error. */
-  void ParserError::SetFormula(const string_type &a_strFormula)
-  {
-    m_strFormula = a_strFormula;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief gets the expression related tp this error.*/
-  const string_type& ParserError::GetExpr() const 
-  {
-    return m_strFormula;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Returns the message string for this error. */
-  const string_type& ParserError::GetMsg() const
-  {
-    return m_strMsg;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Return the formula position related to the error. 
-
-    If the error is not related to a distinct position this will return -1
-  */
-  int ParserError::GetPos() const
-  {
-    return m_iPos;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Return string related with this token (if available). */
-  const string_type& ParserError::GetToken() const
-  {
-    return m_strTok;
-  }
-
-  //------------------------------------------------------------------------------
-  /** \brief Return the error code. */
-  EErrorCodes ParserError::GetCode() const
-  {
-    return m_iErrc;
-  }
+	//------------------------------------------------------------------------------
+	const ParserErrorMsg& ParserErrorMsg::Instance()
+	{
+		static const ParserErrorMsg instance;
+		return instance;
+	}
+
+	//------------------------------------------------------------------------------
+	string_type ParserErrorMsg::operator[](unsigned a_iIdx) const
+	{
+		return (a_iIdx < m_vErrMsg.size()) ? m_vErrMsg[a_iIdx] : string_type();
+	}
+
+	//---------------------------------------------------------------------------
+	ParserErrorMsg::ParserErrorMsg()
+		:m_vErrMsg(0)
+	{
+		m_vErrMsg.resize(ecCOUNT);
+
+		m_vErrMsg[ecUNASSIGNABLE_TOKEN] = _T("Unexpected token \"$TOK$\" found at position $POS$.");
+		m_vErrMsg[ecINTERNAL_ERROR] = _T("Internal error");
+		m_vErrMsg[ecINVALID_NAME] = _T("Invalid function-, variable- or constant name: \"$TOK$\".");
+		m_vErrMsg[ecINVALID_BINOP_IDENT] = _T("Invalid binary operator identifier: \"$TOK$\".");
+		m_vErrMsg[ecINVALID_INFIX_IDENT] = _T("Invalid infix operator identifier: \"$TOK$\".");
+		m_vErrMsg[ecINVALID_POSTFIX_IDENT] = _T("Invalid postfix operator identifier: \"$TOK$\".");
+		m_vErrMsg[ecINVALID_FUN_PTR] = _T("Invalid pointer to callback function.");
+		m_vErrMsg[ecEMPTY_EXPRESSION] = _T("Expression is empty.");
+		m_vErrMsg[ecINVALID_VAR_PTR] = _T("Invalid pointer to variable.");
+		m_vErrMsg[ecUNEXPECTED_OPERATOR] = _T("Unexpected operator \"$TOK$\" found at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_EOF] = _T("Unexpected end of expression at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_ARG_SEP] = _T("Unexpected argument separator at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_PARENS] = _T("Unexpected parenthesis \"$TOK$\" at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_FUN] = _T("Unexpected function \"$TOK$\" at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_VAL] = _T("Unexpected value \"$TOK$\" found at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_VAR] = _T("Unexpected variable \"$TOK$\" found at position $POS$");
+		m_vErrMsg[ecUNEXPECTED_ARG] = _T("Function arguments used without a function (position: $POS$)");
+		m_vErrMsg[ecMISSING_PARENS] = _T("Missing parenthesis");
+		m_vErrMsg[ecTOO_MANY_PARAMS] = _T("Too many parameters for function \"$TOK$\" at expression position $POS$");
+		m_vErrMsg[ecTOO_FEW_PARAMS] = _T("Too few parameters for function \"$TOK$\" at expression position $POS$");
+		m_vErrMsg[ecDIV_BY_ZERO] = _T("Divide by zero");
+		m_vErrMsg[ecDOMAIN_ERROR] = _T("Domain error");
+		m_vErrMsg[ecNAME_CONFLICT] = _T("Name conflict");
+		m_vErrMsg[ecOPT_PRI] = _T("Invalid value for operator priority (must be greater or equal to zero).");
+		m_vErrMsg[ecBUILTIN_OVERLOAD] = _T("user defined binary operator \"$TOK$\" conflicts with a built in operator.");
+		m_vErrMsg[ecUNEXPECTED_STR] = _T("Unexpected string token found at position $POS$.");
+		m_vErrMsg[ecUNTERMINATED_STRING] = _T("Unterminated string starting at position $POS$.");
+		m_vErrMsg[ecSTRING_EXPECTED] = _T("String function called with a non string type of argument.");
+		m_vErrMsg[ecVAL_EXPECTED] = _T("String value used where a numerical argument is expected.");
+		m_vErrMsg[ecOPRT_TYPE_CONFLICT] = _T("No suitable overload for operator \"$TOK$\" at position $POS$.");
+		m_vErrMsg[ecSTR_RESULT] = _T("Strings must only be used as function arguments!");
+		m_vErrMsg[ecGENERIC] = _T("Parser error.");
+		m_vErrMsg[ecLOCALE] = _T("Decimal separator is identic to function argument separator.");
+		m_vErrMsg[ecUNEXPECTED_CONDITIONAL] = _T("The \"$TOK$\" operator must be preceded by a closing bracket.");
+		m_vErrMsg[ecMISSING_ELSE_CLAUSE] = _T("If-then-else operator is missing an else clause");
+		m_vErrMsg[ecMISPLACED_COLON] = _T("Misplaced colon at position $POS$");
+		m_vErrMsg[ecUNREASONABLE_NUMBER_OF_COMPUTATIONS] = _T("Number of computations to small for bulk mode. (Vectorisation overhead too costly)");
+		m_vErrMsg[ecIDENTIFIER_TOO_LONG] = _T("Identifier too long.");
+		m_vErrMsg[ecEXPRESSION_TOO_LONG] = _T("Expression too long.");
+		m_vErrMsg[ecINVALID_CHARACTERS_FOUND] = _T("Invalid non printable characters found in expression/identifer!");
+
+		for (int i = 0; i < ecCOUNT; ++i)
+		{
+			if (!m_vErrMsg[i].length())
+				throw std::runtime_error("Error definitions are incomplete!");
+		}
+	}
+
+	//---------------------------------------------------------------------------
+	//
+	//  ParserError class
+	//
+	//---------------------------------------------------------------------------
+
+	/** \brief Default constructor. */
+	ParserError::ParserError()
+		:m_strMsg()
+		, m_strFormula()
+		, m_strTok()
+		, m_iPos(-1)
+		, m_iErrc(ecUNDEFINED)
+		, m_ErrMsg(ParserErrorMsg::Instance())
+	{
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief This Constructor is used for internal exceptions only.
+
+	  It does not contain any information but the error code.
+	*/
+	ParserError::ParserError(EErrorCodes a_iErrc)
+		:m_strMsg()
+		, m_strFormula()
+		, m_strTok()
+		, m_iPos(-1)
+		, m_iErrc(a_iErrc)
+		, m_ErrMsg(ParserErrorMsg::Instance())
+	{
+		m_strMsg = m_ErrMsg[m_iErrc];
+		stringstream_type stream;
+		stream << (int)m_iPos;
+		ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
+		ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Construct an error from a message text. */
+	ParserError::ParserError(const string_type& sMsg)
+		:m_ErrMsg(ParserErrorMsg::Instance())
+	{
+		Reset();
+		m_strMsg = sMsg;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Construct an error object.
+		\param [in] a_iErrc the error code.
+		\param [in] sTok The token string related to this error.
+		\param [in] sExpr The expression related to the error.
+		\param [in] a_iPos the position in the expression where the error occurred.
+	*/
+	ParserError::ParserError(EErrorCodes iErrc,
+		const string_type& sTok,
+		const string_type& sExpr,
+		int iPos)
+		:m_strMsg()
+		, m_strFormula(sExpr)
+		, m_strTok(sTok)
+		, m_iPos(iPos)
+		, m_iErrc(iErrc)
+		, m_ErrMsg(ParserErrorMsg::Instance())
+	{
+		m_strMsg = m_ErrMsg[m_iErrc];
+		stringstream_type stream;
+		stream << (int)m_iPos;
+		ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
+		ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Construct an error object.
+		\param [in] iErrc the error code.
+		\param [in] iPos the position in the expression where the error occurred.
+		\param [in] sTok The token string related to this error.
+	*/
+	ParserError::ParserError(EErrorCodes iErrc, int iPos, const string_type& sTok)
+		:m_strMsg()
+		, m_strFormula()
+		, m_strTok(sTok)
+		, m_iPos(iPos)
+		, m_iErrc(iErrc)
+		, m_ErrMsg(ParserErrorMsg::Instance())
+	{
+		m_strMsg = m_ErrMsg[m_iErrc];
+		stringstream_type stream;
+		stream << (int)m_iPos;
+		ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
+		ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Construct an error object.
+		\param [in] szMsg The error message text.
+		\param [in] iPos the position related to the error.
+		\param [in] sTok The token string related to this error.
+	*/
+	ParserError::ParserError(const char_type* szMsg, int iPos, const string_type& sTok)
+		:m_strMsg(szMsg)
+		, m_strFormula()
+		, m_strTok(sTok)
+		, m_iPos(iPos)
+		, m_iErrc(ecGENERIC)
+		, m_ErrMsg(ParserErrorMsg::Instance())
+	{
+		stringstream_type stream;
+		stream << (int)m_iPos;
+		ReplaceSubString(m_strMsg, _T("$POS$"), stream.str());
+		ReplaceSubString(m_strMsg, _T("$TOK$"), m_strTok);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Copy constructor. */
+	ParserError::ParserError(const ParserError& a_Obj)
+		:m_strMsg(a_Obj.m_strMsg)
+		, m_strFormula(a_Obj.m_strFormula)
+		, m_strTok(a_Obj.m_strTok)
+		, m_iPos(a_Obj.m_iPos)
+		, m_iErrc(a_Obj.m_iErrc)
+		, m_ErrMsg(ParserErrorMsg::Instance())
+	{
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Assignment operator. */
+	ParserError& ParserError::operator=(const ParserError& a_Obj)
+	{
+		if (this == &a_Obj)
+			return *this;
+
+		m_strMsg = a_Obj.m_strMsg;
+		m_strFormula = a_Obj.m_strFormula;
+		m_strTok = a_Obj.m_strTok;
+		m_iPos = a_Obj.m_iPos;
+		m_iErrc = a_Obj.m_iErrc;
+		return *this;
+	}
+
+	//------------------------------------------------------------------------------
+	ParserError::~ParserError()
+	{}
+
+	//------------------------------------------------------------------------------
+	/** \brief Replace all occurrences of a substring with another string.
+		\param strFind The string that shall be replaced.
+		\param strReplaceWith The string that should be inserted instead of strFind
+	*/
+	void ParserError::ReplaceSubString(string_type& strSource,
+		const string_type& strFind,
+		const string_type& strReplaceWith)
+	{
+		string_type strResult;
+		string_type::size_type iPos(0), iNext(0);
+
+		for (;;)
+		{
+			iNext = strSource.find(strFind, iPos);
+			strResult.append(strSource, iPos, iNext - iPos);
+
+			if (iNext == string_type::npos)
+				break;
+
+			strResult.append(strReplaceWith);
+			iPos = iNext + strFind.length();
+		}
+
+		strSource.swap(strResult);
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Reset the error object. */
+	void ParserError::Reset()
+	{
+		m_strMsg = _T("");
+		m_strFormula = _T("");
+		m_strTok = _T("");
+		m_iPos = -1;
+		m_iErrc = ecUNDEFINED;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Set the expression related to this error. */
+	void ParserError::SetFormula(const string_type& a_strFormula)
+	{
+		m_strFormula = a_strFormula;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief gets the expression related tp this error.*/
+	const string_type& ParserError::GetExpr() const
+	{
+		return m_strFormula;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Returns the message string for this error. */
+	const string_type& ParserError::GetMsg() const
+	{
+		return m_strMsg;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Return the formula position related to the error.
+
+	  If the error is not related to a distinct position this will return -1
+	*/
+	int ParserError::GetPos() const
+	{
+		return m_iPos;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Return string related with this token (if available). */
+	const string_type& ParserError::GetToken() const
+	{
+		return m_strTok;
+	}
+
+	//------------------------------------------------------------------------------
+	/** \brief Return the error code. */
+	EErrorCodes ParserError::GetCode() const
+	{
+		return m_iErrc;
+	}
 } // namespace mu
+
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
diff --git a/src/muParserInt.cpp b/src/muParserInt.cpp
index d3c2dec..76189e9 100644
--- a/src/muParserInt.cpp
+++ b/src/muParserInt.cpp
@@ -1,26 +1,29 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2011 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "muParserInt.h"
@@ -32,249 +35,245 @@
 using namespace std;
 
 /** \file
-    \brief Implementation of a parser using integer value.
+	\brief Implementation of a parser using integer value.
 */
 
 /** \brief Namespace for mathematical applications. */
 namespace mu
 {
-value_type ParserInt::Abs(value_type v)  { return (value_type)Round(fabs((double)v)); }
-value_type ParserInt::Sign(value_type v) { return (Round(v)<0) ? -1 : (Round(v)>0) ? 1 : 0; }
-value_type ParserInt::Ite(value_type v1, 
-                          value_type v2, 
-                          value_type v3) { return (Round(v1)==1) ? Round(v2) : Round(v3); }
-value_type ParserInt::Add(value_type v1, value_type v2) { return Round(v1)  + Round(v2); }
-value_type ParserInt::Sub(value_type v1, value_type v2) { return Round(v1)  - Round(v2); }
-value_type ParserInt::Mul(value_type v1, value_type v2) { return Round(v1)  * Round(v2); }
-value_type ParserInt::Div(value_type v1, value_type v2) { return Round(v1)  / Round(v2); }
-value_type ParserInt::Mod(value_type v1, value_type v2) { return Round(v1)  % Round(v2); }
-value_type ParserInt::Shr(value_type v1, value_type v2) { return Round(v1) >> Round(v2); }
-value_type ParserInt::Shl(value_type v1, value_type v2) { return Round(v1) << Round(v2); }
-value_type ParserInt::LogAnd(value_type v1, value_type v2) { return Round(v1) & Round(v2); }
-value_type ParserInt::LogOr(value_type v1, value_type v2)  { return Round(v1) | Round(v2); }
-value_type ParserInt::And(value_type v1, value_type v2) { return Round(v1) && Round(v2); }
-value_type ParserInt::Or(value_type v1, value_type v2)  { return Round(v1) || Round(v2); }
-value_type ParserInt::Less(value_type v1, value_type v2)      { return Round(v1)  < Round(v2); }
-value_type ParserInt::Greater(value_type v1, value_type v2)   { return Round(v1)  > Round(v2); }
-value_type ParserInt::LessEq(value_type v1, value_type v2)    { return Round(v1) <= Round(v2); }
-value_type ParserInt::GreaterEq(value_type v1, value_type v2) { return Round(v1) >= Round(v2); }
-value_type ParserInt::Equal(value_type v1, value_type v2)     { return Round(v1) == Round(v2); }
-value_type ParserInt::NotEqual(value_type v1, value_type v2)  { return Round(v1) != Round(v2); }
-value_type ParserInt::Not(value_type v) { return !Round(v); }
-
-value_type ParserInt::Pow(value_type v1, value_type v2) 
-{ 
-  return std::pow((double)Round(v1), (double)Round(v2)); 
-}
-
-//---------------------------------------------------------------------------
-// Unary operator Callbacks: Infix operators
-value_type ParserInt::UnaryMinus(value_type v) 
-{ 
-  return -Round(v); 
-}
-
-//---------------------------------------------------------------------------
-value_type ParserInt::Sum(const value_type* a_afArg, int a_iArgc)
-{ 
-  if (!a_iArgc)	
-    throw ParserError(_T("too few arguments for function sum."));
-
-  value_type fRes=0;
-  for (int i=0; i<a_iArgc; ++i) 
-    fRes += a_afArg[i];
-
-  return fRes;
-}
-
-//---------------------------------------------------------------------------
-value_type ParserInt::Min(const value_type* a_afArg, int a_iArgc)
-{ 
-  if (!a_iArgc)	
-    throw ParserError( _T("too few arguments for function min.") );
-
-  value_type fRes=a_afArg[0];
-  for (int i=0; i<a_iArgc; ++i) 
-    fRes = std::min(fRes, a_afArg[i]);
-
-  return fRes;
-}
-
-//---------------------------------------------------------------------------
-value_type ParserInt::Max(const value_type* a_afArg, int a_iArgc)
-{ 
-  if (!a_iArgc)	
-    throw ParserError(_T("too few arguments for function min."));
-
-  value_type fRes=a_afArg[0];
-  for (int i=0; i<a_iArgc; ++i) 
-    fRes = std::max(fRes, a_afArg[i]);
-
-  return fRes;
-}
-
-//---------------------------------------------------------------------------
-// Default value recognition callback
-int ParserInt::IsVal(const char_type *a_szExpr, int *a_iPos, value_type *a_fVal)
-{
-  string_type buf(a_szExpr);
-  std::size_t pos = buf.find_first_not_of(_T("0123456789"));
-
-  if (pos==std::string::npos)
-    return 0;
-
-  stringstream_type stream( buf.substr(0, pos ) );
-  int iVal(0);
-
-  stream >> iVal;
-  if (stream.fail())
-    return 0;
-      
-  stringstream_type::pos_type iEnd = stream.tellg();   // Position after reading
-  if (stream.fail())
-    iEnd = stream.str().length();  
-
-  if (iEnd==(stringstream_type::pos_type)-1)
-    return 0;
-
-  *a_iPos += (int)iEnd;
-  *a_fVal = (value_type)iVal;
-  return 1;
-}
-
-//---------------------------------------------------------------------------
-/** \brief Check a given position in the expression for the presence of 
-           a hex value. 
-    \param a_szExpr Pointer to the expression string
-    \param [in/out] a_iPos Pointer to an integer value holding the current parsing 
-           position in the expression.
-    \param [out] a_fVal Pointer to the position where the detected value shall be stored.
-
-  Hey values must be prefixed with "0x" in order to be detected properly.
-*/
-int ParserInt::IsHexVal(const char_type *a_szExpr, int *a_iPos, value_type *a_fVal)
-{
-  if (a_szExpr[1]==0 || (a_szExpr[0]!='0' || a_szExpr[1]!='x') ) 
-    return 0;
+	value_type ParserInt::Abs(value_type v) { return (value_type)Round(fabs((double)v)); }
+	value_type ParserInt::Sign(value_type v) { return (Round(v) < 0) ? -1 : (Round(v) > 0) ? 1 : 0; }
+	value_type ParserInt::Ite(value_type v1, value_type v2,	value_type v3) { return (Round(v1) == 1) ? Round(v2) : Round(v3); }
+	value_type ParserInt::Add(value_type v1, value_type v2) { return Round(v1) + Round(v2); }
+	value_type ParserInt::Sub(value_type v1, value_type v2) { return Round(v1) - Round(v2); }
+	value_type ParserInt::Mul(value_type v1, value_type v2) { return Round(v1) * Round(v2); }
+	value_type ParserInt::Div(value_type v1, value_type v2) { return Round(v1) / Round(v2); }
+	value_type ParserInt::Mod(value_type v1, value_type v2) { return Round(v1) % Round(v2); }
+	value_type ParserInt::Shr(value_type v1, value_type v2) { return Round(v1) >> Round(v2); }
+	value_type ParserInt::Shl(value_type v1, value_type v2) { return Round(v1) << Round(v2); }
+	value_type ParserInt::LogAnd(value_type v1, value_type v2) { return Round(v1) & Round(v2); }
+	value_type ParserInt::LogOr(value_type v1, value_type v2) { return Round(v1) | Round(v2); }
+	value_type ParserInt::And(value_type v1, value_type v2) { return Round(v1) && Round(v2); }
+	value_type ParserInt::Or(value_type v1, value_type v2) { return Round(v1) || Round(v2); }
+	value_type ParserInt::Less(value_type v1, value_type v2) { return Round(v1) < Round(v2); }
+	value_type ParserInt::Greater(value_type v1, value_type v2) { return Round(v1) > Round(v2); }
+	value_type ParserInt::LessEq(value_type v1, value_type v2) { return Round(v1) <= Round(v2); }
+	value_type ParserInt::GreaterEq(value_type v1, value_type v2) { return Round(v1) >= Round(v2); }
+	value_type ParserInt::Equal(value_type v1, value_type v2) { return Round(v1) == Round(v2); }
+	value_type ParserInt::NotEqual(value_type v1, value_type v2) { return Round(v1) != Round(v2); }
+	value_type ParserInt::Not(value_type v) { return !Round(v); }
+
+	value_type ParserInt::Pow(value_type v1, value_type v2)
+	{
+		return std::pow((double)Round(v1), (double)Round(v2));
+	}
+
+
+	value_type ParserInt::UnaryMinus(value_type v)
+	{
+		return -Round(v);
+	}
+
+
+	value_type ParserInt::Sum(const value_type* a_afArg, int a_iArgc)
+	{
+		if (!a_iArgc)
+			throw ParserError(_T("too few arguments for function sum."));
+
+		value_type fRes = 0;
+		for (int i = 0; i < a_iArgc; ++i)
+			fRes += a_afArg[i];
+
+		return fRes;
+	}
+
 
-  unsigned iVal(0);
+	value_type ParserInt::Min(const value_type* a_afArg, int a_iArgc)
+	{
+		if (!a_iArgc)
+			throw ParserError(_T("too few arguments for function min."));
+
+		value_type fRes = a_afArg[0];
+		for (int i = 0; i < a_iArgc; ++i)
+			fRes = std::min(fRes, a_afArg[i]);
 
-  // New code based on streams for UNICODE compliance:
-  stringstream_type::pos_type nPos(0);
-  stringstream_type ss(a_szExpr + 2);
-  ss >> std::hex >> iVal;
-  nPos = ss.tellg();
+		return fRes;
+	}
 
-  if (nPos==(stringstream_type::pos_type)0)
-    return 1;
 
-  *a_iPos += (int)(2 + nPos);
-  *a_fVal = (value_type)iVal;
-  return 1;
-}
+	value_type ParserInt::Max(const value_type* a_afArg, int a_iArgc)
+	{
+		if (!a_iArgc)
+			throw ParserError(_T("too few arguments for function min."));
 
-//---------------------------------------------------------------------------
-int ParserInt::IsBinVal(const char_type *a_szExpr, int *a_iPos, value_type *a_fVal)
-{
-  if (a_szExpr[0]!='#') 
-    return 0;
+		value_type fRes = a_afArg[0];
+		for (int i = 0; i < a_iArgc; ++i)
+			fRes = std::max(fRes, a_afArg[i]);
+
+		return fRes;
+	}
 
-  unsigned iVal(0), 
-           iBits(sizeof(iVal)*8),
-           i(0);
 
-  for (i=0; (a_szExpr[i+1]=='0' || a_szExpr[i+1]=='1') && i<iBits; ++i)
-    iVal |= (int)(a_szExpr[i+1]=='1') << ((iBits-1)-i);
+	int ParserInt::IsVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
+	{
+		string_type buf(a_szExpr);
+		std::size_t pos = buf.find_first_not_of(_T("0123456789"));
 
-  if (i==0) 
-    return 0;
+		if (pos == std::string::npos)
+			return 0;
 
-  if (i==iBits)
-    throw exception_type(_T("Binary to integer conversion error (overflow)."));
+		stringstream_type stream(buf.substr(0, pos));
+		int iVal(0);
 
-  *a_fVal = (unsigned)(iVal >> (iBits-i) );
-  *a_iPos += i+1;
+		stream >> iVal;
+		if (stream.fail())
+			return 0;
 
-  return 1;
-}
+		stringstream_type::pos_type iEnd = stream.tellg();   // Position after reading
+		if (stream.fail())
+			iEnd = stream.str().length();
 
-//---------------------------------------------------------------------------
-/** \brief Constructor. 
+		if (iEnd == (stringstream_type::pos_type) - 1)
+			return 0;
 
-  Call ParserBase class constructor and trigger Function, Operator and Constant initialization.
-*/
-ParserInt::ParserInt()
-  :ParserBase()
-{
-  AddValIdent(IsVal);    // lowest priority
-  AddValIdent(IsBinVal);
-  AddValIdent(IsHexVal); // highest priority
+		*a_iPos += (int)iEnd;
+		*a_fVal = (value_type)iVal;
+		return 1;
+	}
 
-  InitCharSets();
-  InitFun();
-  InitOprt();
-}
 
-//---------------------------------------------------------------------------
-void ParserInt::InitConst()
-{
-}
+	/** \brief Check a given position in the expression for the presence of
+			   a hex value.
+		\param a_szExpr Pointer to the expression string
+		\param [in/out] a_iPos Pointer to an integer value holding the current parsing
+			   position in the expression.
+		\param [out] a_fVal Pointer to the position where the detected value shall be stored.
 
-//---------------------------------------------------------------------------
-void ParserInt::InitCharSets()
-{
-  DefineNameChars( _T("0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") );
-  DefineOprtChars( _T("+-*^/?<>=!%&|~'_") );
-  DefineInfixOprtChars( _T("/+-*^?<>=!%&|~'_") );
-}
-
-//---------------------------------------------------------------------------
-/** \brief Initialize the default functions. */
-void ParserInt::InitFun()
-{
-  DefineFun( _T("sign"), Sign);
-  DefineFun( _T("abs"), Abs);
-  DefineFun( _T("if"), Ite);
-  DefineFun( _T("sum"), Sum);
-  DefineFun( _T("min"), Min);
-  DefineFun( _T("max"), Max);
-}
-
-//---------------------------------------------------------------------------
-/** \brief Initialize operators. */
-void ParserInt::InitOprt()
-{
-  // disable all built in operators, not all of them useful for integer numbers
-  // (they don't do rounding of values)
-  EnableBuiltInOprt(false);
-
-  // Disable all built in operators, they won't work with integer numbers
-  // since they are designed for floating point numbers
-  DefineInfixOprt( _T("-"), UnaryMinus);
-  DefineInfixOprt( _T("!"), Not);
-
-  DefineOprt( _T("&"), LogAnd, prLOGIC);
-  DefineOprt( _T("|"), LogOr, prLOGIC);
-  DefineOprt( _T("&&"), And, prLOGIC);
-  DefineOprt( _T("||"), Or, prLOGIC);
-
-  DefineOprt( _T("<"), Less, prCMP);
-  DefineOprt( _T(">"), Greater, prCMP);
-  DefineOprt( _T("<="), LessEq, prCMP);
-  DefineOprt( _T(">="), GreaterEq, prCMP);
-  DefineOprt( _T("=="), Equal, prCMP);
-  DefineOprt( _T("!="), NotEqual, prCMP);
-
-  DefineOprt( _T("+"), Add, prADD_SUB);
-  DefineOprt( _T("-"), Sub, prADD_SUB);
-
-  DefineOprt( _T("*"), Mul, prMUL_DIV);
-  DefineOprt( _T("/"), Div, prMUL_DIV);
-  DefineOprt( _T("%"), Mod, prMUL_DIV);
-
-  DefineOprt( _T("^"), Pow, prPOW, oaRIGHT);
-  DefineOprt( _T(">>"), Shr, prMUL_DIV+1);
-  DefineOprt( _T("<<"), Shl, prMUL_DIV+1);
-}
+	  Hey values must be prefixed with "0x" in order to be detected properly.
+	*/
+	int ParserInt::IsHexVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
+	{
+		if (a_szExpr[1] == 0 || (a_szExpr[0] != '0' || a_szExpr[1] != 'x'))
+			return 0;
+
+		unsigned iVal(0);
+
+		// New code based on streams for UNICODE compliance:
+		stringstream_type::pos_type nPos(0);
+		stringstream_type ss(a_szExpr + 2);
+		ss >> std::hex >> iVal;
+		nPos = ss.tellg();
+
+		if (nPos == (stringstream_type::pos_type)0)
+			return 1;
+
+		*a_iPos += (int)(2 + nPos);
+		*a_fVal = (value_type)iVal;
+		return 1;
+	}
+
+
+	int ParserInt::IsBinVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
+	{
+		if (a_szExpr[0] != '#')
+			return 0;
+
+		unsigned iVal(0),
+			iBits(sizeof(iVal) * 8),
+			i(0);
+
+		for (i = 0; (a_szExpr[i + 1] == '0' || a_szExpr[i + 1] == '1') && i < iBits; ++i)
+			iVal |= (int)(a_szExpr[i + 1] == '1') << ((iBits - 1) - i);
+
+		if (i == 0)
+			return 0;
+
+		if (i == iBits)
+			throw exception_type(_T("Binary to integer conversion error (overflow)."));
+
+		*a_fVal = (unsigned)(iVal >> (iBits - i));
+		*a_iPos += i + 1;
+
+		return 1;
+	}
+
+
+	/** \brief Constructor.
+
+		Call ParserBase class constructor and trigger Function, Operator and Constant initialization.
+	*/
+	ParserInt::ParserInt()
+		:ParserBase()
+	{
+		AddValIdent(IsVal);    // lowest priority
+		AddValIdent(IsBinVal);
+		AddValIdent(IsHexVal); // highest priority
+
+		InitCharSets();
+		InitFun();
+		InitOprt();
+	}
+
+
+	void ParserInt::InitConst()
+	{
+	}
+
+
+	void ParserInt::InitCharSets()
+	{
+		DefineNameChars(_T("0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"));
+		DefineOprtChars(_T("+-*^/?<>=!%&|~'_"));
+		DefineInfixOprtChars(_T("/+-*^?<>=!%&|~'_"));
+	}
+
+
+	/** \brief Initialize the default functions. */
+	void ParserInt::InitFun()
+	{
+		DefineFun(_T("sign"), Sign);
+		DefineFun(_T("abs"), Abs);
+		DefineFun(_T("if"), Ite);
+		DefineFun(_T("sum"), Sum);
+		DefineFun(_T("min"), Min);
+		DefineFun(_T("max"), Max);
+	}
+
+
+	/** \brief Initialize operators. */
+	void ParserInt::InitOprt()
+	{
+		// disable all built in operators, not all of them useful for integer numbers
+		// (they don't do rounding of values)
+		EnableBuiltInOprt(false);
+
+		// Disable all built in operators, they won't work with integer numbers
+		// since they are designed for floating point numbers
+		DefineInfixOprt(_T("-"), UnaryMinus);
+		DefineInfixOprt(_T("!"), Not);
+
+		DefineOprt(_T("&"), LogAnd, prLOGIC);
+		DefineOprt(_T("|"), LogOr, prLOGIC);
+		DefineOprt(_T("&&"), And, prLOGIC);
+		DefineOprt(_T("||"), Or, prLOGIC);
+
+		DefineOprt(_T("<"), Less, prCMP);
+		DefineOprt(_T(">"), Greater, prCMP);
+		DefineOprt(_T("<="), LessEq, prCMP);
+		DefineOprt(_T(">="), GreaterEq, prCMP);
+		DefineOprt(_T("=="), Equal, prCMP);
+		DefineOprt(_T("!="), NotEqual, prCMP);
+
+		DefineOprt(_T("+"), Add, prADD_SUB);
+		DefineOprt(_T("-"), Sub, prADD_SUB);
+
+		DefineOprt(_T("*"), Mul, prMUL_DIV);
+		DefineOprt(_T("/"), Div, prMUL_DIV);
+		DefineOprt(_T("%"), Mod, prMUL_DIV);
+
+		DefineOprt(_T("^"), Pow, prPOW, oaRIGHT);
+		DefineOprt(_T(">>"), Shr, prMUL_DIV + 1);
+		DefineOprt(_T("<<"), Shl, prMUL_DIV + 1);
+	}
 
 } // namespace mu
diff --git a/src/muParserTest.cpp b/src/muParserTest.cpp
index ae1e187..46e0af7 100644
--- a/src/muParserTest.cpp
+++ b/src/muParserTest.cpp
@@ -1,26 +1,29 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2022 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "muParserTest.h"
@@ -30,1527 +33,1685 @@
 #include <iostream>
 #include <limits>
 
-#define PARSER_CONST_PI  3.141592653589793238462643
-#define PARSER_CONST_E   2.718281828459045235360287
-
 using namespace std;
 
 /** \file
-    \brief This file contains the implementation of parser test cases.
+	\brief This file contains the implementation of parser test cases.
 */
 
 namespace mu
 {
-  namespace Test
-  {
-    int ParserTester::c_iCount = 0;
-
-    //---------------------------------------------------------------------------------------------
-    ParserTester::ParserTester()
-      :m_vTestFun()
-    {
-      AddTest(&ParserTester::TestNames);
-      AddTest(&ParserTester::TestSyntax);
-      AddTest(&ParserTester::TestPostFix);
-      AddTest(&ParserTester::TestInfixOprt);
-      AddTest(&ParserTester::TestVarConst);
-      AddTest(&ParserTester::TestMultiArg);
-      AddTest(&ParserTester::TestExpression);
-      AddTest(&ParserTester::TestIfThenElse);
-      AddTest(&ParserTester::TestInterface);
-      AddTest(&ParserTester::TestBinOprt);
-      AddTest(&ParserTester::TestException);
-      AddTest(&ParserTester::TestStrArg);
-      AddTest(&ParserTester::TestBulkMode);
-
-      ParserTester::c_iCount = 0;
-    }
-
-    //---------------------------------------------------------------------------------------------
-    int ParserTester::IsHexVal(const char_type *a_szExpr, int *a_iPos, value_type *a_fVal)
-    {
-      if (a_szExpr[1]==0 || (a_szExpr[0]!='0' || a_szExpr[1]!='x') ) 
-        return 0;
-
-      unsigned iVal(0);
-
-      // New code based on streams for UNICODE compliance:
-      stringstream_type::pos_type nPos(0);
-      stringstream_type ss(a_szExpr + 2);
-      ss >> std::hex >> iVal;
-      nPos = ss.tellg();
-
-      if (nPos==(stringstream_type::pos_type)0)
-        return 1;
-
-      *a_iPos += (int)(2 + nPos);
-      *a_fVal = (value_type)iVal;
-      return 1;
-    }
-
-    //---------------------------------------------------------------------------------------------
-    int ParserTester::TestInterface()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing member functions...");
-   
-      // Test RemoveVar
-      value_type afVal[3] = {1,2,3};
-      Parser p;
-  
-      try
-      {
-        p.DefineVar( _T("a"), &afVal[0]);
-        p.DefineVar( _T("b"), &afVal[1]);
-        p.DefineVar( _T("c"), &afVal[2]);
-        p.SetExpr( _T("a+b+c") );
-        p.Eval();
-      }
-      catch(...)
-      {
-        iStat += 1;  // this is not supposed to happen 
-      }
-
-      try
-      {
-        p.RemoveVar( _T("c") );
-        p.Eval();
-        iStat += 1;  // not supposed to reach this, nonexisting variable "c" deleted...
-      }
-      catch(...)
-      {
-        // failure is expected...
-      }
-
-      if (iStat==0) 
-        mu::console() << _T("passed") << endl;
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------------------------
-    int ParserTester::TestStrArg()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing string arguments...");
- 
-      iStat += EqnTest(_T("valueof(\"\")"), 123, true);   // empty string arguments caused a crash
-      iStat += EqnTest(_T("valueof(\"aaa\")+valueof(\"bbb\")  "), 246, true);
-      iStat += EqnTest(_T("2*(valueof(\"aaa\")-23)+valueof(\"bbb\")"), 323, true);
-      // use in expressions with variables
-      iStat += EqnTest(_T("a*(atof(\"10\")-b)"), 8, true);
-      iStat += EqnTest(_T("a-(atof(\"10\")*b)"), -19, true);
-      // string + numeric arguments
-      iStat += EqnTest(_T("strfun1(\"100\")"), 100, true);
-      iStat += EqnTest(_T("strfun2(\"100\",1)"), 101, true);
-      iStat += EqnTest(_T("strfun3(\"99\",1,2)"), 102, true);
-      // string constants
-      iStat += EqnTest(_T("atof(str1)+atof(str2)"), 3.33, true);
-
-      if (iStat==0)
-        mu::console() << _T("passed") << endl;
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------------------------
-    int ParserTester::TestBulkMode()
-    {
-        int iStat = 0;
-        mu::console() << _T("testing bulkmode...");
+	namespace Test
+	{
+		int ParserTester::c_iCount = 0;
+
+		//---------------------------------------------------------------------------------------------
+		ParserTester::ParserTester()
+			:m_vTestFun()
+		{
+			AddTest(&ParserTester::TestNames);
+			AddTest(&ParserTester::TestSyntax);
+			AddTest(&ParserTester::TestPostFix);
+			AddTest(&ParserTester::TestInfixOprt);
+			AddTest(&ParserTester::TestVarConst);
+			AddTest(&ParserTester::TestMultiArg);
+			AddTest(&ParserTester::TestExpression);
+			AddTest(&ParserTester::TestIfThenElse);
+			AddTest(&ParserTester::TestInterface);
+			AddTest(&ParserTester::TestBinOprt);
+			AddTest(&ParserTester::TestException);
+			AddTest(&ParserTester::TestStrArg);
+			AddTest(&ParserTester::TestBulkMode);
+			AddTest(&ParserTester::TestOptimizer);
+
+			ParserTester::c_iCount = 0;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		int ParserTester::IsHexVal(const char_type* a_szExpr, int* a_iPos, value_type* a_fVal)
+		{
+			if (a_szExpr[1] == 0 || (a_szExpr[0] != '0' || a_szExpr[1] != 'x'))
+				return 0;
+
+			unsigned iVal(0);
+
+			// New code based on streams for UNICODE compliance:
+			stringstream_type::pos_type nPos(0);
+			stringstream_type ss(a_szExpr + 2);
+			ss >> std::hex >> iVal;
+			nPos = ss.tellg();
+
+			if (nPos == (stringstream_type::pos_type)0)
+				return 1;
+
+			*a_iPos += (int)(2 + nPos);
+			*a_fVal = (value_type)iVal;
+			return 1;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		int ParserTester::TestInterface()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing member functions...");
+
+			// Test RemoveVar
+			value_type afVal[3] = { 1,2,3 };
+			Parser p;
+
+			try
+			{
+				p.DefineVar(_T("a"), &afVal[0]);
+				p.DefineVar(_T("b"), &afVal[1]);
+				p.DefineVar(_T("c"), &afVal[2]);
+				p.SetExpr(_T("a+b+c"));
+				p.Eval();
+			}
+			catch (...)
+			{
+				iStat += 1;  // this is not supposed to happen 
+			}
+
+			try
+			{
+				p.RemoveVar(_T("c"));
+				p.Eval();
+				iStat += 1;  // not supposed to reach this, nonexisting variable "c" deleted...
+			}
+			catch (...)
+			{
+				// failure is expected...
+			}
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		int ParserTester::TestOptimizer()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing optimizer...");
+
+			// Test RemoveVar
+			Parser p;
+			try
+			{
+				// test for #93 (https://github.com/beltoforion/muparser/issues/93)
+				// expected bytecode is:
+				// VAL, FUN
+				{
+					p.DefineFun(_T("unoptimizable"), f1of1, false);
+					p.SetExpr(_T("unoptimizable(1)"));
+					p.Eval();
+
+					auto& bc = p.GetByteCode();
+					const SToken* tok = bc.GetBase();
+					if (bc.GetSize() != 2 && tok[1].Cmd != cmFUNC)
+					{
+						mu::console() << _T("#93 an unoptimizable expression was optimized!") << endl;
+						iStat += 1;
+					}
+				}
+
+				{
+					p.ClearFun();
+					p.DefineFun(_T("unoptimizable"), f1of1, true);
+					p.SetExpr(_T("unoptimizable(1)"));
+					p.Eval();
+
+					auto& bc = p.GetByteCode();
+					const SToken* tok = bc.GetBase();
+					if (bc.GetSize() != 1 && tok[0].Cmd != cmVAL)
+					{
+						mu::console() << _T("#93 optimizer error") << endl;
+						iStat += 1;
+					}
+				}
+			}
+			catch (...)
+			{
+				iStat += 1;  // this is not supposed to happen 
+			}
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		int ParserTester::TestStrArg()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing string arguments...");
+
+			// from oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23410
+			iStat += ThrowTest(_T(R"(6 - 6 ? 4 : "", ? 4 : "", ? 4 : "")"), ecUNEXPECTED_STR, true);
+			// variations:
+			iStat += ThrowTest(_T(R"(avg(0?4:(""),1))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(1 ? 4 : "")"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(1 ? "" : 4)"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(1 ? "" : "")"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(0 ? 4 : "")"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(0 ? 4 : (""))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(1 ? 4 : "")"), ecUNEXPECTED_STR);
+
+			// from oss-fuzz: https://oss-fuzz.com/testcase-detail/5106868061208576
+			iStat += ThrowTest(_T(R"("","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",8)"), ecSTR_RESULT);
+
+			// derived from oss-fuzz: https://oss-fuzz.com/testcase-detail/5758791700971520
+			iStat += ThrowTest(_T("(\"\"), 7"), ecSTR_RESULT);
+			iStat += ThrowTest(_T("((\"\")), 7"), ecSTR_RESULT);
+			//iStat += ThrowTest(_T("(\"\"),(\" \"), 7, (3)"), ecSTR_RESULT);
+			//iStat += ThrowTest(_T("(\"\"),(\"\"), 7, (3)"), ecSTR_RESULT);
+			//iStat += ThrowTest(_T("(\"\"),(\"\"), (3)"), ecSTR_RESULT);
+			//iStat += ThrowTest(_T("(\"\"),(\"\"), 7"), ecSTR_RESULT);
+
+
+			// variations:
+			iStat += ThrowTest(_T(R"("","",9)"), ecSTR_RESULT);
+
+			iStat += EqnTest(_T("valueof(\"\")"), 123, true);   // empty string arguments caused a crash
+			iStat += EqnTest(_T("valueof(\"aaa\")+valueof(\"bbb\")  "), 246, true);
+			iStat += EqnTest(_T("2*(valueof(\"aaa\")-23)+valueof(\"bbb\")"), 323, true);
+
+			// use in expressions with variables
+			iStat += EqnTest(_T("a*(atof(\"10\")-b)"), 8, true);
+			iStat += EqnTest(_T("a-(atof(\"10\")*b)"), -19, true);
+
+			// string + numeric arguments
+			iStat += EqnTest(_T("strfun1(\"100\")"), 100, true);
+			iStat += EqnTest(_T("strfun2(\"100\",1)"), 101, true);
+			iStat += EqnTest(_T("strfun3(\"99\",1,2)"), 102, true);
+			iStat += EqnTest(_T("strfun4(\"99\",1,2,3)"), 105, true);
+			iStat += EqnTest(_T("strfun5(\"99\",1,2,3,4)"), 109, true);
+			iStat += EqnTest(_T("strfun6(\"99\",1,2,3,4,5)"), 114, true);
+
+			// string constants
+			iStat += EqnTest(_T("atof(str1)+atof(str2)"), 3.33, true);
+
+			// user data
+			iStat += EqnTest(_T("strfunud3_10(\"99\",1,2)"), 112, true);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		int ParserTester::TestBulkMode()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing bulkmode...");
 
 #define EQN_TEST_BULK(EXPR, R1, R2, R3, R4, PASS) \
-        { \
-          double res[] = { R1, R2, R3, R4 }; \
-          iStat += EqnTestBulk(_T(EXPR), res, (PASS)); \
-        }
-
-        // Bulk Variables for the test:
-        // a: 1,2,3,4
-        // b: 2,2,2,2
-        // c: 3,3,3,3
-        // d: 5,4,3,2
-        EQN_TEST_BULK("a",   1, 1, 1, 1, false)
-        EQN_TEST_BULK("a",   1, 2, 3, 4, true)
-        EQN_TEST_BULK("b=a", 1, 2, 3, 4, true)
-        EQN_TEST_BULK("b=a, b*10", 10, 20, 30, 40, true)
-        EQN_TEST_BULK("b=a, b*10, a", 1, 2, 3, 4, true)
-        EQN_TEST_BULK("a+b", 3, 4, 5, 6, true)
-        EQN_TEST_BULK("c*(a+b)", 9, 12, 15, 18, true)
+			{ \
+			  double res[] = { R1, R2, R3, R4 }; \
+			  iStat += EqnTestBulk(_T(EXPR), res, (PASS)); \
+			}
+
+			// Bulk Variables for the test:
+			// a: 1,2,3,4
+			// b: 2,2,2,2
+			// c: 3,3,3,3
+			// d: 5,4,3,2
+			EQN_TEST_BULK("a", 1, 1, 1, 1, false)
+			EQN_TEST_BULK("a", 1, 2, 3, 4, true)
+			EQN_TEST_BULK("b=a", 1, 2, 3, 4, true)
+			EQN_TEST_BULK("b=a, b*10", 10, 20, 30, 40, true)
+			EQN_TEST_BULK("b=a, b*10, a", 1, 2, 3, 4, true)
+			EQN_TEST_BULK("a+b", 3, 4, 5, 6, true)
+			EQN_TEST_BULK("c*(a+b)", 9, 12, 15, 18, true)
 #undef EQN_TEST_BULK
 
-        if (iStat == 0)
-            mu::console() << _T("passed") << endl;
-        else
-            mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-        return iStat;
-    }
-
-    //---------------------------------------------------------------------------------------------
-    int ParserTester::TestBinOprt()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing binary operators...");
-   
-      // built in operators
-      // xor operator
-
-      iStat += EqnTest(_T("a++b"), 3, true);
-      iStat += EqnTest(_T("a ++ b"), 3, true);
-      iStat += EqnTest(_T("1++2"), 3, true);
-      iStat += EqnTest(_T("1 ++ 2"), 3, true);
-      iStat += EqnTest(_T("a add b"), 3, true);
-      iStat += EqnTest(_T("1 add 2"), 3, true);
-      iStat += EqnTest(_T("a<b"), 1, true);
-      iStat += EqnTest(_T("b>a"), 1, true);
-      iStat += EqnTest(_T("a>a"), 0, true);
-      iStat += EqnTest(_T("a<a"), 0, true);
-      iStat += EqnTest(_T("a>a"), 0, true);
-      iStat += EqnTest(_T("a<=a"), 1, true);
-      iStat += EqnTest(_T("a<=b"), 1, true);
-      iStat += EqnTest(_T("b<=a"), 0, true);
-      iStat += EqnTest(_T("a>=a"), 1, true);
-      iStat += EqnTest(_T("b>=a"), 1, true);
-      iStat += EqnTest(_T("a>=b"), 0, true);
-
-      // Test logical operators, especially if user defined "&" and the internal "&&" collide
-      iStat += EqnTest(_T("1 && 1"), 1, true); 
-      iStat += EqnTest(_T("1 && 0"), 0, true); 
-      iStat += EqnTest(_T("(a<b) && (b>a)"), 1, true); 
-      iStat += EqnTest(_T("(a<b) && (a>b)"), 0, true); 
-      //iStat += EqnTest(_T("12 and 255"), 12, true); 
-      //iStat += EqnTest(_T("12 and 0"), 0, true); 
-      iStat += EqnTest(_T("12 & 255"), 12, true); 
-      iStat += EqnTest(_T("12 & 0"), 0, true); 
-      iStat += EqnTest(_T("12&255"), 12, true); 
-      iStat += EqnTest(_T("12&0"), 0, true); 
-
-      // Assignment operator
-      iStat += EqnTest(_T("a = b"), 2, true); 
-      iStat += EqnTest(_T("a = sin(b)"), 0.909297, true); 
-      iStat += EqnTest(_T("a = 1+sin(b)"), 1.909297, true);
-      iStat += EqnTest(_T("(a=b)*2"), 4, true);
-      iStat += EqnTest(_T("2*(a=b)"), 4, true);
-      iStat += EqnTest(_T("2*(a=b+1)"), 6, true);
-      iStat += EqnTest(_T("(a=b+1)*2"), 6, true);
-      iStat += EqnTest(_T("a=c, a*10"), 30, true);
-
-      iStat += EqnTest(_T("2^2^3"), 256, true); 
-      iStat += EqnTest(_T("1/2/3"), 1.0/6.0, true); 
-
-      // reference: http://www.wolframalpha.com/input/?i=3%2B4*2%2F%281-5%29^2^3
-      iStat += EqnTest(_T("3+4*2/(1-5)^2^3"), 3.0001220703125, true); 
-
-      // Test user defined binary operators
-      iStat += EqnTestInt(_T("1 | 2"), 3, true);          
-      iStat += EqnTestInt(_T("1 || 2"), 1, true);          
-      iStat += EqnTestInt(_T("123 & 456"), 72, true);          
-      iStat += EqnTestInt(_T("(123 & 456) % 10"), 2, true);
-      iStat += EqnTestInt(_T("1 && 0"), 0, true);          
-      iStat += EqnTestInt(_T("123 && 456"), 1, true);          
-      iStat += EqnTestInt(_T("1 << 3"), 8, true);          
-      iStat += EqnTestInt(_T("8 >> 3"), 1, true);          
-      iStat += EqnTestInt(_T("9 / 4"), 2, true);  
-      iStat += EqnTestInt(_T("9 % 4"), 1, true);  
-      iStat += EqnTestInt(_T("if(5%2,1,0)"), 1, true);
-      iStat += EqnTestInt(_T("if(4%2,1,0)"), 0, true);
-      iStat += EqnTestInt(_T("-10+1"), -9, true);
-      iStat += EqnTestInt(_T("1+2*3"), 7, true);
-      iStat += EqnTestInt(_T("const1 != const2"), 1, true);
-      iStat += EqnTestInt(_T("const1 != const2"), 0, false);
-      iStat += EqnTestInt(_T("const1 == const2"), 0, true);
-      iStat += EqnTestInt(_T("const1 == 1"), 1, true);
-      iStat += EqnTestInt(_T("10*(const1 == 1)"), 10, true);
-      iStat += EqnTestInt(_T("2*(const1 | const2)"), 6, true);
-      iStat += EqnTestInt(_T("2*(const1 | const2)"), 7, false);
-      iStat += EqnTestInt(_T("const1 < const2"), 1, true);
-      iStat += EqnTestInt(_T("const2 > const1"), 1, true);
-      iStat += EqnTestInt(_T("const1 <= 1"), 1, true);
-      iStat += EqnTestInt(_T("const2 >= 2"), 1, true);
-      iStat += EqnTestInt(_T("2*(const1 + const2)"), 6, true);
-      iStat += EqnTestInt(_T("2*(const1 - const2)"), -2, true);
-      iStat += EqnTestInt(_T("a != b"), 1, true);
-      iStat += EqnTestInt(_T("a != b"), 0, false);
-      iStat += EqnTestInt(_T("a == b"), 0, true);
-      iStat += EqnTestInt(_T("a == 1"), 1, true);
-      iStat += EqnTestInt(_T("10*(a == 1)"), 10, true);
-      iStat += EqnTestInt(_T("2*(a | b)"), 6, true);
-      iStat += EqnTestInt(_T("2*(a | b)"), 7, false);
-      iStat += EqnTestInt(_T("a < b"), 1, true);
-      iStat += EqnTestInt(_T("b > a"), 1, true);
-      iStat += EqnTestInt(_T("a <= 1"), 1, true);
-      iStat += EqnTestInt(_T("b >= 2"), 1, true);
-      iStat += EqnTestInt(_T("2*(a + b)"), 6, true);
-      iStat += EqnTestInt(_T("2*(a - b)"), -2, true);
-      iStat += EqnTestInt(_T("a + (a << b)"), 5, true);
-      iStat += EqnTestInt(_T("-2^2"), -4, true);
-      iStat += EqnTestInt(_T("3--a"), 4, true);
-      iStat += EqnTestInt(_T("3+-3^2"), -6, true);
-
-      // Test reading of hex values:
-      iStat += EqnTestInt(_T("0xff"), 255, true);
-      iStat += EqnTestInt(_T("10+0xff"), 265, true);
-      iStat += EqnTestInt(_T("0xff+10"), 265, true);
-      iStat += EqnTestInt(_T("10*0xff"), 2550, true);
-      iStat += EqnTestInt(_T("0xff*10"), 2550, true);
-      iStat += EqnTestInt(_T("10+0xff+1"), 266, true);
-      iStat += EqnTestInt(_T("1+0xff+10"), 266, true);
-
-// incorrect: '^' is yor here, not power
-//    iStat += EqnTestInt("-(1+2)^2", -9, true);
-//    iStat += EqnTestInt("-1^3", -1, true);          
-
-      // Test precedence
-      // a=1, b=2, c=3
-      iStat += EqnTestInt(_T("a + b * c"), 7, true);
-      iStat += EqnTestInt(_T("a * b + c"), 5, true);
-      iStat += EqnTestInt(_T("a<b && b>10"), 0, true);
-      iStat += EqnTestInt(_T("a<b && b<10"), 1, true);
-
-      iStat += EqnTestInt(_T("a + b << c"), 17, true);
-      iStat += EqnTestInt(_T("a << b + c"), 7, true);
-      iStat += EqnTestInt(_T("c * b < a"), 0, true);
-      iStat += EqnTestInt(_T("c * b == 6 * a"), 1, true);
-      iStat += EqnTestInt(_T("2^2^3"), 256, true); 
-
-
-      if (iStat==0)
-        mu::console() << _T("passed") << endl;
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------------------------
-    /** \brief Check muParser name restriction enforcement. */
-    int ParserTester::TestNames()
-    {
-      int  iStat= 0,
-           iErr = 0;
-
-      mu::console() << "testing name restriction enforcement...";
-    
-      Parser p;
-
-  #define PARSER_THROWCHECK(DOMAIN, FAIL, EXPR, ARG) \
-      iErr = 0;                                      \
-      ParserTester::c_iCount++;                      \
-      try                                            \
-      {                                              \
-        p.Define##DOMAIN(EXPR, ARG);                 \
-      }                                              \
-      catch(Parser::exception_type&)                 \
-      {                                              \
-        iErr = (FAIL==false) ? 0 : 1;                \
-      }                                              \
-      iStat += iErr;      
-      
-      // constant names
-      PARSER_THROWCHECK(Const, false, _T("0a"), 1)
-      PARSER_THROWCHECK(Const, false, _T("9a"), 1)
-      PARSER_THROWCHECK(Const, false, _T("+a"), 1)
-      PARSER_THROWCHECK(Const, false, _T("-a"), 1)
-      PARSER_THROWCHECK(Const, false, _T("a-"), 1)
-      PARSER_THROWCHECK(Const, false, _T("a*"), 1)
-      PARSER_THROWCHECK(Const, false, _T("a?"), 1)
-      PARSER_THROWCHECK(Const, true, _T("a"), 1)
-      PARSER_THROWCHECK(Const, true, _T("a_min"), 1)
-      PARSER_THROWCHECK(Const, true, _T("a_min0"), 1)
-      PARSER_THROWCHECK(Const, true, _T("a_min9"), 1)
-      // variable names
-      value_type a;
-      p.ClearConst();
-      PARSER_THROWCHECK(Var, false, _T("123abc"), &a)
-      PARSER_THROWCHECK(Var, false, _T("9a"), &a)
-      PARSER_THROWCHECK(Var, false, _T("0a"), &a)
-      PARSER_THROWCHECK(Var, false, _T("+a"), &a)
-      PARSER_THROWCHECK(Var, false, _T("-a"), &a)
-      PARSER_THROWCHECK(Var, false, _T("?a"), &a)
-      PARSER_THROWCHECK(Var, false, _T("!a"), &a)
-      PARSER_THROWCHECK(Var, false, _T("a+"), &a)
-      PARSER_THROWCHECK(Var, false, _T("a-"), &a)
-      PARSER_THROWCHECK(Var, false, _T("a*"), &a)
-      PARSER_THROWCHECK(Var, false, _T("a?"), &a)
-      PARSER_THROWCHECK(Var, true, _T("a"), &a)
-      PARSER_THROWCHECK(Var, true, _T("a_min"), &a)
-      PARSER_THROWCHECK(Var, true, _T("a_min0"), &a)
-      PARSER_THROWCHECK(Var, true, _T("a_min9"), &a)
-      PARSER_THROWCHECK(Var, false, _T("a_min9"), 0)
-      // Postfix operators
-      // fail
-      PARSER_THROWCHECK(PostfixOprt, false, _T("(k"), f1of1)
-      PARSER_THROWCHECK(PostfixOprt, false, _T("9+"), f1of1)
-      PARSER_THROWCHECK(PostfixOprt, false, _T("+"), 0)
-      // pass
-      PARSER_THROWCHECK(PostfixOprt, true, _T("-a"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("?a"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("_"),   f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("#"),   f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("&&"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("||"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("&"),   f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("|"),   f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("++"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("--"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("?>"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("?<"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("**"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("xor"), f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("and"), f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("or"),  f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("not"), f1of1)
-      PARSER_THROWCHECK(PostfixOprt, true, _T("!"),   f1of1)
-      // Binary operator
-      // The following must fail with builtin operators activated
-      // p.EnableBuiltInOp(true); -> this is the default
-      p.ClearPostfixOprt();
-      PARSER_THROWCHECK(Oprt, false, _T("+"),  f1of2)
-      PARSER_THROWCHECK(Oprt, false, _T("-"),  f1of2)
-      PARSER_THROWCHECK(Oprt, false, _T("*"),  f1of2)
-      PARSER_THROWCHECK(Oprt, false, _T("/"),  f1of2)
-      PARSER_THROWCHECK(Oprt, false, _T("^"),  f1of2)
-      PARSER_THROWCHECK(Oprt, false, _T("&&"),  f1of2)
-      PARSER_THROWCHECK(Oprt, false, _T("||"),  f1of2)
-      // without activated built in operators it should work
-      p.EnableBuiltInOprt(false);
-      PARSER_THROWCHECK(Oprt, true, _T("+"),  f1of2)
-      PARSER_THROWCHECK(Oprt, true, _T("-"),  f1of2)
-      PARSER_THROWCHECK(Oprt, true, _T("*"),  f1of2)
-      PARSER_THROWCHECK(Oprt, true, _T("/"),  f1of2)
-      PARSER_THROWCHECK(Oprt, true, _T("^"),  f1of2)
-      PARSER_THROWCHECK(Oprt, true, _T("&&"),  f1of2)
-      PARSER_THROWCHECK(Oprt, true, _T("||"),  f1of2)
-  #undef PARSER_THROWCHECK
-
-      if (iStat==0) 
-        mu::console() << _T("passed") << endl;
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestSyntax()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing syntax engine...");
-
-      iStat += ThrowTest(_T("1,"), ecUNEXPECTED_EOF);  // incomplete hex definition
-      iStat += ThrowTest(_T("a,"), ecUNEXPECTED_EOF);  // incomplete hex definition
-      iStat += ThrowTest(_T("sin(8),"), ecUNEXPECTED_EOF);  // incomplete hex definition
-      iStat += ThrowTest(_T("(sin(8)),"), ecUNEXPECTED_EOF);  // incomplete hex definition
-      iStat += ThrowTest(_T("a{m},"), ecUNEXPECTED_EOF);  // incomplete hex definition
-
-      iStat += EqnTest(_T("(1+ 2*a)"), 3, true);   // Spaces within formula
-      iStat += EqnTest(_T("sqrt((4))"), 2, true);  // Multiple brackets
-      iStat += EqnTest(_T("sqrt((2)+2)"), 2, true);// Multiple brackets
-      iStat += EqnTest(_T("sqrt(2+(2))"), 2, true);// Multiple brackets
-      iStat += EqnTest(_T("sqrt(a+(3))"), 2, true);// Multiple brackets
-      iStat += EqnTest(_T("sqrt((3)+a)"), 2, true);// Multiple brackets
-      iStat += EqnTest(_T("order(1,2)"), 1, true); // May not cause name collision with operator "or"
-      iStat += EqnTest(_T("(2+"), 0, false);       // missing closing bracket 
-      iStat += EqnTest(_T("2++4"), 0, false);      // unexpected operator
-      iStat += EqnTest(_T("2+-4"), 0, false);      // unexpected operator
-      iStat += EqnTest(_T("(2+)"), 0, false);      // unexpected closing bracket
-      iStat += EqnTest(_T("--2"), 0, false);       // double sign
-      iStat += EqnTest(_T("ksdfj"), 0, false);     // unknown token
-      iStat += EqnTest(_T("()"), 0, false);        // empty bracket without a function
-      iStat += EqnTest(_T("5+()"), 0, false);      // empty bracket without a function
-      iStat += EqnTest(_T("sin(cos)"), 0, false);  // unexpected function
-      iStat += EqnTest(_T("5t6"), 0, false);       // unknown token
-      iStat += EqnTest(_T("5 t 6"), 0, false);     // unknown token
-      iStat += EqnTest(_T("8*"), 0, false);        // unexpected end of formula
-      iStat += EqnTest(_T(",3"), 0, false);        // unexpected comma
-      iStat += EqnTest(_T("3,5"), 0, false);       // unexpected comma
-      iStat += EqnTest(_T("sin(8,8)"), 0, false);  // too many function args
-      iStat += EqnTest(_T("(7,8)"), 0, false);     // too many function args
-      iStat += EqnTest(_T("sin)"), 0, false);      // unexpected closing bracket
-      iStat += EqnTest(_T("a)"), 0, false);        // unexpected closing bracket
-      iStat += EqnTest(_T("pi)"), 0, false);       // unexpected closing bracket
-      iStat += EqnTest(_T("sin(())"), 0, false);   // unexpected closing bracket
-      iStat += EqnTest(_T("sin()"), 0, false);     // unexpected closing bracket
-
-      if (iStat==0)
-        mu::console() << _T("passed") << endl;
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestVarConst()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing variable/constant detection...");
-
-      // Test if the result changes when a variable changes
-      iStat += EqnTestWithVarChange( _T("a"), 1, 1, 2, 2 );
-      iStat += EqnTestWithVarChange( _T("2*a"), 2, 4, 3, 6 );
-
-      // distinguish constants with same basename
-      iStat += EqnTest( _T("const"), 1, true);
-      iStat += EqnTest( _T("const1"), 2, true);
-      iStat += EqnTest( _T("const2"), 3, true);
-      iStat += EqnTest( _T("2*const"), 2, true);
-      iStat += EqnTest( _T("2*const1"), 4, true);
-      iStat += EqnTest( _T("2*const2"), 6, true);
-      iStat += EqnTest( _T("2*const+1"), 3, true);
-      iStat += EqnTest( _T("2*const1+1"), 5, true);
-      iStat += EqnTest( _T("2*const2+1"), 7, true);
-      iStat += EqnTest( _T("const"), 0, false);
-      iStat += EqnTest( _T("const1"), 0, false);
-      iStat += EqnTest( _T("const2"), 0, false);
-
-      // distinguish variables with same basename
-      iStat += EqnTest( _T("a"), 1, true);
-      iStat += EqnTest( _T("aa"), 2, true);
-      iStat += EqnTest( _T("2*a"), 2, true);
-      iStat += EqnTest( _T("2*aa"), 4, true);
-      iStat += EqnTest( _T("2*a-1"), 1, true);
-      iStat += EqnTest( _T("2*aa-1"), 3, true);
-
-      // custom value recognition
-      iStat += EqnTest( _T("0xff"), 255, true);
-      iStat += EqnTest( _T("0x97 + 0xff"), 406, true);
-
-      // Finally test querying of used variables
-      try
-      {
-        int idx;
-        mu::Parser p;
-        mu::value_type vVarVal[] = { 1, 2, 3, 4, 5};
-        p.DefineVar( _T("a"), &vVarVal[0]);
-        p.DefineVar( _T("b"), &vVarVal[1]);
-        p.DefineVar( _T("c"), &vVarVal[2]);
-        p.DefineVar( _T("d"), &vVarVal[3]);
-        p.DefineVar( _T("e"), &vVarVal[4]);
-
-        // Test lookup of defined variables
-        // 4 used variables
-        p.SetExpr( _T("a+b+c+d") );
-        mu::varmap_type UsedVar = p.GetUsedVar();
-        int iCount = (int)UsedVar.size();
-        if (iCount!=4) 
-          throw false;
-        
-        // the next check will fail if the parser 
-        // erroneously creates new variables internally
-        if (p.GetVar().size()!=5)
-          throw false;
-
-        mu::varmap_type::const_iterator item = UsedVar.begin();
-        for (idx=0; item!=UsedVar.end(); ++item)
-        {
-          if (&vVarVal[idx++]!=item->second) 
-            throw false;
-        }
-
-        // Test lookup of undefined variables
-        p.SetExpr( _T("undef1+undef2+undef3") );
-        UsedVar = p.GetUsedVar();
-        iCount = (int)UsedVar.size();
-        if (iCount!=3) 
-          throw false;
-
-        // the next check will fail if the parser 
-        // erroneously creates new variables internally
-        if (p.GetVar().size()!=5)
-          throw false;
-
-        for (item = UsedVar.begin(); item!=UsedVar.end(); ++item)
-        {
-          if (item->second!=0) 
-            throw false; // all pointers to undefined variables must be null
-        }
-
-        // 1 used variables
-        p.SetExpr( _T("a+b") );
-        UsedVar = p.GetUsedVar();
-        iCount = (int)UsedVar.size();
-        if (iCount!=2) throw false;
-        item = UsedVar.begin();
-        for (idx=0; item!=UsedVar.end(); ++item)
-          if (&vVarVal[idx++]!=item->second) throw false;
-
-      }
-      catch(...)
-      {
-        iStat += 1;
-      }
-
-      if (iStat==0)  
-        mu::console() << _T("passed") << endl;
-      else
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestMultiArg()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing multiarg functions...");
-    
-      // Compound expressions
-      iStat += EqnTest( _T("1,2,3"), 3, true);
-      iStat += EqnTest( _T("a,b,c"), 3, true);
-      iStat += EqnTest( _T("a=10,b=20,c=a*b"), 200, true);
-      iStat += EqnTest( _T("1,\n2,\n3"), 3, true);
-      iStat += EqnTest( _T("a,\nb,\nc"), 3, true);
-      iStat += EqnTest( _T("a=10,\nb=20,\nc=a*b"), 200, true);
-      iStat += EqnTest( _T("1,\r\n2,\r\n3"), 3, true);
-      iStat += EqnTest( _T("a,\r\nb,\r\nc"), 3, true);
-      iStat += EqnTest( _T("a=10,\r\nb=20,\r\nc=a*b"), 200, true);
-
-      // picking the right argument
-      iStat += EqnTest( _T("f1of1(1)"), 1, true);
-      iStat += EqnTest( _T("f1of2(1, 2)"), 1, true);
-      iStat += EqnTest( _T("f2of2(1, 2)"), 2, true);
-      iStat += EqnTest( _T("f1of3(1, 2, 3)"), 1, true);
-      iStat += EqnTest( _T("f2of3(1, 2, 3)"), 2, true);
-      iStat += EqnTest( _T("f3of3(1, 2, 3)"), 3, true);
-      iStat += EqnTest( _T("f1of4(1, 2, 3, 4)"), 1, true);
-      iStat += EqnTest( _T("f2of4(1, 2, 3, 4)"), 2, true);
-      iStat += EqnTest( _T("f3of4(1, 2, 3, 4)"), 3, true);
-      iStat += EqnTest( _T("f4of4(1, 2, 3, 4)"), 4, true);
-      iStat += EqnTest( _T("f1of5(1, 2, 3, 4, 5)"), 1, true);
-      iStat += EqnTest( _T("f2of5(1, 2, 3, 4, 5)"), 2, true);
-      iStat += EqnTest( _T("f3of5(1, 2, 3, 4, 5)"), 3, true);
-      iStat += EqnTest( _T("f4of5(1, 2, 3, 4, 5)"), 4, true);
-      iStat += EqnTest( _T("f5of5(1, 2, 3, 4, 5)"), 5, true);
-      // Too few arguments / Too many arguments
-      iStat += EqnTest( _T("1+ping()"), 11, true);
-      iStat += EqnTest( _T("ping()+1"), 11, true);
-      iStat += EqnTest( _T("2*ping()"), 20, true);
-      iStat += EqnTest( _T("ping()*2"), 20, true);
-      iStat += EqnTest( _T("ping(1,2)"), 0, false);
-      iStat += EqnTest( _T("1+ping(1,2)"), 0, false);
-      iStat += EqnTest( _T("f1of1(1,2)"), 0, false);
-      iStat += EqnTest( _T("f1of1()"), 0, false);
-      iStat += EqnTest( _T("f1of2(1, 2, 3)"), 0, false);
-      iStat += EqnTest( _T("f1of2(1)"), 0, false);
-      iStat += EqnTest( _T("f1of3(1, 2, 3, 4)"), 0, false);
-      iStat += EqnTest( _T("f1of3(1)"), 0, false);
-      iStat += EqnTest( _T("f1of4(1, 2, 3, 4, 5)"), 0, false);
-      iStat += EqnTest( _T("f1of4(1)"), 0, false);
-      iStat += EqnTest( _T("(1,2,3)"), 0, false);
-      iStat += EqnTest( _T("1,2,3"), 0, false);
-      iStat += EqnTest( _T("(1*a,2,3)"), 0, false);
-      iStat += EqnTest( _T("1,2*a,3"), 0, false);
-     
-      // correct calculation of arguments
-      iStat += EqnTest( _T("min(a, 1)"),  1, true);
-      iStat += EqnTest( _T("min(3*2, 1)"),  1, true);
-      iStat += EqnTest( _T("min(3*2, 1)"),  6, false);
-      iStat += EqnTest( _T("firstArg(2,3,4)"), 2, true);
-      iStat += EqnTest( _T("lastArg(2,3,4)"), 4, true);
-      iStat += EqnTest( _T("min(3*a+1, 1)"),  1, true);
-      iStat += EqnTest( _T("max(3*a+1, 1)"),  4, true);
-      iStat += EqnTest( _T("max(3*a+1, 1)*2"),  8, true);
-      iStat += EqnTest( _T("2*max(3*a+1, 1)+2"),  10, true);
-
-      // functions with Variable argument count
-      iStat += EqnTest( _T("sum(a)"), 1, true);
-      iStat += EqnTest( _T("sum(1,2,3)"),  6, true);
-      iStat += EqnTest( _T("sum(a,b,c)"),  6, true);
-      iStat += EqnTest( _T("sum(1,-max(1,2),3)*2"),  4, true);
-      iStat += EqnTest( _T("2*sum(1,2,3)"),  12, true);
-      iStat += EqnTest( _T("2*sum(1,2,3)+2"),  14, true);
-      iStat += EqnTest( _T("2*sum(-1,2,3)+2"),  10, true);
-      iStat += EqnTest( _T("2*sum(-1,2,-(-a))+2"),  6, true);
-      iStat += EqnTest( _T("2*sum(-1,10,-a)+2"),  18, true);
-      iStat += EqnTest( _T("2*sum(1,2,3)*2"),  24, true);
-      iStat += EqnTest( _T("sum(1,-max(1,2),3)*2"),  4, true);
-      iStat += EqnTest( _T("sum(1*3, 4, a+2)"),  10, true);
-      iStat += EqnTest( _T("sum(1*3, 2*sum(1,2,2), a+2)"),  16, true);
-      iStat += EqnTest( _T("sum(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)"), 24, true);
-
-      // some failures
-      iStat += EqnTest( _T("sum()"),  0, false);
-      iStat += EqnTest( _T("sum(,)"),  0, false);
-      iStat += EqnTest( _T("sum(1,2,)"),  0, false);
-      iStat += EqnTest( _T("sum(,1,2)"),  0, false);
-
-      if (iStat==0) 
-        mu::console() << _T("passed") << endl;
-      else
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-  
-      return iStat;
-    }
-
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestInfixOprt()
-    {
-      int iStat(0);
-      mu::console() << "testing infix operators...";
-
-      iStat += EqnTest( _T("+1"),    +1, true);
-      iStat += EqnTest( _T("-(+1)"), -1, true);
-      iStat += EqnTest( _T("-(+1)*2"),  -2, true);
-      iStat += EqnTest( _T("-(+2)*sqrt(4)"),  -4, true);
-      iStat += EqnTest( _T("3-+a"), 2, true);
-      iStat += EqnTest( _T("+1*3"),  3, true);
-
-      iStat += EqnTest( _T("-1"),    -1, true);
-      iStat += EqnTest( _T("-(-1)"),  1, true);
-      iStat += EqnTest( _T("-(-1)*2"),  2, true);
-      iStat += EqnTest( _T("-(-2)*sqrt(4)"),  4, true);
-      iStat += EqnTest( _T("-_pi"), -PARSER_CONST_PI, true);
-      iStat += EqnTest( _T("-a"),  -1, true);
-      iStat += EqnTest( _T("-(a)"),  -1, true);
-      iStat += EqnTest( _T("-(-a)"),  1, true);
-      iStat += EqnTest( _T("-(-a)*2"),  2, true);
-      iStat += EqnTest( _T("-(8)"), -8, true);
-      iStat += EqnTest( _T("-8"), -8, true);
-      iStat += EqnTest( _T("-(2+1)"), -3, true);
-      iStat += EqnTest( _T("-(f1of1(1+2*3)+1*2)"), -9, true);
-      iStat += EqnTest( _T("-(-f1of1(1+2*3)+1*2)"), 5, true);
-      iStat += EqnTest( _T("-sin(8)"), -0.989358, true);
-      iStat += EqnTest( _T("3-(-a)"), 4, true);
-      iStat += EqnTest( _T("3--a"), 4, true);
-      iStat += EqnTest( _T("-1*3"),  -3, true);
-
-      // Postfix / infix priorities
-      iStat += EqnTest( _T("~2#"), 8, true);
-      iStat += EqnTest( _T("~f1of1(2)#"), 8, true);
-      iStat += EqnTest( _T("~(b)#"), 8, true);
-      iStat += EqnTest( _T("(~b)#"), 12, true);
-      iStat += EqnTest( _T("~(2#)"), 8, true);
-      iStat += EqnTest( _T("~(f1of1(2)#)"), 8, true);
-      //
-      iStat += EqnTest( _T("-2^2"),-4, true);
-      iStat += EqnTest( _T("-(a+b)^2"),-9, true);
-      iStat += EqnTest( _T("(-3)^2"),9, true);
-      iStat += EqnTest( _T("-(-2^2)"),4, true);
-      iStat += EqnTest( _T("3+-3^2"),-6, true);
-      // The following assumes use of sqr as postfix operator together
-      // with a sign operator of low priority:
-      iStat += EqnTest( _T("-2'"), -4, true);
-      iStat += EqnTest( _T("-(1+1)'"),-4, true);
-      iStat += EqnTest( _T("2+-(1+1)'"),-2, true);
-      iStat += EqnTest( _T("2+-2'"), -2, true);
-      // This is the classic behaviour of the infix sign operator (here: "$") which is
-      // now deprecated:
-      iStat += EqnTest( _T("$2^2"),4, true);
-      iStat += EqnTest( _T("$(a+b)^2"),9, true);
-      iStat += EqnTest( _T("($3)^2"),9, true);
-      iStat += EqnTest( _T("$($2^2)"),-4, true);
-      iStat += EqnTest( _T("3+$3^2"),12, true);
-
-      // infix operators sharing the first few characters
-      iStat += EqnTest( _T("~ 123"),  123+2, true);
-      iStat += EqnTest( _T("~~ 123"),  123+2, true);
-
-      if (iStat==0)
-        mu::console() << _T("passed") << endl;
-      else
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestPostFix()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing postfix operators...");
-
-      // application
-      iStat += EqnTest( _T("3{m}+5"), 5.003, true);
-      iStat += EqnTest( _T("1000{m}"), 1, true);
-      iStat += EqnTest( _T("1000 {m}"), 1, true);
-      iStat += EqnTest( _T("(a){m}"), 1e-3, true);
-      iStat += EqnTest( _T("a{m}"), 1e-3, true);
-      iStat += EqnTest( _T("a {m}"), 1e-3, true);
-      iStat += EqnTest( _T("-(a){m}"), -1e-3, true);
-      iStat += EqnTest( _T("-2{m}"), -2e-3, true);
-      iStat += EqnTest( _T("-2 {m}"), -2e-3, true);
-      iStat += EqnTest( _T("f1of1(1000){m}"), 1, true);
-      iStat += EqnTest( _T("-f1of1(1000){m}"), -1, true);
-      iStat += EqnTest( _T("-f1of1(-1000){m}"), 1, true);
-      iStat += EqnTest( _T("f4of4(0,0,0,1000){m}"), 1, true);
-      iStat += EqnTest( _T("2+(a*1000){m}"), 3, true);
-
-      // can postfix operators "m" und "meg" be told apart properly?
-      iStat += EqnTest( _T("2*3000meg+2"), 2*3e9+2, true);   
-
-      // some incorrect results
-      iStat += EqnTest( _T("1000{m}"), 0.1, false);
-      iStat += EqnTest( _T("(a){m}"), 2, false);
-      // failure due to syntax checking
-      iStat += ThrowTest(_T("0x"), ecUNASSIGNABLE_TOKEN);  // incomplete hex definition
-      iStat += ThrowTest(_T("3+"), ecUNEXPECTED_EOF);
-      iStat += ThrowTest( _T("4 + {m}"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("{m}4"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("sin({m})"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("{m} {m}"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("{m}(8)"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("4,{m}"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("-{m}"), ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest( _T("2(-{m})"), ecUNEXPECTED_PARENS);
-      iStat += ThrowTest( _T("2({m})"), ecUNEXPECTED_PARENS);
- 
-      iStat += ThrowTest( _T("multi*1.0"), ecUNASSIGNABLE_TOKEN);
-
-      if (iStat==0)
-        mu::console() << _T("passed") << endl;
-      else
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestExpression()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing expression samples...");
-
-      value_type b = 2;
-
-      // Optimization
-      iStat += EqnTest( _T("2*b*5"), 20, true);
-      iStat += EqnTest( _T("2*b*5 + 4*b"), 28, true);
-      iStat += EqnTest( _T("2*a/3"), 2.0/3.0, true);
-
-      // Addition auf cmVARMUL 
-      iStat += EqnTest( _T("3+b"), b+3, true);
-      iStat += EqnTest( _T("b+3"), b+3, true);
-      iStat += EqnTest( _T("b*3+2"), b*3+2, true);
-      iStat += EqnTest( _T("3*b+2"), b*3+2, true);
-      iStat += EqnTest( _T("2+b*3"), b*3+2, true);
-      iStat += EqnTest( _T("2+3*b"), b*3+2, true);
-      iStat += EqnTest( _T("b+3*b"), b+3*b, true);
-      iStat += EqnTest( _T("3*b+b"), b+3*b, true);
-
-      iStat += EqnTest( _T("2+b*3+b"), 2+b*3+b, true);
-      iStat += EqnTest( _T("b+2+b*3"), b+2+b*3, true);
-
-      iStat += EqnTest( _T("(2*b+1)*4"), (2*b+1)*4, true);
-      iStat += EqnTest( _T("4*(2*b+1)"), (2*b+1)*4, true);
-
-      // operator precedences
-      iStat += EqnTest( _T("1+2-3*4/5^6"), 2.99923, true);
-      iStat += EqnTest( _T("1^2/3*4-5+6"), 2.33333333, true);
-      iStat += EqnTest( _T("1+2*3"), 7, true);
-      iStat += EqnTest( _T("1+2*3"), 7, true);
-      iStat += EqnTest( _T("(1+2)*3"), 9, true);
-      iStat += EqnTest( _T("(1+2)*(-3)"), -9, true);
-      iStat += EqnTest( _T("2/4"), 0.5, true);
-
-      iStat += EqnTest( _T("exp(ln(7))"), 7, true);
-      iStat += EqnTest( _T("e^ln(7)"), 7, true);
-      iStat += EqnTest( _T("e^(ln(7))"), 7, true);
-      iStat += EqnTest( _T("(e^(ln(7)))"), 7, true);
-      iStat += EqnTest( _T("1-(e^(ln(7)))"), -6, true);
-      iStat += EqnTest( _T("2*(e^(ln(7)))"), 14, true);
-      iStat += EqnTest( _T("10^log(5)"), pow(10.0, log(5.0)), true);
-      iStat += EqnTest( _T("10^log10(5)"), 5, true);
-      iStat += EqnTest( _T("2^log2(4)"), 4, true);
-      iStat += EqnTest( _T("-(sin(0)+1)"), -1, true);
-      iStat += EqnTest( _T("-(2^1.1)"), -2.14354692, true);
-
-      iStat += EqnTest( _T("(cos(2.41)/b)"), -0.372056, true);
-      iStat += EqnTest( _T("(1*(2*(3*(4*(5*(6*(a+b)))))))"), 2160, true);
-      iStat += EqnTest( _T("(1*(2*(3*(4*(5*(6*(7*(a+b))))))))"), 15120, true);
-      iStat += EqnTest( _T("(a/((((b+(((e*(((((pi*((((3.45*((pi+a)+pi))+b)+b)*a))+0.68)+e)+a)/a))+a)+b))+b)*a)-pi))"), 0.00377999, true);
-
-      // long formula (Reference: Matlab)
-      iStat += EqnTest(
-        _T("(((-9))-e/(((((((pi-(((-7)+(-3)/4/e))))/(((-5))-2)-((pi+(-0))*(sqrt((e+e))*(-8))*(((-pi)+(-pi)-(-9)*(6*5))")
-        _T("/(-e)-e))/2)/((((sqrt(2/(-e)+6)-(4-2))+((5/(-2))/(1*(-pi)+3))/8)*pi*((pi/((-2)/(-6)*1*(-1))*(-6)+(-e)))))/")
-        _T("((e+(-2)+(-e)*((((-3)*9+(-e)))+(-9)))))))-((((e-7+(((5/pi-(3/1+pi)))))/e)/(-5))/(sqrt((((((1+(-7))))+((((-")
-        _T("e)*(-e)))-8))*(-5)/((-e)))*(-6)-((((((-2)-(-9)-(-e)-1)/3))))/(sqrt((8+(e-((-6))+(9*(-9))))*(((3+2-8))*(7+6")
-        _T("+(-5))+((0/(-e)*(-pi))+7)))+(((((-e)/e/e)+((-6)*5)*e+(3+(-5)/pi))))+pi))/sqrt((((9))+((((pi))-8+2))+pi))/e")
-        _T("*4)*((-5)/(((-pi))*(sqrt(e)))))-(((((((-e)*(e)-pi))/4+(pi)*(-9)))))))+(-pi)"), -12.23016549, true);
-
-      // long formula (Reference: Matlab)
-      iStat += EqnTest(
-          _T("(atan(sin((((((((((((((((pi/cos((a/((((0.53-b)-pi)*e)/b))))+2.51)+a)-0.54)/0.98)+b)*b)+e)/a)+b)+a)+b)+pi)/e")
-          _T(")+a)))*2.77)"), -2.16995656, true);
-
-      // long formula (Reference: Matlab)
-      iStat += EqnTest( _T("1+2-3*4/5^6*(2*(1-5+(3*7^9)*(4+6*7-3)))+12"), -7995810.09926, true);
-	  
-      if (iStat==0) 
-        mu::console() << _T("passed") << endl;  
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestIfThenElse()
-    {
-      int iStat = 0;
-      mu::console() << _T("testing if-then-else operator...");
-
-      // Test error detection
-      iStat += ThrowTest(_T(":3"), ecUNEXPECTED_CONDITIONAL); 
-      iStat += ThrowTest(_T("? 1 : 2"), ecUNEXPECTED_CONDITIONAL); 
-      iStat += ThrowTest(_T("(a<b) ? (b<c) ? 1 : 2"), ecMISSING_ELSE_CLAUSE); 
-      iStat += ThrowTest(_T("(a<b) ? 1"), ecMISSING_ELSE_CLAUSE); 
-      iStat += ThrowTest(_T("(a<b) ? a"), ecMISSING_ELSE_CLAUSE); 
-      iStat += ThrowTest(_T("(a<b) ? a+b"), ecMISSING_ELSE_CLAUSE); 
-      iStat += ThrowTest(_T("a : b"), ecMISPLACED_COLON); 
-      iStat += ThrowTest(_T("1 : 2"), ecMISPLACED_COLON); 
-      iStat += ThrowTest(_T("(1) ? 1 : 2 : 3"), ecMISPLACED_COLON); 
-      iStat += ThrowTest(_T("(true) ? 1 : 2 : 3"), ecUNASSIGNABLE_TOKEN); 
-
-      iStat += EqnTest(_T("1 ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("1<2 ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("a<b ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("(a<b) ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("(1) ? 10 : 11"), 10, true);
-      iStat += EqnTest(_T("(0) ? 10 : 11"), 11, true);
-      iStat += EqnTest(_T("(1) ? a+b : c+d"), 3, true);
-      iStat += EqnTest(_T("(0) ? a+b : c+d"), 1, true);
-      iStat += EqnTest(_T("(1) ? 0 : 1"), 0, true);
-      iStat += EqnTest(_T("(0) ? 0 : 1"), 1, true);
-      iStat += EqnTest(_T("(a<b) ? 10 : 11"), 10, true);
-      iStat += EqnTest(_T("(a>b) ? 10 : 11"), 11, true);
-      iStat += EqnTest(_T("(a<b) ? c : d"), 3, true);
-      iStat += EqnTest(_T("(a>b) ? c : d"), -2, true);
-
-      iStat += EqnTest(_T("(a>b) ? 1 : 0"), 0, true);
-      iStat += EqnTest(_T("((a>b) ? 1 : 0) ? 1 : 2"), 2, true);
-      iStat += EqnTest(_T("((a>b) ? 1 : 0) ? 1 : sum((a>b) ? 1 : 2)"), 2, true);
-      iStat += EqnTest(_T("((a>b) ? 0 : 1) ? 1 : sum((a>b) ? 1 : 2)"), 1, true);
-
-      iStat += EqnTest(_T("sum((a>b) ? 1 : 2)"), 2, true);
-      iStat += EqnTest(_T("sum((1) ? 1 : 2)"), 1, true);
-      iStat += EqnTest(_T("sum((a>b) ? 1 : 2, 100)"), 102, true);
-      iStat += EqnTest(_T("sum((1) ? 1 : 2, 100)"), 101, true);
-      iStat += EqnTest(_T("sum(3, (a>b) ? 3 : 10)"), 13, true);
-      iStat += EqnTest(_T("sum(3, (a<b) ? 3 : 10)"), 6, true);
-      iStat += EqnTest(_T("10*sum(3, (a>b) ? 3 : 10)"), 130, true);
-      iStat += EqnTest(_T("10*sum(3, (a<b) ? 3 : 10)"), 60, true);
-      iStat += EqnTest(_T("sum(3, (a>b) ? 3 : 10)*10"), 130, true);
-      iStat += EqnTest(_T("sum(3, (a<b) ? 3 : 10)*10"), 60, true);
-      iStat += EqnTest(_T("(a<b) ? sum(3, (a<b) ? 3 : 10)*10 : 99"), 60, true);
-      iStat += EqnTest(_T("(a>b) ? sum(3, (a<b) ? 3 : 10)*10 : 99"), 99, true);
-      iStat += EqnTest(_T("(a<b) ? sum(3, (a<b) ? 3 : 10,10,20)*10 : 99"), 360, true);
-      iStat += EqnTest(_T("(a>b) ? sum(3, (a<b) ? 3 : 10,10,20)*10 : 99"), 99, true);
-      iStat += EqnTest(_T("(a>b) ? sum(3, (a<b) ? 3 : 10,10,20)*10 : sum(3, (a<b) ? 3 : 10)*10"), 60, true);
-
-      // todo: also add for muParserX!
-      iStat += EqnTest(_T("(a<b)&&(a<b) ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("(a>b)&&(a<b) ? 128 : 255"), 255, true);
-      iStat += EqnTest(_T("(1<2)&&(1<2) ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("(1>2)&&(1<2) ? 128 : 255"), 255, true);
-      iStat += EqnTest(_T("((1<2)&&(1<2)) ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("((1>2)&&(1<2)) ? 128 : 255"), 255, true);
-      iStat += EqnTest(_T("((a<b)&&(a<b)) ? 128 : 255"), 128, true);
-      iStat += EqnTest(_T("((a>b)&&(a<b)) ? 128 : 255"), 255, true);
-
-      iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 : 1>0 ? 32 : 64"), 255, true);
-      iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 :(1>0 ? 32 : 64)"), 255, true);
-      iStat += EqnTest(_T("1>0 ? 1>0 ? 128 : 255 : 1>2 ? 32 : 64"), 128, true);
-      iStat += EqnTest(_T("1>0 ? 1>0 ? 128 : 255 :(1>2 ? 32 : 64)"), 128, true);
-      iStat += EqnTest(_T("1>2 ? 1>2 ? 128 : 255 : 1>0 ? 32 : 64"), 32, true);
-      iStat += EqnTest(_T("1>2 ? 1>0 ? 128 : 255 : 1>2 ? 32 : 64"), 64, true);
-      iStat += EqnTest(_T("1>0 ? 50 :  1>0 ? 128 : 255"), 50, true);
-      iStat += EqnTest(_T("1>0 ? 50 : (1>0 ? 128 : 255)"), 50, true);
-      iStat += EqnTest(_T("1>0 ? 1>0 ? 128 : 255 : 50"), 128, true);
-      iStat += EqnTest(_T("1>2 ? 1>2 ? 128 : 255 : 1>0 ? 32 : 1>2 ? 64 : 16"), 32, true);
-      iStat += EqnTest(_T("1>2 ? 1>2 ? 128 : 255 : 1>0 ? 32 :(1>2 ? 64 : 16)"), 32, true);
-      iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 :  1>0 ? 32 :1>2 ? 64 : 16"), 255, true);
-      iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 : (1>0 ? 32 :1>2 ? 64 : 16)"), 255, true);
-      iStat += EqnTest(_T("1 ? 0 ? 128 : 255 : 1 ? 32 : 64"), 255, true);
-
-      // assignment operators
-      iStat += EqnTest(_T("a= 0 ? 128 : 255, a"), 255, true);
-      iStat += EqnTest(_T("a=((a>b)&&(a<b)) ? 128 : 255, a"), 255, true);
-      iStat += EqnTest(_T("c=(a<b)&&(a<b) ? 128 : 255, c"), 128, true);
-      iStat += EqnTest(_T("0 ? a=a+1 : 666, a"), 1, true);
-      iStat += EqnTest(_T("1?a=10:a=20, a"), 10, true);
-      iStat += EqnTest(_T("0?a=10:a=20, a"), 20, true);
-      iStat += EqnTest(_T("0?a=sum(3,4):10, a"), 1, true);  // a should not change its value due to lazy calculation
-      
-      iStat += EqnTest(_T("a=1?b=1?3:4:5, a"), 3, true);
-      iStat += EqnTest(_T("a=1?b=1?3:4:5, b"), 3, true);
-      iStat += EqnTest(_T("a=0?b=1?3:4:5, a"), 5, true);
-      iStat += EqnTest(_T("a=0?b=1?3:4:5, b"), 2, true);
-
-      iStat += EqnTest(_T("a=1?5:b=1?3:4, a"), 5, true);
-      iStat += EqnTest(_T("a=1?5:b=1?3:4, b"), 2, true);
-      iStat += EqnTest(_T("a=0?5:b=1?3:4, a"), 3, true);
-      iStat += EqnTest(_T("a=0?5:b=1?3:4, b"), 3, true);
-
-      if (iStat==0) 
-        mu::console() << _T("passed") << endl;  
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-    //---------------------------------------------------------------------------
-    int ParserTester::TestException()
-    {
-      int  iStat = 0;
-      mu::console() << _T("testing error codes...");
-
-      iStat += ThrowTest(_T("3+"),           ecUNEXPECTED_EOF);
-      iStat += ThrowTest(_T("3+)"),          ecUNEXPECTED_PARENS);
-      iStat += ThrowTest(_T("()"),           ecUNEXPECTED_PARENS);
-      iStat += ThrowTest(_T("3+()"),         ecUNEXPECTED_PARENS);
-      iStat += ThrowTest(_T("sin(3,4)"),     ecTOO_MANY_PARAMS);
-      iStat += ThrowTest(_T("sin()"),        ecTOO_FEW_PARAMS);
-      iStat += ThrowTest(_T("(1+2"),         ecMISSING_PARENS);
-      iStat += ThrowTest(_T("sin(3)3"),      ecUNEXPECTED_VAL);
-      iStat += ThrowTest(_T("sin(3)xyz"),    ecUNASSIGNABLE_TOKEN);
-      iStat += ThrowTest(_T("sin(3)cos(3)"), ecUNEXPECTED_FUN);
-      iStat += ThrowTest(_T("a+b+c=10"),     ecUNEXPECTED_OPERATOR);
-      iStat += ThrowTest(_T("a=b=3"),        ecUNEXPECTED_OPERATOR);
-      
-#if defined(MUP_MATH_EXCEPTIONS)
-      // divide by zero whilst constant folding
-      iStat += ThrowTest(_T("1/0"),          ecDIV_BY_ZERO);
-      // square root of a negative number
-      iStat += ThrowTest(_T("sqrt(-1)"),     ecDOMAIN_ERROR);
-      // logarithms of zero
-      iStat += ThrowTest(_T("ln(0)"),        ecDOMAIN_ERROR);
-      iStat += ThrowTest(_T("log2(0)"),      ecDOMAIN_ERROR);
-      iStat += ThrowTest(_T("log10(0)"),     ecDOMAIN_ERROR);
-      iStat += ThrowTest(_T("log(0)"),       ecDOMAIN_ERROR);
-      // logarithms of negative values
-      iStat += ThrowTest(_T("ln(-1)"),       ecDOMAIN_ERROR);
-      iStat += ThrowTest(_T("log2(-1)"),     ecDOMAIN_ERROR);
-      iStat += ThrowTest(_T("log10(-1)"),    ecDOMAIN_ERROR);
-      iStat += ThrowTest(_T("log(-1)"),      ecDOMAIN_ERROR);
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		int ParserTester::TestBinOprt()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing binary operators...");
+
+			// built in operators
+			// xor operator
+
+			iStat += EqnTest(_T("a++b"), 3, true);
+			iStat += EqnTest(_T("a ++ b"), 3, true);
+			iStat += EqnTest(_T("1++2"), 3, true);
+			iStat += EqnTest(_T("1 ++ 2"), 3, true);
+			iStat += EqnTest(_T("a add b"), 3, true);
+			iStat += EqnTest(_T("1 add 2"), 3, true);
+			iStat += EqnTest(_T("a<b"), 1, true);
+			iStat += EqnTest(_T("b>a"), 1, true);
+			iStat += EqnTest(_T("a>a"), 0, true);
+			iStat += EqnTest(_T("a<a"), 0, true);
+			iStat += EqnTest(_T("a>a"), 0, true);
+			iStat += EqnTest(_T("a<=a"), 1, true);
+			iStat += EqnTest(_T("a<=b"), 1, true);
+			iStat += EqnTest(_T("b<=a"), 0, true);
+			iStat += EqnTest(_T("a>=a"), 1, true);
+			iStat += EqnTest(_T("b>=a"), 1, true);
+			iStat += EqnTest(_T("a>=b"), 0, true);
+
+			// Test logical operators, especially if user defined "&" and the internal "&&" collide
+			iStat += EqnTest(_T("1 && 1"), 1, true);
+			iStat += EqnTest(_T("1 && 0"), 0, true);
+			iStat += EqnTest(_T("(a<b) && (b>a)"), 1, true);
+			iStat += EqnTest(_T("(a<b) && (a>b)"), 0, true);
+			//iStat += EqnTest(_T("12 and 255"), 12, true); 
+			//iStat += EqnTest(_T("12 and 0"), 0, true); 
+			iStat += EqnTest(_T("12 & 255"), 12, true);
+			iStat += EqnTest(_T("12 & 0"), 0, true);
+			iStat += EqnTest(_T("12&255"), 12, true);
+			iStat += EqnTest(_T("12&0"), 0, true);
+
+			// Assignment operator
+			iStat += EqnTest(_T("a = b"), 2, true);
+			iStat += EqnTest(_T("a = sin(b)"), 0.909297, true);
+			iStat += EqnTest(_T("a = 1+sin(b)"), 1.909297, true);
+			iStat += EqnTest(_T("(a=b)*2"), 4, true);
+			iStat += EqnTest(_T("2*(a=b)"), 4, true);
+			iStat += EqnTest(_T("2*(a=b+1)"), 6, true);
+			iStat += EqnTest(_T("(a=b+1)*2"), 6, true);
+			iStat += EqnTest(_T("a=c, a*10"), 30, true);
+
+			iStat += EqnTest(_T("2^2^3"), 256, true);
+			iStat += EqnTest(_T("1/2/3"), 1.0 / 6.0, true);
+
+			// reference: http://www.wolframalpha.com/input/?i=3%2B4*2%2F%281-5%29^2^3
+			iStat += EqnTest(_T("3+4*2/(1-5)^2^3"), 3.0001220703125, true);
+
+			// Test user defined binary operators
+			iStat += EqnTestInt(_T("1 | 2"), 3, true);
+			iStat += EqnTestInt(_T("1 || 2"), 1, true);
+			iStat += EqnTestInt(_T("123 & 456"), 72, true);
+			iStat += EqnTestInt(_T("(123 & 456) % 10"), 2, true);
+			iStat += EqnTestInt(_T("1 && 0"), 0, true);
+			iStat += EqnTestInt(_T("123 && 456"), 1, true);
+			iStat += EqnTestInt(_T("1 << 3"), 8, true);
+			iStat += EqnTestInt(_T("8 >> 3"), 1, true);
+			iStat += EqnTestInt(_T("9 / 4"), 2, true);
+			iStat += EqnTestInt(_T("9 % 4"), 1, true);
+			iStat += EqnTestInt(_T("if(5%2,1,0)"), 1, true);
+			iStat += EqnTestInt(_T("if(4%2,1,0)"), 0, true);
+			iStat += EqnTestInt(_T("-10+1"), -9, true);
+			iStat += EqnTestInt(_T("1+2*3"), 7, true);
+			iStat += EqnTestInt(_T("const1 != const2"), 1, true);
+			iStat += EqnTestInt(_T("const1 != const2"), 0, false);
+			iStat += EqnTestInt(_T("const1 == const2"), 0, true);
+			iStat += EqnTestInt(_T("const1 == 1"), 1, true);
+			iStat += EqnTestInt(_T("10*(const1 == 1)"), 10, true);
+			iStat += EqnTestInt(_T("2*(const1 | const2)"), 6, true);
+			iStat += EqnTestInt(_T("2*(const1 | const2)"), 7, false);
+			iStat += EqnTestInt(_T("const1 < const2"), 1, true);
+			iStat += EqnTestInt(_T("const2 > const1"), 1, true);
+			iStat += EqnTestInt(_T("const1 <= 1"), 1, true);
+			iStat += EqnTestInt(_T("const2 >= 2"), 1, true);
+			iStat += EqnTestInt(_T("2*(const1 + const2)"), 6, true);
+			iStat += EqnTestInt(_T("2*(const1 - const2)"), -2, true);
+			iStat += EqnTestInt(_T("a != b"), 1, true);
+			iStat += EqnTestInt(_T("a != b"), 0, false);
+			iStat += EqnTestInt(_T("a == b"), 0, true);
+			iStat += EqnTestInt(_T("a == 1"), 1, true);
+			iStat += EqnTestInt(_T("10*(a == 1)"), 10, true);
+			iStat += EqnTestInt(_T("2*(a | b)"), 6, true);
+			iStat += EqnTestInt(_T("2*(a | b)"), 7, false);
+			iStat += EqnTestInt(_T("a < b"), 1, true);
+			iStat += EqnTestInt(_T("b > a"), 1, true);
+			iStat += EqnTestInt(_T("a <= 1"), 1, true);
+			iStat += EqnTestInt(_T("b >= 2"), 1, true);
+			iStat += EqnTestInt(_T("2*(a + b)"), 6, true);
+			iStat += EqnTestInt(_T("2*(a - b)"), -2, true);
+			iStat += EqnTestInt(_T("a + (a << b)"), 5, true);
+			iStat += EqnTestInt(_T("-2^2"), -4, true);
+			iStat += EqnTestInt(_T("3--a"), 4, true);
+			iStat += EqnTestInt(_T("3+-3^2"), -6, true);
+
+			// Test reading of hex values:
+			iStat += EqnTestInt(_T("0xff"), 255, true);
+			iStat += EqnTestInt(_T("10+0xff"), 265, true);
+			iStat += EqnTestInt(_T("0xff+10"), 265, true);
+			iStat += EqnTestInt(_T("10*0xff"), 2550, true);
+			iStat += EqnTestInt(_T("0xff*10"), 2550, true);
+			iStat += EqnTestInt(_T("10+0xff+1"), 266, true);
+			iStat += EqnTestInt(_T("1+0xff+10"), 266, true);
+
+			// incorrect: '^' is yor here, not power
+			//    iStat += EqnTestInt("-(1+2)^2", -9, true);
+			//    iStat += EqnTestInt("-1^3", -1, true);          
+
+				  // Test precedence
+				  // a=1, b=2, c=3
+			iStat += EqnTestInt(_T("a + b * c"), 7, true);
+			iStat += EqnTestInt(_T("a * b + c"), 5, true);
+			iStat += EqnTestInt(_T("a<b && b>10"), 0, true);
+			iStat += EqnTestInt(_T("a<b && b<10"), 1, true);
+
+			iStat += EqnTestInt(_T("a + b << c"), 17, true);
+			iStat += EqnTestInt(_T("a << b + c"), 7, true);
+			iStat += EqnTestInt(_T("c * b < a"), 0, true);
+			iStat += EqnTestInt(_T("c * b == 6 * a"), 1, true);
+			iStat += EqnTestInt(_T("2^2^3"), 256, true);
+
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------------------------
+		/** \brief Check muParser name restriction enforcement. */
+		int ParserTester::TestNames()
+		{
+			int  iStat = 0,
+				iErr = 0;
+
+			mu::console() << "testing name restriction enforcement...";
+
+			Parser p;
+
+#define PARSER_THROWCHECK(DOMAIN, FAIL, EXPR, ARG)	\
+			iErr = 0;										\
+			ParserTester::c_iCount++;						\
+			try												\
+			{												\
+				p.Define##DOMAIN(EXPR, ARG);                \
+				iErr = (FAIL) ? 0 : 1;						\
+			}												\
+			catch(...)										\
+			{												\
+				iErr = (!FAIL) ? 0 : 1;						\
+			}												\
+			iStat += iErr;      
+
+			// constant names
+			PARSER_THROWCHECK(Const, false, _T("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), 1)
+				PARSER_THROWCHECK(Const, false, _T("0a"), 1)
+				PARSER_THROWCHECK(Const, false, _T("9a"), 1)
+				PARSER_THROWCHECK(Const, false, _T("+a"), 1)
+				PARSER_THROWCHECK(Const, false, _T("-a"), 1)
+				PARSER_THROWCHECK(Const, false, _T("a-"), 1)
+				PARSER_THROWCHECK(Const, false, _T("a*"), 1)
+				PARSER_THROWCHECK(Const, false, _T("a?"), 1)
+				PARSER_THROWCHECK(Const, true, _T("a"), 1)
+				PARSER_THROWCHECK(Const, true, _T("a_min"), 1)
+				PARSER_THROWCHECK(Const, true, _T("a_min0"), 1)
+				PARSER_THROWCHECK(Const, true, _T("a_min9"), 1)
+
+				// variable names
+				value_type a;
+			p.ClearConst();
+			PARSER_THROWCHECK(Var, false, _T("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), &a);
+			PARSER_THROWCHECK(Var, false, _T("123abc"), &a)
+				PARSER_THROWCHECK(Var, false, _T("9a"), &a)
+				PARSER_THROWCHECK(Var, false, _T("0a"), &a)
+				PARSER_THROWCHECK(Var, false, _T("+a"), &a)
+				PARSER_THROWCHECK(Var, false, _T("-a"), &a)
+				PARSER_THROWCHECK(Var, false, _T("?a"), &a)
+				PARSER_THROWCHECK(Var, false, _T("!a"), &a)
+				PARSER_THROWCHECK(Var, false, _T("a+"), &a)
+				PARSER_THROWCHECK(Var, false, _T("a-"), &a)
+				PARSER_THROWCHECK(Var, false, _T("a*"), &a)
+				PARSER_THROWCHECK(Var, false, _T("a?"), &a)
+				PARSER_THROWCHECK(Var, true, _T("a"), &a)
+				PARSER_THROWCHECK(Var, true, _T("a_min"), &a)
+				PARSER_THROWCHECK(Var, true, _T("a_min0"), &a)
+				PARSER_THROWCHECK(Var, true, _T("a_min9"), &a)
+				PARSER_THROWCHECK(Var, false, _T("a_min9"), 0)
+
+				// Postfix operators
+				// fail
+				PARSER_THROWCHECK(PostfixOprt, false, _T("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), f1of1);
+			PARSER_THROWCHECK(PostfixOprt, false, _T("(k"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, false, _T("9+"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, false, _T("+"), 0)
+				// pass
+				PARSER_THROWCHECK(PostfixOprt, true, _T("-a"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("?a"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("_"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("#"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("&&"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("||"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("&"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("|"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("++"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("--"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("?>"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("?<"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("**"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("xor"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("and"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("or"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("not"), f1of1)
+				PARSER_THROWCHECK(PostfixOprt, true, _T("!"), f1of1)
+
+				// Binary operator
+				// The following must fail with builtin operators activated
+				// p.EnableBuiltInOp(true); -> this is the default
+				p.ClearPostfixOprt();
+			PARSER_THROWCHECK(Oprt, false, _T("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), f1of2);
+			PARSER_THROWCHECK(Oprt, false, _T("+"), f1of2)
+				PARSER_THROWCHECK(Oprt, false, _T("-"), f1of2)
+				PARSER_THROWCHECK(Oprt, false, _T("*"), f1of2)
+				PARSER_THROWCHECK(Oprt, false, _T("/"), f1of2)
+				PARSER_THROWCHECK(Oprt, false, _T("^"), f1of2)
+				PARSER_THROWCHECK(Oprt, false, _T("&&"), f1of2)
+				PARSER_THROWCHECK(Oprt, false, _T("||"), f1of2)
+
+				// without activated built in operators it should work
+				p.EnableBuiltInOprt(false);
+			PARSER_THROWCHECK(Oprt, true, _T("+"), f1of2)
+				PARSER_THROWCHECK(Oprt, true, _T("-"), f1of2)
+				PARSER_THROWCHECK(Oprt, true, _T("*"), f1of2)
+				PARSER_THROWCHECK(Oprt, true, _T("/"), f1of2)
+				PARSER_THROWCHECK(Oprt, true, _T("^"), f1of2)
+				PARSER_THROWCHECK(Oprt, true, _T("&&"), f1of2)
+				PARSER_THROWCHECK(Oprt, true, _T("||"), f1of2)
+#undef PARSER_THROWCHECK
+
+				if (iStat == 0)
+					mu::console() << _T("passed") << endl;
+				else
+					mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestSyntax()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing syntax engine...");
+
+			iStat += ThrowTest(_T("1,"), ecUNEXPECTED_EOF);  // incomplete hex definition
+			iStat += ThrowTest(_T("a,"), ecUNEXPECTED_EOF);  // incomplete hex definition
+			iStat += ThrowTest(_T("sin(8),"), ecUNEXPECTED_EOF);  // incomplete hex definition
+			iStat += ThrowTest(_T("(sin(8)),"), ecUNEXPECTED_EOF);  // incomplete hex definition
+			iStat += ThrowTest(_T("a{m},"), ecUNEXPECTED_EOF);  // incomplete hex definition
+
+			iStat += EqnTest(_T("(1+ 2*a)"), 3, true);   // Spaces within formula
+			iStat += EqnTest(_T("sqrt((4))"), 2, true);  // Multiple brackets
+			iStat += EqnTest(_T("sqrt((2)+2)"), 2, true);// Multiple brackets
+			iStat += EqnTest(_T("sqrt(2+(2))"), 2, true);// Multiple brackets
+			iStat += EqnTest(_T("sqrt(a+(3))"), 2, true);// Multiple brackets
+			iStat += EqnTest(_T("sqrt((3)+a)"), 2, true);// Multiple brackets
+			iStat += EqnTest(_T("order(1,2)"), 1, true); // May not cause name collision with operator "or"
+			iStat += EqnTest(_T("(2+"), 0, false);       // missing closing bracket 
+			iStat += EqnTest(_T("2++4"), 0, false);      // unexpected operator
+			iStat += EqnTest(_T("2+-4"), 0, false);      // unexpected operator
+			iStat += EqnTest(_T("(2+)"), 0, false);      // unexpected closing bracket
+			iStat += EqnTest(_T("--2"), 0, false);       // double sign
+			iStat += EqnTest(_T("ksdfj"), 0, false);     // unknown token
+			iStat += EqnTest(_T("()"), 0, false);        // empty bracket without a function
+			iStat += EqnTest(_T("5+()"), 0, false);      // empty bracket without a function
+			iStat += EqnTest(_T("sin(cos)"), 0, false);  // unexpected function
+			iStat += EqnTest(_T("5t6"), 0, false);       // unknown token
+			iStat += EqnTest(_T("5 t 6"), 0, false);     // unknown token
+			iStat += EqnTest(_T("8*"), 0, false);        // unexpected end of formula
+			iStat += EqnTest(_T(",3"), 0, false);        // unexpected comma
+			iStat += EqnTest(_T("3,5"), 0, false);       // unexpected comma
+			iStat += EqnTest(_T("sin(8,8)"), 0, false);  // too many function args
+			iStat += EqnTest(_T("(7,8)"), 0, false);     // too many function args
+			iStat += EqnTest(_T("sin)"), 0, false);      // unexpected closing bracket
+			iStat += EqnTest(_T("a)"), 0, false);        // unexpected closing bracket
+			iStat += EqnTest(_T("pi)"), 0, false);       // unexpected closing bracket
+			iStat += EqnTest(_T("sin(())"), 0, false);   // unexpected closing bracket
+			iStat += EqnTest(_T("sin()"), 0, false);     // unexpected closing bracket
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestVarConst()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing variable/constant detection...");
+
+			// Test if the result changes when a variable changes
+			iStat += EqnTestWithVarChange(_T("a"), 1, 1, 2, 2);
+			iStat += EqnTestWithVarChange(_T("2*a"), 2, 4, 3, 6);
+
+			// distinguish constants with same basename
+			iStat += EqnTest(_T("const"), 1, true);
+			iStat += EqnTest(_T("const1"), 2, true);
+			iStat += EqnTest(_T("const2"), 3, true);
+			iStat += EqnTest(_T("2*const"), 2, true);
+			iStat += EqnTest(_T("2*const1"), 4, true);
+			iStat += EqnTest(_T("2*const2"), 6, true);
+			iStat += EqnTest(_T("2*const+1"), 3, true);
+			iStat += EqnTest(_T("2*const1+1"), 5, true);
+			iStat += EqnTest(_T("2*const2+1"), 7, true);
+			iStat += EqnTest(_T("const"), 0, false);
+			iStat += EqnTest(_T("const1"), 0, false);
+			iStat += EqnTest(_T("const2"), 0, false);
+
+			// distinguish variables with same basename
+			iStat += EqnTest(_T("a"), 1, true);
+			iStat += EqnTest(_T("aa"), 2, true);
+			iStat += EqnTest(_T("2*a"), 2, true);
+			iStat += EqnTest(_T("2*aa"), 4, true);
+			iStat += EqnTest(_T("2*a-1"), 1, true);
+			iStat += EqnTest(_T("2*aa-1"), 3, true);
+
+			// custom value recognition
+			iStat += EqnTest(_T("0xff"), 255, true);
+			iStat += EqnTest(_T("0x97 + 0xff"), 406, true);
+
+			// Finally test querying of used variables
+			try
+			{
+				int idx;
+				mu::Parser p;
+				mu::value_type vVarVal[] = { 1, 2, 3, 4, 5 };
+				p.DefineVar(_T("a"), &vVarVal[0]);
+				p.DefineVar(_T("b"), &vVarVal[1]);
+				p.DefineVar(_T("c"), &vVarVal[2]);
+				p.DefineVar(_T("d"), &vVarVal[3]);
+				p.DefineVar(_T("e"), &vVarVal[4]);
+
+				// Test lookup of defined variables
+				// 4 used variables
+				p.SetExpr(_T("a+b+c+d"));
+				mu::varmap_type UsedVar = p.GetUsedVar();
+				int iCount = (int)UsedVar.size();
+				if (iCount != 4)
+					throw false;
+
+				// the next check will fail if the parser 
+				// erroneously creates new variables internally
+				if (p.GetVar().size() != 5)
+					throw false;
+
+				mu::varmap_type::const_iterator item = UsedVar.begin();
+				for (idx = 0; item != UsedVar.end(); ++item)
+				{
+					if (&vVarVal[idx++] != item->second)
+						throw false;
+				}
+
+				// Test lookup of undefined variables
+				p.SetExpr(_T("undef1+undef2+undef3"));
+				UsedVar = p.GetUsedVar();
+				iCount = (int)UsedVar.size();
+				if (iCount != 3)
+					throw false;
+
+				// the next check will fail if the parser 
+				// erroneously creates new variables internally
+				if (p.GetVar().size() != 5)
+					throw false;
+
+				for (item = UsedVar.begin(); item != UsedVar.end(); ++item)
+				{
+					if (item->second != 0)
+						throw false; // all pointers to undefined variables must be null
+				}
+
+				// 1 used variables
+				p.SetExpr(_T("a+b"));
+				UsedVar = p.GetUsedVar();
+				iCount = (int)UsedVar.size();
+				if (iCount != 2) throw false;
+				item = UsedVar.begin();
+				for (idx = 0; item != UsedVar.end(); ++item)
+					if (&vVarVal[idx++] != item->second) throw false;
+
+			}
+			catch (...)
+			{
+				iStat += 1;
+			}
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestMultiArg()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing multiarg functions...");
+
+			// from oss-fzz.com: UNKNOWN READ; https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=23330#c1
+			iStat += ThrowTest(_T("6, +, +, +, +, +, +, +, +, +, +, +, +, +, +, 1, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +, +"), ecUNEXPECTED_ARG_SEP, true);
+
+			// misplaced string argument			
+			iStat += ThrowTest(_T(R"(sin(0?4:("")))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(avg(0?4:(""),1))"), ecUNEXPECTED_STR);
+
+			// Compound expressions
+			iStat += EqnTest(_T("1,2,3"), 3, true);
+			iStat += EqnTest(_T("a,b,c"), 3, true);
+			iStat += EqnTest(_T("a=10,b=20,c=a*b"), 200, true);
+			iStat += EqnTest(_T("1,\n2,\n3"), 3, true);
+			iStat += EqnTest(_T("a,\nb,\nc"), 3, true);
+			iStat += EqnTest(_T("a=10,\nb=20,\nc=a*b"), 200, true);
+			iStat += EqnTest(_T("1,\r\n2,\r\n3"), 3, true);
+			iStat += EqnTest(_T("a,\r\nb,\r\nc"), 3, true);
+			iStat += EqnTest(_T("a=10,\r\nb=20,\r\nc=a*b"), 200, true);
+
+			// picking the right argument
+			iStat += EqnTest(_T("f1of1(1)"), 1, true);
+			iStat += EqnTest(_T("f1of2(1, 2)"), 1, true);
+			iStat += EqnTest(_T("f2of2(1, 2)"), 2, true);
+			iStat += EqnTest(_T("f1of3(1, 2, 3)"), 1, true);
+			iStat += EqnTest(_T("f2of3(1, 2, 3)"), 2, true);
+			iStat += EqnTest(_T("f3of3(1, 2, 3)"), 3, true);
+			iStat += EqnTest(_T("f1of4(1, 2, 3, 4)"), 1, true);
+			iStat += EqnTest(_T("f2of4(1, 2, 3, 4)"), 2, true);
+			iStat += EqnTest(_T("f3of4(1, 2, 3, 4)"), 3, true);
+			iStat += EqnTest(_T("f4of4(1, 2, 3, 4)"), 4, true);
+			iStat += EqnTest(_T("f1of5(1, 2, 3, 4, 5)"), 1, true);
+			iStat += EqnTest(_T("f2of5(1, 2, 3, 4, 5)"), 2, true);
+			iStat += EqnTest(_T("f3of5(1, 2, 3, 4, 5)"), 3, true);
+			iStat += EqnTest(_T("f4of5(1, 2, 3, 4, 5)"), 4, true);
+			iStat += EqnTest(_T("f5of5(1, 2, 3, 4, 5)"), 5, true);
+			// Too few arguments / Too many arguments
+			iStat += EqnTest(_T("1+ping()"), 11, true);
+			iStat += EqnTest(_T("ping()+1"), 11, true);
+			iStat += EqnTest(_T("2*ping()"), 20, true);
+			iStat += EqnTest(_T("ping()*2"), 20, true);
+			iStat += EqnTest(_T("ping(1,2)"), 0, false);
+			iStat += EqnTest(_T("1+ping(1,2)"), 0, false);
+			iStat += EqnTest(_T("f1of1(1,2)"), 0, false);
+			iStat += EqnTest(_T("f1of1()"), 0, false);
+			iStat += EqnTest(_T("f1of2(1, 2, 3)"), 0, false);
+			iStat += EqnTest(_T("f1of2(1)"), 0, false);
+			iStat += EqnTest(_T("f1of3(1, 2, 3, 4)"), 0, false);
+			iStat += EqnTest(_T("f1of3(1)"), 0, false);
+			iStat += EqnTest(_T("f1of4(1, 2, 3, 4, 5)"), 0, false);
+			iStat += EqnTest(_T("f1of4(1)"), 0, false);
+			iStat += EqnTest(_T("(1,2,3)"), 0, false);
+			iStat += EqnTest(_T("1,2,3"), 0, false);
+			iStat += EqnTest(_T("(1*a,2,3)"), 0, false);
+			iStat += EqnTest(_T("1,2*a,3"), 0, false);
+
+			// correct calculation of arguments
+			iStat += EqnTest(_T("min(a, 1)"), 1, true);
+			iStat += EqnTest(_T("min(3*2, 1)"), 1, true);
+			iStat += EqnTest(_T("min(3*2, 1)"), 6, false);
+			iStat += EqnTest(_T("firstArg(2,3,4)"), 2, true);
+			iStat += EqnTest(_T("lastArg(2,3,4)"), 4, true);
+			iStat += EqnTest(_T("min(3*a+1, 1)"), 1, true);
+			iStat += EqnTest(_T("max(3*a+1, 1)"), 4, true);
+			iStat += EqnTest(_T("max(3*a+1, 1)*2"), 8, true);
+			iStat += EqnTest(_T("2*max(3*a+1, 1)+2"), 10, true);
+
+			// functions with Variable argument count
+			iStat += EqnTest(_T("sum(a)"), 1, true);
+			iStat += EqnTest(_T("sum(1,2,3)"), 6, true);
+			iStat += EqnTest(_T("sum(a,b,c)"), 6, true);
+			iStat += EqnTest(_T("sum(1,-max(1,2),3)*2"), 4, true);
+			iStat += EqnTest(_T("2*sum(1,2,3)"), 12, true);
+			iStat += EqnTest(_T("2*sum(1,2,3)+2"), 14, true);
+			iStat += EqnTest(_T("2*sum(-1,2,3)+2"), 10, true);
+			iStat += EqnTest(_T("2*sum(-1,2,-(-a))+2"), 6, true);
+			iStat += EqnTest(_T("2*sum(-1,10,-a)+2"), 18, true);
+			iStat += EqnTest(_T("2*sum(1,2,3)*2"), 24, true);
+			iStat += EqnTest(_T("sum(1,-max(1,2),3)*2"), 4, true);
+			iStat += EqnTest(_T("sum(1*3, 4, a+2)"), 10, true);
+			iStat += EqnTest(_T("sum(1*3, 2*sum(1,2,2), a+2)"), 16, true);
+			iStat += EqnTest(_T("sum(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)"), 24, true);
+
+			// some failures
+			iStat += EqnTest(_T("sum()"), 0, false);
+			iStat += EqnTest(_T("sum(,)"), 0, false);
+			iStat += EqnTest(_T("sum(1,2,)"), 0, false);
+			iStat += EqnTest(_T("sum(,1,2)"), 0, false);
+
+			// user data
+			iStat += EqnTest(_T("funud0_8()"), 8, true);
+			iStat += EqnTest(_T("funud1_16(10)"), 26, true);
+			iStat += EqnTest(_T("funud2_24(10, 100)"), 134, true);
+			iStat += EqnTest(_T("funud10_32(1,2,3,4,5,6,7,8,9,10)"), 87, true);
+			iStat += EqnTest(_T("funud0_9()"), 9, true);
+			iStat += EqnTest(_T("funud1_17(10)"), 27, true);
+			iStat += EqnTest(_T("funud2_25(10, 100)"), 135, true);
+			iStat += EqnTest(_T("funud10_33(1,2,3,4,5,6,7,8,9,10)"), 88, true);
+			iStat += EqnTest(_T("sumud_100(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2)"), 124, true);
+			iStat += EqnTest(_T("sumud_100()"), 0, false);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestInfixOprt()
+		{
+			int iStat(0);
+			mu::console() << "testing infix operators...";
+
+			iStat += EqnTest(_T("+1"), +1, true);
+			iStat += EqnTest(_T("-(+1)"), -1, true);
+			iStat += EqnTest(_T("-(+1)*2"), -2, true);
+			iStat += EqnTest(_T("-(+2)*sqrt(4)"), -4, true);
+			iStat += EqnTest(_T("3-+a"), 2, true);
+			iStat += EqnTest(_T("+1*3"), 3, true);
+
+			iStat += EqnTest(_T("-1"), -1, true);
+			iStat += EqnTest(_T("-(-1)"), 1, true);
+			iStat += EqnTest(_T("-(-1)*2"), 2, true);
+			iStat += EqnTest(_T("-(-2)*sqrt(4)"), 4, true);
+			iStat += EqnTest(_T("-_pi"), -MathImpl<double>::CONST_PI, true);
+			iStat += EqnTest(_T("-a"), -1, true);
+			iStat += EqnTest(_T("-(a)"), -1, true);
+			iStat += EqnTest(_T("-(-a)"), 1, true);
+			iStat += EqnTest(_T("-(-a)*2"), 2, true);
+			iStat += EqnTest(_T("-(8)"), -8, true);
+			iStat += EqnTest(_T("-8"), -8, true);
+			iStat += EqnTest(_T("-(2+1)"), -3, true);
+			iStat += EqnTest(_T("-(f1of1(1+2*3)+1*2)"), -9, true);
+			iStat += EqnTest(_T("-(-f1of1(1+2*3)+1*2)"), 5, true);
+			iStat += EqnTest(_T("-sin(8)"), -0.989358, true);
+			iStat += EqnTest(_T("3-(-a)"), 4, true);
+			iStat += EqnTest(_T("3--a"), 4, true);
+			iStat += EqnTest(_T("-1*3"), -3, true);
+
+			// Postfix / infix priorities
+			iStat += EqnTest(_T("~2#"), 8, true);
+			iStat += EqnTest(_T("~f1of1(2)#"), 8, true);
+			iStat += EqnTest(_T("~(b)#"), 8, true);
+			iStat += EqnTest(_T("(~b)#"), 12, true);
+			iStat += EqnTest(_T("~(2#)"), 8, true);
+			iStat += EqnTest(_T("~(f1of1(2)#)"), 8, true);
+			//
+			iStat += EqnTest(_T("-2^2"), -4, true);
+			iStat += EqnTest(_T("-(a+b)^2"), -9, true);
+			iStat += EqnTest(_T("(-3)^2"), 9, true);
+			iStat += EqnTest(_T("-(-2^2)"), 4, true);
+			iStat += EqnTest(_T("3+-3^2"), -6, true);
+			// The following assumes use of sqr as postfix operator together
+			// with a sign operator of low priority:
+			iStat += EqnTest(_T("-2'"), -4, true);
+			iStat += EqnTest(_T("-(1+1)'"), -4, true);
+			iStat += EqnTest(_T("2+-(1+1)'"), -2, true);
+			iStat += EqnTest(_T("2+-2'"), -2, true);
+			// This is the classic behaviour of the infix sign operator (here: "$") which is
+			// now deprecated:
+			iStat += EqnTest(_T("$2^2"), 4, true);
+			iStat += EqnTest(_T("$(a+b)^2"), 9, true);
+			iStat += EqnTest(_T("($3)^2"), 9, true);
+			iStat += EqnTest(_T("$($2^2)"), -4, true);
+			iStat += EqnTest(_T("3+$3^2"), 12, true);
+
+			// infix operators sharing the first few characters
+			iStat += EqnTest(_T("~ 123"), (value_type)123.0 + 2, true);
+			iStat += EqnTest(_T("~~ 123"), (value_type)123.0 + 2, true);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestPostFix()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing postfix operators...");
+
+			// application
+			iStat += EqnTest(_T("3{m}+5"), 5.003, true);
+			iStat += EqnTest(_T("1000{m}"), 1, true);
+			iStat += EqnTest(_T("1000 {m}"), 1, true);
+			iStat += EqnTest(_T("(a){m}"), 1e-3, true);
+			iStat += EqnTest(_T("a{m}"), 1e-3, true);
+			iStat += EqnTest(_T("a {m}"), 1e-3, true);
+			iStat += EqnTest(_T("-(a){m}"), -1e-3, true);
+			iStat += EqnTest(_T("-2{m}"), -2e-3, true);
+			iStat += EqnTest(_T("-2 {m}"), -2e-3, true);
+			iStat += EqnTest(_T("f1of1(1000){m}"), 1, true);
+			iStat += EqnTest(_T("-f1of1(1000){m}"), -1, true);
+			iStat += EqnTest(_T("-f1of1(-1000){m}"), 1, true);
+			iStat += EqnTest(_T("f4of4(0,0,0,1000){m}"), 1, true);
+			iStat += EqnTest(_T("2+(a*1000){m}"), 3, true);
+
+			// can postfix operators "m" und "meg" be told apart properly?
+			iStat += EqnTest(_T("2*3000meg+2"), 2 * 3e9 + 2, true);
+
+			// some incorrect results
+			iStat += EqnTest(_T("1000{m}"), 0.1, false);
+			iStat += EqnTest(_T("(a){m}"), 2, false);
+			// failure due to syntax checking
+			iStat += ThrowTest(_T("0x"), ecUNASSIGNABLE_TOKEN);  // incomplete hex definition
+			iStat += ThrowTest(_T("3+"), ecUNEXPECTED_EOF);
+			iStat += ThrowTest(_T("4 + {m}"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("{m}4"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("sin({m})"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("{m} {m}"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("{m}(8)"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("4,{m}"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("-{m}"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("2(-{m})"), ecUNEXPECTED_PARENS);
+			iStat += ThrowTest(_T("2({m})"), ecUNEXPECTED_PARENS);
+
+			iStat += ThrowTest(_T("multi*1.0"), ecUNASSIGNABLE_TOKEN);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestExpression()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing expression samples...");
+
+			value_type b = 2;
+
+			iStat += EqnTest(_T("f0()"), 42, true);
+			iStat += EqnTest(_T("b^2"), 4, true);
+			iStat += EqnTest(_T("b^1"), 2, true);
+			iStat += EqnTest(_T("b^0"), 1, true);
+			iStat += EqnTest(_T("b^-1"), 0.5, true);
+
+			// Optimization
+			iStat += EqnTest(_T("2*b*5"), 20, true);
+			iStat += EqnTest(_T("2*b*5 + 4*b"), 28, true);
+			iStat += EqnTest(_T("2*a/3"), 2.0 / 3.0, true);
+
+			// Addition auf cmVARMUL 
+			iStat += EqnTest(_T("3+b"), b + 3, true);
+			iStat += EqnTest(_T("b+3"), b + 3, true);
+			iStat += EqnTest(_T("b*3+2"), b * 3 + 2, true);
+			iStat += EqnTest(_T("3*b+2"), b * 3 + 2, true);
+			iStat += EqnTest(_T("2+b*3"), b * 3 + 2, true);
+			iStat += EqnTest(_T("2+3*b"), b * 3 + 2, true);
+			iStat += EqnTest(_T("b+3*b"), b + 3 * b, true);
+			iStat += EqnTest(_T("3*b+b"), b + 3 * b, true);
+
+			iStat += EqnTest(_T("2+b*3+b"), 2 + b * 3 + b, true);
+			iStat += EqnTest(_T("b+2+b*3"), b + 2 + b * 3, true);
+
+			iStat += EqnTest(_T("(2*b+1)*4"), (2 * b + 1) * 4, true);
+			iStat += EqnTest(_T("4*(2*b+1)"), (2 * b + 1) * 4, true);
+
+			// operator precedences
+			iStat += EqnTest(_T("1+2-3*4/5^6"), 2.99923, true);
+			iStat += EqnTest(_T("1^2/3*4-5+6"), 2.33333333, true);
+			iStat += EqnTest(_T("1+2*3"), 7, true);
+			iStat += EqnTest(_T("1+2*3"), 7, true);
+			iStat += EqnTest(_T("(1+2)*3"), 9, true);
+			iStat += EqnTest(_T("(1+2)*(-3)"), -9, true);
+			iStat += EqnTest(_T("2/4"), 0.5, true);
+
+			iStat += EqnTest(_T("exp(ln(7))"), 7, true);
+			iStat += EqnTest(_T("e^ln(7)"), 7, true);
+			iStat += EqnTest(_T("e^(ln(7))"), 7, true);
+			iStat += EqnTest(_T("(e^(ln(7)))"), 7, true);
+			iStat += EqnTest(_T("1-(e^(ln(7)))"), -6, true);
+			iStat += EqnTest(_T("2*(e^(ln(7)))"), 14, true);
+			iStat += EqnTest(_T("10^log(5)"), pow(10.0, log(5.0)), true);
+			iStat += EqnTest(_T("10^log10(5)"), 5, true);
+			iStat += EqnTest(_T("2^log2(4)"), 4, true);
+			iStat += EqnTest(_T("-(sin(0)+1)"), -1, true);
+			iStat += EqnTest(_T("-(2^1.1)"), -2.14354692, true);
+
+			iStat += EqnTest(_T("(cos(2.41)/b)"), -0.372056, true);
+			iStat += EqnTest(_T("(1*(2*(3*(4*(5*(6*(a+b)))))))"), 2160, true);
+			iStat += EqnTest(_T("(1*(2*(3*(4*(5*(6*(7*(a+b))))))))"), 15120, true);
+			iStat += EqnTest(_T("(a/((((b+(((e*(((((pi*((((3.45*((pi+a)+pi))+b)+b)*a))+0.68)+e)+a)/a))+a)+b))+b)*a)-pi))"), 0.00377999, true);
+
+			// long formula (Reference: Matlab)
+			iStat += EqnTest(
+				_T("(((-9))-e/(((((((pi-(((-7)+(-3)/4/e))))/(((-5))-2)-((pi+(-0))*(sqrt((e+e))*(-8))*(((-pi)+(-pi)-(-9)*(6*5))")
+				_T("/(-e)-e))/2)/((((sqrt(2/(-e)+6)-(4-2))+((5/(-2))/(1*(-pi)+3))/8)*pi*((pi/((-2)/(-6)*1*(-1))*(-6)+(-e)))))/")
+				_T("((e+(-2)+(-e)*((((-3)*9+(-e)))+(-9)))))))-((((e-7+(((5/pi-(3/1+pi)))))/e)/(-5))/(sqrt((((((1+(-7))))+((((-")
+				_T("e)*(-e)))-8))*(-5)/((-e)))*(-6)-((((((-2)-(-9)-(-e)-1)/3))))/(sqrt((8+(e-((-6))+(9*(-9))))*(((3+2-8))*(7+6")
+				_T("+(-5))+((0/(-e)*(-pi))+7)))+(((((-e)/e/e)+((-6)*5)*e+(3+(-5)/pi))))+pi))/sqrt((((9))+((((pi))-8+2))+pi))/e")
+				_T("*4)*((-5)/(((-pi))*(sqrt(e)))))-(((((((-e)*(e)-pi))/4+(pi)*(-9)))))))+(-pi)"), -12.23016549, true);
+
+			// long formula (Reference: Matlab)
+			iStat += EqnTest(
+				_T("(atan(sin((((((((((((((((pi/cos((a/((((0.53-b)-pi)*e)/b))))+2.51)+a)-0.54)/0.98)+b)*b)+e)/a)+b)+a)+b)+pi)/e")
+				_T(")+a)))*2.77)"), -2.16995656, true);
+
+			// long formula (Reference: Matlab)
+			iStat += EqnTest(_T("1+2-3*4/5^6*(2*(1-5+(3*7^9)*(4+6*7-3)))+12"), -7995810.09926, true);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestIfThenElse()
+		{
+			int iStat = 0;
+			mu::console() << _T("testing if-then-else operator...");
+
+			// from oss-fuzz.com: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=24167
+			iStat += ThrowTest(_T(R"(0^3^avg(0>3?4:(""),0^3?4:("")))"), ecUNEXPECTED_STR);
+			// derivatives
+			iStat += ThrowTest(_T(R"(avg(0?(""):4,1))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(avg(0>3?4:(""),0^3?4:("")))"), ecUNEXPECTED_STR);
+
+			iStat += ThrowTest(_T(R"(0?4:(""))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"((0)?4:(""))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"((0>3)?4:(""))"), ecUNEXPECTED_STR);
+			iStat += ThrowTest(_T(R"(0>3?4:(""))"), ecUNEXPECTED_STR);
+
+			// from oss-fuzz.com: https://oss-fuzz.com/testcase-detail/4777121158529024
+			iStat += ThrowTest(_T("3!=min(0?2>2,2>5,1:6)"), ecUNEXPECTED_ARG_SEP);
+
+			// Test error detection
+			iStat += ThrowTest(_T(":3"), ecUNEXPECTED_CONDITIONAL);
+			iStat += ThrowTest(_T("? 1 : 2"), ecUNEXPECTED_CONDITIONAL);
+			iStat += ThrowTest(_T("(a<b) ? (b<c) ? 1 : 2"), ecMISSING_ELSE_CLAUSE);
+			iStat += ThrowTest(_T("(a<b) ? 1"), ecMISSING_ELSE_CLAUSE);
+			iStat += ThrowTest(_T("(a<b) ? a"), ecMISSING_ELSE_CLAUSE);
+			iStat += ThrowTest(_T("(a<b) ? a+b"), ecMISSING_ELSE_CLAUSE);
+			iStat += ThrowTest(_T("a : b"), ecMISPLACED_COLON);
+			iStat += ThrowTest(_T("1 : 2"), ecMISPLACED_COLON);
+			iStat += ThrowTest(_T("(1) ? 1 : 2 : 3"), ecMISPLACED_COLON);
+			iStat += ThrowTest(_T("(true) ? 1 : 2 : 3"), ecUNASSIGNABLE_TOKEN);
+
+			// from oss-fzz.com: UNKNOWN READ; https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22922#c1
+			iStat += ThrowTest(_T("1?2:0?(7:1)"), ecMISPLACED_COLON);
+
+			// from oss-fuzz.com: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22938
+			iStat += ThrowTest(_T("sum(0?1,0,0:3)"), ecUNEXPECTED_ARG_SEP);
+			iStat += ThrowTest(_T("sum(0?(1,0,0):3)"), ecUNEXPECTED_ARG);
+			iStat += ThrowTest(_T("sum(2>3?2,4,2:4)"), ecUNEXPECTED_ARG_SEP);
+			iStat += ThrowTest(_T("sum(2>3?2,4,sin(2):4)"), ecUNEXPECTED_ARG_SEP);
+			iStat += ThrowTest(_T("sum(2>3?sin(2),4,2:4)"), ecUNEXPECTED_ARG_SEP);
+			iStat += ThrowTest(_T("sum(2>3?sin(a),4,2:4)"), ecUNEXPECTED_ARG_SEP);
+			iStat += ThrowTest(_T("sum(2>3?sin(2),4,2:4)"), ecUNEXPECTED_ARG_SEP);
+
+			iStat += EqnTest(_T("1 ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("1<2 ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("a<b ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("(a<b) ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("(1) ? 10 : 11"), 10, true);
+			iStat += EqnTest(_T("(0) ? 10 : 11"), 11, true);
+			iStat += EqnTest(_T("(1) ? a+b : c+d"), 3, true);
+			iStat += EqnTest(_T("(0) ? a+b : c+d"), 1, true);
+			iStat += EqnTest(_T("(1) ? 0 : 1"), 0, true);
+			iStat += EqnTest(_T("(0) ? 0 : 1"), 1, true);
+			iStat += EqnTest(_T("(a<b) ? 10 : 11"), 10, true);
+			iStat += EqnTest(_T("(a>b) ? 10 : 11"), 11, true);
+			iStat += EqnTest(_T("(a<b) ? c : d"), 3, true);
+			iStat += EqnTest(_T("(a>b) ? c : d"), -2, true);
+
+			iStat += EqnTest(_T("(a>b) ? 1 : 0"), 0, true);
+			iStat += EqnTest(_T("((a>b) ? 1 : 0) ? 1 : 2"), 2, true);
+			iStat += EqnTest(_T("((a>b) ? 1 : 0) ? 1 : sum((a>b) ? 1 : 2)"), 2, true);
+			iStat += EqnTest(_T("((a>b) ? 0 : 1) ? 1 : sum((a>b) ? 1 : 2)"), 1, true);
+
+			iStat += EqnTest(_T("sum((a>b) ? 1 : 2)"), 2, true);
+			iStat += EqnTest(_T("sum((1) ? 1 : 2)"), 1, true);
+			iStat += EqnTest(_T("sum((a>b) ? 1 : 2, 100)"), 102, true);
+			iStat += EqnTest(_T("sum((1) ? 1 : 2, 100)"), 101, true);
+			iStat += EqnTest(_T("sum(3, (a>b) ? 3 : 10)"), 13, true);
+			iStat += EqnTest(_T("sum(3, (a<b) ? 3 : 10)"), 6, true);
+			iStat += EqnTest(_T("10*sum(3, (a>b) ? 3 : 10)"), 130, true);
+			iStat += EqnTest(_T("10*sum(3, (a<b) ? 3 : 10)"), 60, true);
+			iStat += EqnTest(_T("sum(3, (a>b) ? 3 : 10)*10"), 130, true);
+			iStat += EqnTest(_T("sum(3, (a<b) ? 3 : 10)*10"), 60, true);
+			iStat += EqnTest(_T("(a<b) ? sum(3, (a<b) ? 3 : 10)*10 : 99"), 60, true);
+			iStat += EqnTest(_T("(a>b) ? sum(3, (a<b) ? 3 : 10)*10 : 99"), 99, true);
+			iStat += EqnTest(_T("(a<b) ? sum(3, (a<b) ? 3 : 10,10,20)*10 : 99"), 360, true);
+			iStat += EqnTest(_T("(a>b) ? sum(3, (a<b) ? 3 : 10,10,20)*10 : 99"), 99, true);
+			iStat += EqnTest(_T("(a>b) ? sum(3, (a<b) ? 3 : 10,10,20)*10 : sum(3, (a<b) ? 3 : 10)*10"), 60, true);
+
+			// todo: also add for muParserX!
+			iStat += EqnTest(_T("(a<b)&&(a<b) ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("(a>b)&&(a<b) ? 128 : 255"), 255, true);
+			iStat += EqnTest(_T("(1<2)&&(1<2) ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("(1>2)&&(1<2) ? 128 : 255"), 255, true);
+			iStat += EqnTest(_T("((1<2)&&(1<2)) ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("((1>2)&&(1<2)) ? 128 : 255"), 255, true);
+			iStat += EqnTest(_T("((a<b)&&(a<b)) ? 128 : 255"), 128, true);
+			iStat += EqnTest(_T("((a>b)&&(a<b)) ? 128 : 255"), 255, true);
+
+			iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 : 1>0 ? 32 : 64"), 255, true);
+			iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 :(1>0 ? 32 : 64)"), 255, true);
+			iStat += EqnTest(_T("1>0 ? 1>0 ? 128 : 255 : 1>2 ? 32 : 64"), 128, true);
+			iStat += EqnTest(_T("1>0 ? 1>0 ? 128 : 255 :(1>2 ? 32 : 64)"), 128, true);
+			iStat += EqnTest(_T("1>2 ? 1>2 ? 128 : 255 : 1>0 ? 32 : 64"), 32, true);
+			iStat += EqnTest(_T("1>2 ? 1>0 ? 128 : 255 : 1>2 ? 32 : 64"), 64, true);
+			iStat += EqnTest(_T("1>0 ? 50 :  1>0 ? 128 : 255"), 50, true);
+			iStat += EqnTest(_T("1>0 ? 50 : (1>0 ? 128 : 255)"), 50, true);
+			iStat += EqnTest(_T("1>0 ? 1>0 ? 128 : 255 : 50"), 128, true);
+			iStat += EqnTest(_T("1>2 ? 1>2 ? 128 : 255 : 1>0 ? 32 : 1>2 ? 64 : 16"), 32, true);
+			iStat += EqnTest(_T("1>2 ? 1>2 ? 128 : 255 : 1>0 ? 32 :(1>2 ? 64 : 16)"), 32, true);
+			iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 :  1>0 ? 32 :1>2 ? 64 : 16"), 255, true);
+			iStat += EqnTest(_T("1>0 ? 1>2 ? 128 : 255 : (1>0 ? 32 :1>2 ? 64 : 16)"), 255, true);
+			iStat += EqnTest(_T("1 ? 0 ? 128 : 255 : 1 ? 32 : 64"), 255, true);
+
+			// assignment operators
+			iStat += EqnTest(_T("a= 0 ? 128 : 255, a"), 255, true);
+			iStat += EqnTest(_T("a=((a>b)&&(a<b)) ? 128 : 255, a"), 255, true);
+			iStat += EqnTest(_T("c=(a<b)&&(a<b) ? 128 : 255, c"), 128, true);
+			iStat += EqnTest(_T("0 ? a=a+1 : 666, a"), 1, true);
+			iStat += EqnTest(_T("1?a=10:a=20, a"), 10, true);
+			iStat += EqnTest(_T("0?a=10:a=20, a"), 20, true);
+			iStat += EqnTest(_T("0?a=sum(3,4):10, a"), 1, true);  // a should not change its value due to lazy calculation
+
+			iStat += EqnTest(_T("a=1?b=1?3:4:5, a"), 3, true);
+			iStat += EqnTest(_T("a=1?b=1?3:4:5, b"), 3, true);
+			iStat += EqnTest(_T("a=0?b=1?3:4:5, a"), 5, true);
+			iStat += EqnTest(_T("a=0?b=1?3:4:5, b"), 2, true);
+
+			iStat += EqnTest(_T("a=1?5:b=1?3:4, a"), 5, true);
+			iStat += EqnTest(_T("a=1?5:b=1?3:4, b"), 2, true);
+			iStat += EqnTest(_T("a=0?5:b=1?3:4, a"), 3, true);
+			iStat += EqnTest(_T("a=0?5:b=1?3:4, b"), 3, true);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+		//---------------------------------------------------------------------------
+		int ParserTester::TestException()
+		{
+			int  iStat = 0;
+			mu::console() << _T("testing error codes...");
+
+			iStat += ThrowTest(_T("3+"), ecUNEXPECTED_EOF);
+			iStat += ThrowTest(_T("3+)"), ecUNEXPECTED_PARENS);
+			iStat += ThrowTest(_T("()"), ecUNEXPECTED_PARENS);
+			iStat += ThrowTest(_T("3+()"), ecUNEXPECTED_PARENS);
+			iStat += ThrowTest(_T("sin(3,4)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("sin()"), ecTOO_FEW_PARAMS);
+			iStat += ThrowTest(_T("(1+2"), ecMISSING_PARENS);
+			iStat += ThrowTest(_T("sin(3)3"), ecUNEXPECTED_VAL);
+			iStat += ThrowTest(_T("sin(3)xyz"), ecUNASSIGNABLE_TOKEN);
+			iStat += ThrowTest(_T("sin(3)cos(3)"), ecUNEXPECTED_FUN);
+			iStat += ThrowTest(_T("a+b+c=10"), ecUNEXPECTED_OPERATOR);
+			iStat += ThrowTest(_T("a=b=3"), ecUNEXPECTED_OPERATOR);
+
+			// functions without parameter
+			iStat += ThrowTest(_T("3+ping(2)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("3+ping(a+2)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("3+ping(sin(a)+2)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("3+ping(1+sin(a))"), ecTOO_MANY_PARAMS);
+
+			// String function related
+			iStat += ThrowTest(_T("valueof(\"xxx\")"), 999, false);
+			iStat += ThrowTest(_T("valueof()"), ecUNEXPECTED_PARENS);
+			iStat += ThrowTest(_T("1+valueof(\"abc\""), ecMISSING_PARENS);
+			iStat += ThrowTest(_T("valueof(\"abc\""), ecMISSING_PARENS);
+			iStat += ThrowTest(_T("valueof(\"abc"), ecUNTERMINATED_STRING);
+			iStat += ThrowTest(_T("valueof(\"abc\",3)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("valueof(3)"), ecSTRING_EXPECTED);
+			iStat += ThrowTest(_T("sin(\"abc\")"), ecVAL_EXPECTED);
+			iStat += ThrowTest(_T("valueof(\"\\\"abc\\\"\")"), 999, false);
+			iStat += ThrowTest(_T("\"hello world\""), ecSTR_RESULT);
+			iStat += ThrowTest(_T("(\"hello world\")"), ecSTR_RESULT);
+			iStat += ThrowTest(_T("\"abcd\"+100"), ecSTR_RESULT);
+			iStat += ThrowTest(_T("\"a\"+\"b\""), ecSTR_RESULT);
+			iStat += ThrowTest(_T("strfun1(\"100\",3)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("strfun2(\"100\",3,5)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("strfun3(\"100\",3,5,6)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("strfun2(\"100\")"), ecTOO_FEW_PARAMS);
+			iStat += ThrowTest(_T("strfun3(\"100\",6)"), ecTOO_FEW_PARAMS);
+			iStat += ThrowTest(_T("strfun2(1,1)"), ecSTRING_EXPECTED);
+			iStat += ThrowTest(_T("strfun2(a,1)"), ecSTRING_EXPECTED);
+			iStat += ThrowTest(_T("strfun2(1,1,1)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("strfun2(a,1,1)"), ecTOO_MANY_PARAMS);
+			iStat += ThrowTest(_T("strfun3(1,2,3)"), ecSTRING_EXPECTED);
+			iStat += ThrowTest(_T("strfun3(1, \"100\",3)"), ecSTRING_EXPECTED);
+			iStat += ThrowTest(_T("strfun3(\"1\", \"100\",3)"), ecVAL_EXPECTED);
+			iStat += ThrowTest(_T("strfun3(\"1\", 3, \"100\")"), ecVAL_EXPECTED);
+			iStat += ThrowTest(_T("strfun3(\"1\", \"100\", \"100\", \"100\")"), ecTOO_MANY_PARAMS);
+
+			// assignment operator
+			iStat += ThrowTest(_T("3=4"), ecUNEXPECTED_OPERATOR);
+			iStat += ThrowTest(_T("sin(8)=4"), ecUNEXPECTED_OPERATOR);
+			iStat += ThrowTest(_T("\"test\"=a"), ecSTR_RESULT);
+
+			// <ibg 20090529>
+			// this is now legal, for reference see:
+			// https://sourceforge.net/forum/message.php?msg_id=7411373
+			//      iStat += ThrowTest( _T("sin=9"), ecUNEXPECTED_OPERATOR);    
+			// </ibg>
+
+			iStat += ThrowTest(_T("(8)=5"), ecUNEXPECTED_OPERATOR);
+			iStat += ThrowTest(_T("(a)=5"), ecUNEXPECTED_OPERATOR);
+			iStat += ThrowTest(_T("a=\"tttt\""), ecOPRT_TYPE_CONFLICT);
+
+			if (iStat == 0)
+				mu::console() << _T("passed") << endl;
+			else
+				mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
+
+			return iStat;
+		}
+
+
+		//---------------------------------------------------------------------------
+		void ParserTester::AddTest(testfun_type a_pFun)
+		{
+			m_vTestFun.push_back(a_pFun);
+		}
+
+		//---------------------------------------------------------------------------
+		int ParserTester::Run()
+		{
+			int iStat = 0;
+			try
+			{
+				for (int i = 0; i < (int)m_vTestFun.size(); ++i)
+					iStat += (this->*m_vTestFun[i])();
+			}
+			catch (Parser::exception_type& e)
+			{
+				mu::console() << "\n" << e.GetMsg() << endl;
+				mu::console() << e.GetToken() << endl;
+				Abort();
+			}
+			catch (std::exception& e)
+			{
+				mu::console() << e.what() << endl;
+				Abort();
+			}
+			catch (...)
+			{
+				mu::console() << "Internal error";
+				Abort();
+			}
+
+			if (iStat == 0)
+			{
+				mu::console() << "Test passed (" << ParserTester::c_iCount << " expressions)" << endl;
+			}
+			else
+			{
+				mu::console() << "Test failed with " << iStat
+					<< " errors (" << ParserTester::c_iCount
+					<< " expressions)" << endl;
+			}
+			ParserTester::c_iCount = 0;
+			return iStat;
+		}
+
+
+		//---------------------------------------------------------------------------
+		int ParserTester::ThrowTest(const string_type& a_str, int a_iErrc, bool a_expectedToFail)
+		{
+			ParserTester::c_iCount++;
+
+			try
+			{
+				value_type fVal[] = { 1,1,1 };
+				Parser p;
+
+				p.DefineVar(_T("a"), &fVal[0]);
+				p.DefineVar(_T("b"), &fVal[1]);
+				p.DefineVar(_T("c"), &fVal[2]);
+				p.DefinePostfixOprt(_T("{m}"), Milli);
+				p.DefinePostfixOprt(_T("m"), Milli);
+				p.DefineFun(_T("ping"), Ping);
+				p.DefineFun(_T("valueof"), ValueOf);
+				p.DefineFun(_T("strfun1"), StrFun1);
+				p.DefineFun(_T("strfun2"), StrFun2);
+				p.DefineFun(_T("strfun3"), StrFun3);
+				p.DefineFun(_T("strfun4"), StrFun4);
+				p.DefineFun(_T("strfun5"), StrFun5);
+				p.DefineFun(_T("strfun6"), StrFun6);
+				p.SetExpr(a_str);
+				//				p.EnableDebugDump(1, 0);
+				p.Eval();
+			}
+			catch (ParserError& e)
+			{
+				// output the formula in case of an failed test
+				if (a_expectedToFail == false || (a_expectedToFail == true && a_iErrc != e.GetCode()))
+				{
+					mu::console() << _T("\n  ")
+						<< _T("Expression: ") << a_str
+						<< _T("  Code:") << e.GetCode() << _T("(") << e.GetMsg() << _T(")")
+						<< _T("  Expected:") << a_iErrc;
+				}
+
+				return (a_iErrc == e.GetCode()) ? 0 : 1;
+			}
+
+			// if a_expectedToFail == false no exception is expected
+			bool bRet((a_expectedToFail == false) ? 0 : 1);
+			if (bRet == 1)
+			{
+				mu::console() << _T("\n  ")
+					<< _T("Expression: ") << a_str
+					<< _T("  did evaluate; Expected error:") << a_iErrc;
+			}
+
+			return bRet;
+		}
+
+		//---------------------------------------------------------------------------
+		/** \brief Evaluate a tet expression.
+
+			\return 1 in case of a failure, 0 otherwise.
+		*/
+		int ParserTester::EqnTestWithVarChange(const string_type& a_str,
+			double a_fVar1,
+			double a_fRes1,
+			double a_fVar2,
+			double a_fRes2)
+		{
+			ParserTester::c_iCount++;
+
+			try
+			{
+				value_type fVal[2] = { -999, -999 }; // should be equal
+
+				Parser  p;
+				value_type var = 0;
+
+				// variable
+				p.DefineVar(_T("a"), &var);
+				p.SetExpr(a_str);
+
+				var = a_fVar1;
+				fVal[0] = p.Eval();
+
+				var = a_fVar2;
+				fVal[1] = p.Eval();
+
+				if (fabs(a_fRes1 - fVal[0]) > 0.0000000001)
+					throw std::runtime_error("incorrect result (first pass)");
+
+				if (fabs(a_fRes2 - fVal[1]) > 0.0000000001)
+					throw std::runtime_error("incorrect result (second pass)");
+			}
+			catch (Parser::exception_type& e)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.GetMsg() << _T(")");
+				return 1;
+			}
+			catch (std::exception& e)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.what() << _T(")");
+				return 1;  // always return a failure since this exception is not expected
+			}
+			catch (...)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (unexpected exception)");
+				return 1;  // exceptions other than ParserException are not allowed
+			}
+
+			return 0;
+		}
+
+		//---------------------------------------------------------------------------
+		/** \brief Evaluate a tet expression.
+
+			\return 1 in case of a failure, 0 otherwise.
+		*/
+		int ParserTester::EqnTest(const string_type& a_str, double a_fRes, bool a_fPass)
+		{
+			ParserTester::c_iCount++;
+			int iRet(0);
+			value_type fVal[6] = { -999, -998, -997, -996, -995, -994 }; // initially should be different
+
+			try
+			{
+				std::unique_ptr<Parser> p1;
+				Parser  p2, p3;   // three parser objects
+								  // they will be used for testing copy and assignment operators
+				// p1 is a pointer since i'm going to delete it in order to test if
+				// parsers after copy construction still refer to members of it.
+				// !! If this is the case this function will crash !!
+
+				p1.reset(new mu::Parser());
+				// Add constants
+				p1->DefineConst(_T("pi"), MathImpl<value_type>::CONST_PI);
+				p1->DefineConst(_T("e"), MathImpl<value_type>::CONST_E);
+				p1->DefineConst(_T("const"), 1);
+				p1->DefineConst(_T("const1"), 2);
+				p1->DefineConst(_T("const2"), 3);
+				// string constants
+				p1->DefineStrConst(_T("str1"), _T("1.11"));
+				p1->DefineStrConst(_T("str2"), _T("2.22"));
+				// variables
+				value_type vVarVal[] = { 1, 2, 3, -2 };
+				p1->DefineVar(_T("a"), &vVarVal[0]);
+				p1->DefineVar(_T("aa"), &vVarVal[1]);
+				p1->DefineVar(_T("b"), &vVarVal[1]);
+				p1->DefineVar(_T("c"), &vVarVal[2]);
+				p1->DefineVar(_T("d"), &vVarVal[3]);
+
+				// custom value ident functions
+				p1->AddValIdent(&ParserTester::IsHexVal);
+
+				// functions
+				p1->DefineFun(_T("ping"), Ping);
+				p1->DefineFun(_T("f0"), f0);        // no parameter
+				p1->DefineFun(_T("f1of1"), f1of1);  // one parameter
+				p1->DefineFun(_T("f1of2"), f1of2);  // two parameter
+				p1->DefineFun(_T("f2of2"), f2of2);
+				p1->DefineFun(_T("f1of3"), f1of3);  // three parameter
+				p1->DefineFun(_T("f2of3"), f2of3);
+				p1->DefineFun(_T("f3of3"), f3of3);
+				p1->DefineFun(_T("f1of4"), f1of4);  // four parameter
+				p1->DefineFun(_T("f2of4"), f2of4);
+				p1->DefineFun(_T("f3of4"), f3of4);
+				p1->DefineFun(_T("f4of4"), f4of4);
+				p1->DefineFun(_T("f1of5"), f1of5);  // five parameter
+				p1->DefineFun(_T("f2of5"), f2of5);
+				p1->DefineFun(_T("f3of5"), f3of5);
+				p1->DefineFun(_T("f4of5"), f4of5);
+				p1->DefineFun(_T("f5of5"), f5of5);
+
+				// binary operators
+				p1->DefineOprt(_T("add"), add, 0);
+				p1->DefineOprt(_T("++"), add, 0);
+				p1->DefineOprt(_T("&"), land, prLAND);
+
+				// sample functions
+				p1->DefineFun(_T("min"), Min);
+				p1->DefineFun(_T("max"), Max);
+				p1->DefineFun(_T("sum"), Sum);
+				p1->DefineFun(_T("valueof"), ValueOf);
+				p1->DefineFun(_T("atof"), StrToFloat);
+				p1->DefineFun(_T("strfun1"), StrFun1);
+				p1->DefineFun(_T("strfun2"), StrFun2);
+				p1->DefineFun(_T("strfun3"), StrFun3);
+				p1->DefineFun(_T("strfun4"), StrFun4);
+				p1->DefineFun(_T("strfun5"), StrFun5);
+				p1->DefineFun(_T("strfun6"), StrFun6);
+				p1->DefineFun(_T("lastArg"), LastArg);
+				p1->DefineFun(_T("firstArg"), FirstArg);
+				p1->DefineFun(_T("order"), FirstArg);
+
+				// functions with user data
+				p1->DefineFunUserData(_T("funud0_8"), FunUd0, reinterpret_cast<void*>(8));
+				p1->DefineFunUserData(_T("funud1_16"), FunUd1, reinterpret_cast<void*>(16));
+				p1->DefineFunUserData(_T("funud2_24"), FunUd2, reinterpret_cast<void*>(24));
+				p1->DefineFunUserData(_T("funud10_32"), FunUd10, reinterpret_cast<void*>(32));
+				p1->DefineFunUserData(_T("funud0_9"), FunUd0, reinterpret_cast<void*>(9));
+				p1->DefineFunUserData(_T("funud1_17"), FunUd1, reinterpret_cast<void*>(17));
+				p1->DefineFunUserData(_T("funud2_25"), FunUd2, reinterpret_cast<void*>(25));
+				p1->DefineFunUserData(_T("funud10_33"), FunUd10, reinterpret_cast<void*>(33));
+				p1->DefineFunUserData(_T("strfunud3_10"), StrFunUd3, reinterpret_cast<void*>(10));
+				p1->DefineFunUserData(_T("sumud_100"), SumUd, reinterpret_cast<void*>(100));
+
+				// infix / postfix operator
+				// Note: Identifiers used here do not have any meaning 
+				//       they are mere placeholders to test certain features.
+				p1->DefineInfixOprt(_T("$"), sign, prPOW + 1);  // sign with high priority
+				p1->DefineInfixOprt(_T("~"), plus2);          // high priority
+				p1->DefineInfixOprt(_T("~~"), plus2);
+				p1->DefinePostfixOprt(_T("{m}"), Milli);
+				p1->DefinePostfixOprt(_T("{M}"), Mega);
+				p1->DefinePostfixOprt(_T("m"), Milli);
+				p1->DefinePostfixOprt(_T("meg"), Mega);
+				p1->DefinePostfixOprt(_T("#"), times3);
+				p1->DefinePostfixOprt(_T("'"), sqr);
+				p1->SetExpr(a_str);
+
+				// Test bytecode integrity
+				// String parsing and bytecode parsing must yield the same result
+				fVal[0] = p1->Eval(); // result from stringparsing
+				fVal[1] = p1->Eval(); // result from bytecode
+				if (fVal[0] != fVal[1])
+					throw Parser::exception_type(_T("Bytecode / string parsing mismatch."));
+
+				// Test copy and assignment operators
+				try
+				{
+					// Test copy constructor
+					std::vector<mu::Parser> vParser;
+					vParser.push_back(*(p1.get()));
+					mu::Parser p4 = vParser[0];   // take parser from vector
+
+					// destroy the originals from p2
+					vParser.clear();              // delete the vector
+					p1.reset(nullptr);
+
+					fVal[2] = p4.Eval();
+
+					// Test assignment operator
+					// additionally  disable Optimizer this time
+					mu::Parser p5;
+					p5 = p4;
+					p5.EnableOptimizer(false);
+					fVal[3] = p5.Eval();
+
+					// Test Eval function for multiple return values
+					// use p2 since it has the optimizer enabled!
+					int nNum;
+					p4.SetExpr(a_str); // reset bytecode to trigger #94 (https://github.com/beltoforion/muparser/issues/94)
+					value_type* v = p4.Eval(nNum);
+					fVal[4] = v[nNum - 1];
+
+					v = p4.Eval(nNum);
+					fVal[5] = v[nNum - 1];
+
+				}
+				catch (std::exception& e)
+				{
+					mu::console() << _T("\n  ") << e.what() << _T("\n");
+				}
+
+				// limited floating point accuracy requires the following test
+				bool bCloseEnough(true);
+				for (unsigned i = 0; i < sizeof(fVal) / sizeof(value_type); ++i)
+				{
+					bCloseEnough &= (fabs(a_fRes - fVal[i]) <= fabs(fVal[i] * 0.00001));
+
+					// The tests equations never result in infinity, if they do thats a bug.
+					// reference:
+					// http://sourceforge.net/projects/muparser/forums/forum/462843/topic/5037825
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4127)
 #endif
+					if (std::numeric_limits<value_type>::has_infinity)
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+					{
+						bCloseEnough &= (fabs(fVal[i]) != numeric_limits<value_type>::infinity());
+					}
+				}
+
+				iRet = ((bCloseEnough && a_fPass) || (!bCloseEnough && !a_fPass)) ? 0 : 1;
+
+
+				if (iRet == 1)
+				{
+					mu::console() << _T("\n  fail: ") << a_str.c_str()
+						<< _T(" (incorrect result; expected: ") << a_fRes
+						<< _T(" ;calculated: ") << fVal[0] << _T(",")
+						<< fVal[1] << _T(",")
+						<< fVal[2] << _T(",")
+						<< fVal[3] << _T(",")
+						<< fVal[4] << _T(",")
+						<< fVal[5] << _T(").");
+				}
+			}
+			catch (Parser::exception_type& e)
+			{
+				if (a_fPass)
+				{
+					if (fVal[0] != fVal[2] && fVal[0] != -999 && fVal[1] != -998)
+						mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (copy construction)");
+					else
+						mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.GetMsg() << _T(")");
+					return 1;
+				}
+			}
+			catch (std::exception& e)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.what() << _T(")");
+				return 1;  // always return a failure since this exception is not expected
+			}
+			catch (...)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (unexpected exception)");
+				return 1;  // exceptions other than ParserException are not allowed
+			}
+
+			return iRet;
+		}
 
-      // functions without parameter
-      iStat += ThrowTest( _T("3+ping(2)"),    ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("3+ping(a+2)"),  ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("3+ping(sin(a)+2)"),  ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("3+ping(1+sin(a))"),  ecTOO_MANY_PARAMS);
-
-      // String function related
-      iStat += ThrowTest( _T("valueof(\"xxx\")"),  999, false);
-      iStat += ThrowTest( _T("valueof()"),          ecUNEXPECTED_PARENS);
-      iStat += ThrowTest( _T("1+valueof(\"abc\""),  ecMISSING_PARENS);
-      iStat += ThrowTest( _T("valueof(\"abc\""),    ecMISSING_PARENS);
-      iStat += ThrowTest( _T("valueof(\"abc"),      ecUNTERMINATED_STRING);
-      iStat += ThrowTest( _T("valueof(\"abc\",3)"), ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("valueof(3)"),         ecSTRING_EXPECTED);
-      iStat += ThrowTest( _T("sin(\"abc\")"),       ecVAL_EXPECTED);
-      iStat += ThrowTest( _T("valueof(\"\\\"abc\\\"\")"),  999, false);
-      iStat += ThrowTest( _T("\"hello world\""),    ecSTR_RESULT);
-      iStat += ThrowTest( _T("(\"hello world\")"),  ecSTR_RESULT);
-      iStat += ThrowTest( _T("\"abcd\"+100"),       ecOPRT_TYPE_CONFLICT);
-      iStat += ThrowTest( _T("\"a\"+\"b\""),        ecOPRT_TYPE_CONFLICT);
-      iStat += ThrowTest( _T("strfun1(\"100\",3)"),     ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("strfun2(\"100\",3,5)"),   ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("strfun3(\"100\",3,5,6)"), ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("strfun2(\"100\")"),       ecTOO_FEW_PARAMS);
-      iStat += ThrowTest( _T("strfun3(\"100\",6)"),   ecTOO_FEW_PARAMS);
-      iStat += ThrowTest( _T("strfun2(1,1)"),         ecSTRING_EXPECTED);
-      iStat += ThrowTest( _T("strfun2(a,1)"),         ecSTRING_EXPECTED);
-      iStat += ThrowTest( _T("strfun2(1,1,1)"),       ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("strfun2(a,1,1)"),       ecTOO_MANY_PARAMS);
-      iStat += ThrowTest( _T("strfun3(1,2,3)"),         ecSTRING_EXPECTED);
-      iStat += ThrowTest( _T("strfun3(1, \"100\",3)"),  ecSTRING_EXPECTED);
-      iStat += ThrowTest( _T("strfun3(\"1\", \"100\",3)"),  ecVAL_EXPECTED);
-      iStat += ThrowTest( _T("strfun3(\"1\", 3, \"100\")"),  ecVAL_EXPECTED);
-      iStat += ThrowTest( _T("strfun3(\"1\", \"100\", \"100\", \"100\")"),  ecTOO_MANY_PARAMS);
-
-      // assignment operator
-      iStat += ThrowTest( _T("3=4"), ecUNEXPECTED_OPERATOR);
-      iStat += ThrowTest( _T("sin(8)=4"), ecUNEXPECTED_OPERATOR);
-      iStat += ThrowTest( _T("\"test\"=a"), ecUNEXPECTED_OPERATOR);
-
-      // <ibg 20090529>
-      // this is now legal, for reference see:
-      // https://sourceforge.net/forum/message.php?msg_id=7411373
-      //      iStat += ThrowTest( _T("sin=9"), ecUNEXPECTED_OPERATOR);    
-      // </ibg>
-
-      iStat += ThrowTest( _T("(8)=5"), ecUNEXPECTED_OPERATOR);
-      iStat += ThrowTest( _T("(a)=5"), ecUNEXPECTED_OPERATOR);
-      iStat += ThrowTest( _T("a=\"tttt\""), ecOPRT_TYPE_CONFLICT);
-
-      if (iStat==0) 
-        mu::console() << _T("passed") << endl;
-      else 
-        mu::console() << _T("\n  failed with ") << iStat << _T(" errors") << endl;
-
-      return iStat;
-    }
-
-
-    //---------------------------------------------------------------------------
-    void ParserTester::AddTest(testfun_type a_pFun)
-    {
-      m_vTestFun.push_back(a_pFun);
-    }
-
-    //---------------------------------------------------------------------------
-    void ParserTester::Run()
-    {
-      int iStat = 0;
-      try
-      {
-        for (int i=0; i<(int)m_vTestFun.size(); ++i)
-          iStat += (this->*m_vTestFun[i])();
-      }
-      catch(Parser::exception_type &e)
-      {
-        mu::console() << "\n" << e.GetMsg() << endl;
-        mu::console() << e.GetToken() << endl;
-        Abort();
-      }
-      catch(std::exception &e)
-      {
-        mu::console() << e.what() << endl;
-        Abort();
-      }
-      catch(...)
-      {
-        mu::console() << "Internal error";
-        Abort();
-      }
-
-      if (iStat==0) 
-      {
-        mu::console() << "Test passed (" <<  ParserTester::c_iCount << " expressions)" << endl;
-      }
-      else 
-      {
-        mu::console() << "Test failed with " << iStat 
-                  << " errors (" <<  ParserTester::c_iCount 
-                  << " expressions)" << endl;
-      }
-      ParserTester::c_iCount = 0;
-    }
-
-
-    //---------------------------------------------------------------------------
-    int ParserTester::ThrowTest(const string_type &a_str, int a_iErrc, bool a_bFail)
-    {
-      ParserTester::c_iCount++;
-
-      try
-      {
-        value_type fVal[] = {1,1,1};
-        Parser p;
-
-        p.DefineVar( _T("a"), &fVal[0]);
-        p.DefineVar( _T("b"), &fVal[1]);
-        p.DefineVar( _T("c"), &fVal[2]);
-        p.DefinePostfixOprt( _T("{m}"), Milli);
-        p.DefinePostfixOprt( _T("m"), Milli);
-        p.DefineFun( _T("ping"), Ping);
-        p.DefineFun( _T("valueof"), ValueOf);
-        p.DefineFun( _T("strfun1"), StrFun1);
-        p.DefineFun( _T("strfun2"), StrFun2);
-        p.DefineFun( _T("strfun3"), StrFun3);
-        p.SetExpr(a_str);
-        p.Eval();
-      }
-      catch(ParserError &e)
-      {
-        // output the formula in case of an failed test
-        if (a_bFail==false || (a_bFail==true && a_iErrc!=e.GetCode()) )
-        {
-          mu::console() << _T("\n  ") 
-                        << _T("Expression: ") << a_str 
-                        << _T("  Code:") << e.GetCode() << _T("(") << e.GetMsg() << _T(")")
-                        << _T("  Expected:") << a_iErrc;
-        }
-
-        return (a_iErrc==e.GetCode()) ? 0 : 1;
-      }
-
-      // if a_bFail==false no exception is expected
-      bool bRet((a_bFail==false) ? 0 : 1);
-      if (bRet==1)
-      {
-        mu::console() << _T("\n  ") 
-                      << _T("Expression: ") << a_str 
-                      << _T("  did evaluate; Expected error:") << a_iErrc;
-      }
-
-      return bRet; 
-    }
-
-    //---------------------------------------------------------------------------
-    /** \brief Evaluate a tet expression. 
-
-        \return 1 in case of a failure, 0 otherwise.
-    */
-    int ParserTester::EqnTestWithVarChange(const string_type &a_str, 
-                                           double a_fVar1, 
-                                           double a_fRes1, 
-                                           double a_fVar2, 
-                                           double a_fRes2)
-    {
-      ParserTester::c_iCount++;
-
-      try
-      {
-        value_type fVal[2] = {-999, -999 }; // should be equal
-	  
-        Parser  p;
-        value_type var = 0;
-
-        // variable
-        p.DefineVar( _T("a"), &var);
-        p.SetExpr(a_str);
-
-        var = a_fVar1;
-        fVal[0] = p.Eval();
-
-        var = a_fVar2;
-        fVal[1] = p.Eval();
-        
-        if ( fabs(a_fRes1-fVal[0]) > 0.0000000001)
-          throw std::runtime_error("incorrect result (first pass)");
-
-        if ( fabs(a_fRes2-fVal[1]) > 0.0000000001)
-          throw std::runtime_error("incorrect result (second pass)");
-      }
-      catch(Parser::exception_type &e)
-      {
-        mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.GetMsg() << _T(")");
-        return 1;
-      }
-      catch(std::exception &e)
-      {
-        mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.what() << _T(")");
-        return 1;  // always return a failure since this exception is not expected
-      }
-      catch(...)
-      {
-        mu::console() << _T("\n  fail: ") << a_str.c_str() <<  _T(" (unexpected exception)");
-        return 1;  // exceptions other than ParserException are not allowed
-      }
-
-      return 0;
-    }
-
-    //---------------------------------------------------------------------------
-    /** \brief Evaluate a tet expression. 
-
-        \return 1 in case of a failure, 0 otherwise.
-    */
-    int ParserTester::EqnTest(const string_type &a_str, double a_fRes, bool a_fPass)
-    {
-      ParserTester::c_iCount++;
-      int iRet(0);
-      value_type fVal[5] = {-999, -998, -997, -996, -995}; // initially should be different
-
-      try
-      {
-        std::unique_ptr<Parser> p1;
-        Parser  p2, p3;   // three parser objects
-                          // they will be used for testing copy and assignment operators
-        // p1 is a pointer since i'm going to delete it in order to test if
-        // parsers after copy construction still refer to members of it.
-        // !! If this is the case this function will crash !!
-      
-        p1.reset(new mu::Parser()); 
-        // Add constants
-        p1->DefineConst( _T("pi"), (value_type)PARSER_CONST_PI);
-        p1->DefineConst( _T("e"), (value_type)PARSER_CONST_E);
-        p1->DefineConst( _T("const"), 1);
-        p1->DefineConst( _T("const1"), 2);
-        p1->DefineConst( _T("const2"), 3);
-        // string constants
-        p1->DefineStrConst( _T("str1"), _T("1.11"));
-        p1->DefineStrConst( _T("str2"), _T("2.22"));
-        // variables
-        value_type vVarVal[] = { 1, 2, 3, -2};
-        p1->DefineVar( _T("a"), &vVarVal[0]);
-        p1->DefineVar( _T("aa"), &vVarVal[1]);
-        p1->DefineVar( _T("b"), &vVarVal[1]);
-        p1->DefineVar( _T("c"), &vVarVal[2]);
-        p1->DefineVar( _T("d"), &vVarVal[3]);
-        
-        // custom value ident functions
-        p1->AddValIdent(&ParserTester::IsHexVal);        
-
-        // functions
-        p1->DefineFun( _T("ping"), Ping);
-        p1->DefineFun( _T("f1of1"), f1of1);  // one parameter
-        p1->DefineFun( _T("f1of2"), f1of2);  // two parameter
-        p1->DefineFun( _T("f2of2"), f2of2);
-        p1->DefineFun( _T("f1of3"), f1of3);  // three parameter
-        p1->DefineFun( _T("f2of3"), f2of3);
-        p1->DefineFun( _T("f3of3"), f3of3);
-        p1->DefineFun( _T("f1of4"), f1of4);  // four parameter
-        p1->DefineFun( _T("f2of4"), f2of4);
-        p1->DefineFun( _T("f3of4"), f3of4);
-        p1->DefineFun( _T("f4of4"), f4of4);
-        p1->DefineFun( _T("f1of5"), f1of5);  // five parameter
-        p1->DefineFun( _T("f2of5"), f2of5);
-        p1->DefineFun( _T("f3of5"), f3of5);
-        p1->DefineFun( _T("f4of5"), f4of5);
-        p1->DefineFun( _T("f5of5"), f5of5);
-
-        // binary operators
-        p1->DefineOprt( _T("add"), add, 0);
-        p1->DefineOprt( _T("++"), add, 0);
-        p1->DefineOprt( _T("&"), land, prLAND);
-
-        // sample functions
-        p1->DefineFun( _T("min"), Min);
-        p1->DefineFun( _T("max"), Max);
-        p1->DefineFun( _T("sum"), Sum);
-        p1->DefineFun( _T("valueof"), ValueOf);
-        p1->DefineFun( _T("atof"), StrToFloat);
-        p1->DefineFun( _T("strfun1"), StrFun1);
-        p1->DefineFun( _T("strfun2"), StrFun2);
-        p1->DefineFun( _T("strfun3"), StrFun3);
-        p1->DefineFun( _T("lastArg"), LastArg);
-        p1->DefineFun( _T("firstArg"), FirstArg);
-        p1->DefineFun( _T("order"), FirstArg);
-
-        // infix / postfix operator
-        // Note: Identifiers used here do not have any meaning 
-        //       they are mere placeholders to test certain features.
-        p1->DefineInfixOprt( _T("$"), sign, prPOW+1);  // sign with high priority
-        p1->DefineInfixOprt( _T("~"), plus2);          // high priority
-        p1->DefineInfixOprt( _T("~~"), plus2);
-        p1->DefinePostfixOprt( _T("{m}"), Milli);
-        p1->DefinePostfixOprt( _T("{M}"), Mega);
-        p1->DefinePostfixOprt( _T("m"), Milli);
-        p1->DefinePostfixOprt( _T("meg"), Mega);
-        p1->DefinePostfixOprt( _T("#"), times3);
-        p1->DefinePostfixOprt( _T("'"), sqr); 
-        p1->SetExpr(a_str);
-
-        // Test bytecode integrity
-        // String parsing and bytecode parsing must yield the same result
-        fVal[0] = p1->Eval(); // result from stringparsing
-        fVal[1] = p1->Eval(); // result from bytecode
-        if (fVal[0]!=fVal[1])
-          throw Parser::exception_type( _T("Bytecode / string parsing mismatch.") );
-
-        // Test copy and assignment operators
-        try
-        {
-          // Test copy constructor
-          std::vector<mu::Parser> vParser;
-          vParser.push_back(*(p1.get()));
-          mu::Parser p4 = vParser[0];   // take parser from vector
-        
-          // destroy the originals from p2
-          vParser.clear();              // delete the vector
-          p1.reset(0);
-
-          fVal[2] = p4.Eval();
-
-          // Test assignment operator
-          // additionally  disable Optimizer this time
-          mu::Parser p5;
-          p5 = p4;
-          p5.EnableOptimizer(false);
-          fVal[3] = p5.Eval();
-
-          // Test Eval function for multiple return values
-          // use p2 since it has the optimizer enabled!
-          int nNum;
-          value_type *v = p4.Eval(nNum);
-          fVal[4] = v[nNum-1];
-        }
-        catch(std::exception &e)
-        {
-          mu::console() << _T("\n  ") << e.what() << _T("\n");
-        }
-
-        // limited floating point accuracy requires the following test
-        bool bCloseEnough(true);
-        for (unsigned i=0; i<sizeof(fVal)/sizeof(value_type); ++i)
-        {
-          bCloseEnough &= (fabs(a_fRes-fVal[i]) <= fabs(fVal[i]*0.00001));
-
-          // The tests equations never result in infinity, if they do thats a bug.
-          // reference:
-          // http://sourceforge.net/projects/muparser/forums/forum/462843/topic/5037825
-          #ifdef _MSC_VER
-          #pragma warning(push)
-          #pragma warning(disable:4127)
-          #endif
-		  if (std::numeric_limits<value_type>::has_infinity)
-          #ifdef _MSC_VER
-          #pragma warning(pop)
-          #endif
-		  {
-            bCloseEnough &= (fabs(fVal[i]) != numeric_limits<value_type>::infinity());
-		  }
+		//---------------------------------------------------------------------------
+		int ParserTester::EqnTestInt(const string_type& a_str, double a_fRes, bool a_fPass)
+		{
+			ParserTester::c_iCount++;
+
+			value_type vVarVal[] = { 1, 2, 3 };   // variable values
+			int iRet(0);
+
+			try
+			{
+				value_type fVal[2] = { -99, -999 };   // results: initially should be different
+				ParserInt p;
+				p.DefineConst(_T("const1"), 1);
+				p.DefineConst(_T("const2"), 2);
+				p.DefineVar(_T("a"), &vVarVal[0]);
+				p.DefineVar(_T("b"), &vVarVal[1]);
+				p.DefineVar(_T("c"), &vVarVal[2]);
+
+				p.SetExpr(a_str);
+				fVal[0] = p.Eval(); // result from stringparsing
+				fVal[1] = p.Eval(); // result from bytecode
+
+				if (fVal[0] != fVal[1])
+					throw Parser::exception_type(_T("Bytecode corrupt."));
+
+				iRet = ((a_fRes == fVal[0] && a_fPass) ||
+					(a_fRes != fVal[0] && !a_fPass)) ? 0 : 1;
+				if (iRet == 1)
+				{
+					mu::console() << _T("\n  fail: ") << a_str.c_str()
+						<< _T(" (incorrect result; expected: ") << a_fRes
+						<< _T(" ;calculated: ") << fVal[0] << _T(").");
+				}
+			}
+			catch (Parser::exception_type& e)
+			{
+				if (a_fPass)
+				{
+					mu::console() << _T("\n  fail: ") << e.GetExpr() << _T(" : ") << e.GetMsg();
+					iRet = 1;
+				}
+			}
+			catch (...)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (unexpected exception)");
+				iRet = 1;  // exceptions other than ParserException are not allowed
+			}
+
+			return iRet;
 		}
 
-        iRet = ((bCloseEnough && a_fPass) || (!bCloseEnough && !a_fPass)) ? 0 : 1;
-        
-        
-        if (iRet==1)
-        {
-          mu::console() << _T("\n  fail: ") << a_str.c_str() 
-                        << _T(" (incorrect result; expected: ") << a_fRes
-                        << _T(" ;calculated: ") << fVal[0] << _T(",") 
-                                                << fVal[1] << _T(",")
-                                                << fVal[2] << _T(",")
-                                                << fVal[3] << _T(",")
-                                                << fVal[4] << _T(").");
-        }
-      }
-      catch(Parser::exception_type &e)
-      {
-        if (a_fPass)
-        {
-          if (fVal[0]!=fVal[2] && fVal[0]!=-999 && fVal[1]!=-998)
-            mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (copy construction)");
-          else
-            mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.GetMsg() << _T(")");
-          return 1;
-        }
-      }
-      catch(std::exception &e)
-      {
-        mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (") << e.what() << _T(")");
-        return 1;  // always return a failure since this exception is not expected
-      }
-      catch(...)
-      {
-        mu::console() << _T("\n  fail: ") << a_str.c_str() <<  _T(" (unexpected exception)");
-        return 1;  // exceptions other than ParserException are not allowed
-      }
-
-      return iRet;
-    }
-
-    //---------------------------------------------------------------------------
-    int ParserTester::EqnTestInt(const string_type &a_str, double a_fRes, bool a_fPass)
-    {
-      ParserTester::c_iCount++;
-
-      value_type vVarVal[] = {1, 2, 3};   // variable values
-      int iRet(0);
-
-      try
-      {
-        value_type fVal[2] = {-99, -999};   // results: initially should be different
-        ParserInt p;
-        p.DefineConst( _T("const1"), 1);
-        p.DefineConst( _T("const2"), 2);
-        p.DefineVar( _T("a"), &vVarVal[0]);
-        p.DefineVar( _T("b"), &vVarVal[1]);
-        p.DefineVar( _T("c"), &vVarVal[2]);
-
-        p.SetExpr(a_str);
-        fVal[0] = p.Eval(); // result from stringparsing
-        fVal[1] = p.Eval(); // result from bytecode
-
-        if (fVal[0]!=fVal[1])
-          throw Parser::exception_type( _T("Bytecode corrupt.") );
-
-        iRet =  ( (a_fRes==fVal[0] &&  a_fPass) || 
-                  (a_fRes!=fVal[0] && !a_fPass) ) ? 0 : 1;
-        if (iRet==1)
-        {
-          mu::console() << _T("\n  fail: ") << a_str.c_str() 
-                        << _T(" (incorrect result; expected: ") << a_fRes 
-                        << _T(" ;calculated: ") << fVal[0]<< _T(").");
-        }
-      }
-      catch(Parser::exception_type &e)
-      {
-        if (a_fPass)
-        {
-          mu::console() << _T("\n  fail: ") << e.GetExpr() << _T(" : ") << e.GetMsg();
-          iRet = 1;
-        }
-      }
-      catch(...)
-      {
-        mu::console() << _T("\n  fail: ") << a_str.c_str() <<  _T(" (unexpected exception)");
-        iRet = 1;  // exceptions other than ParserException are not allowed
-      }
-
-      return iRet;
-    }
-
-    //---------------------------------------------------------------------------
-    /** \brief Test an expression in Bulk Mode. */
-    int ParserTester::EqnTestBulk(const string_type &a_str, double a_fRes[4], bool a_fPass)
-    {
-        ParserTester::c_iCount++;
-
-        // Define Bulk Variables
-        int nBulkSize = 4;
-        value_type vVariableA[] = { 1, 2, 3, 4 };   // variable values
-        value_type vVariableB[] = { 2, 2, 2, 2 };   // variable values
-        value_type vVariableC[] = { 3, 3, 3, 3 };   // variable values
-        value_type vResults[] = { 0, 0, 0, 0 };   // variable values
-        int iRet(0);
-
-        try
-        {
-            Parser p;
-            p.DefineConst(_T("const1"), 1);
-            p.DefineConst(_T("const2"), 2);
-            p.DefineVar(_T("a"), vVariableA);
-            p.DefineVar(_T("b"), vVariableB);
-            p.DefineVar(_T("c"), vVariableC);
-
-            p.SetExpr(a_str);
-            p.Eval(vResults, nBulkSize);
-
-            bool bCloseEnough(true);
-            for (int i = 0; i < nBulkSize; ++i)
-            {
-                bCloseEnough &= (fabs(a_fRes[i] - vResults[i]) <= fabs(a_fRes[i] * 0.00001));
-            }
-
-            iRet = ((bCloseEnough && a_fPass) || (!bCloseEnough && !a_fPass)) ? 0 : 1;
-            if (iRet == 1)
-            {
-                mu::console() << _T("\n  fail: ") << a_str.c_str()
-                    << _T(" (incorrect result; expected: {") << a_fRes[0] << _T(",") << a_fRes[1] << _T(",") << a_fRes[2] << _T(",") << a_fRes[3] << _T("}")
-                    << _T(" ;calculated: ") << vResults[0] << _T(",") << vResults[1] << _T(",") << vResults[2] << _T(",") << vResults[3] << _T("}");
-            }
-        }
-        catch (Parser::exception_type &e)
-        {
-            if (a_fPass)
-            {
-                mu::console() << _T("\n  fail: ") << e.GetExpr() << _T(" : ") << e.GetMsg();
-                iRet = 1;
-            }
-        }
-        catch (...)
-        {
-            mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (unexpected exception)");
-            iRet = 1;  // exceptions other than ParserException are not allowed
-        }
-
-        return iRet;
-    }
-
-    //---------------------------------------------------------------------------
-    /** \brief Internal error in test class Test is going to be aborted. */
-    void ParserTester::Abort() const
-    {
-      mu::console() << _T("Test failed (internal error in test class)") << endl;
-      while (!getchar());
-      exit(-1);
-    }
-  } // namespace test
+		//---------------------------------------------------------------------------
+		/** \brief Test an expression in Bulk Mode. */
+		int ParserTester::EqnTestBulk(const string_type& a_str, double a_fRes[4], bool a_fPass)
+		{
+			ParserTester::c_iCount++;
+
+			// Define Bulk Variables
+			int nBulkSize = 4;
+			value_type vVariableA[] = { 1, 2, 3, 4 };   // variable values
+			value_type vVariableB[] = { 2, 2, 2, 2 };   // variable values
+			value_type vVariableC[] = { 3, 3, 3, 3 };   // variable values
+			value_type vResults[] = { 0, 0, 0, 0 };   // variable values
+			int iRet(0);
+
+			try
+			{
+				Parser p;
+				p.DefineConst(_T("const1"), 1);
+				p.DefineConst(_T("const2"), 2);
+				p.DefineVar(_T("a"), vVariableA);
+				p.DefineVar(_T("b"), vVariableB);
+				p.DefineVar(_T("c"), vVariableC);
+
+				p.SetExpr(a_str);
+				p.Eval(vResults, nBulkSize);
+
+				bool bCloseEnough(true);
+				for (int i = 0; i < nBulkSize; ++i)
+				{
+					bCloseEnough &= (fabs(a_fRes[i] - vResults[i]) <= fabs(a_fRes[i] * 0.00001));
+				}
+
+				iRet = ((bCloseEnough && a_fPass) || (!bCloseEnough && !a_fPass)) ? 0 : 1;
+				if (iRet == 1)
+				{
+					mu::console() << _T("\n  fail: ") << a_str.c_str()
+						<< _T(" (incorrect result; expected: {") << a_fRes[0] << _T(",") << a_fRes[1] << _T(",") << a_fRes[2] << _T(",") << a_fRes[3] << _T("}")
+						<< _T(" ;calculated: ") << vResults[0] << _T(",") << vResults[1] << _T(",") << vResults[2] << _T(",") << vResults[3] << _T("}");
+				}
+			}
+			catch (Parser::exception_type& e)
+			{
+				if (a_fPass)
+				{
+					mu::console() << _T("\n  fail: ") << e.GetExpr() << _T(" : ") << e.GetMsg();
+					iRet = 1;
+				}
+			}
+			catch (...)
+			{
+				mu::console() << _T("\n  fail: ") << a_str.c_str() << _T(" (unexpected exception)");
+				iRet = 1;  // exceptions other than ParserException are not allowed
+			}
+
+			return iRet;
+		}
+
+		//---------------------------------------------------------------------------
+		/** \brief Internal error in test class Test is going to be aborted. */
+		void ParserTester::Abort() const
+		{
+			mu::console() << _T("Test failed (internal error in test class)") << endl;
+			while (!getchar());
+			exit(-1);
+		}
+	} // namespace test
 } // namespace mu
diff --git a/src/muParserTokenReader.cpp b/src/muParserTokenReader.cpp
index a15c13a..312a0c5 100644
--- a/src/muParserTokenReader.cpp
+++ b/src/muParserTokenReader.cpp
@@ -1,28 +1,31 @@
 /*
-                 __________                                      
-    _____   __ __\______   \_____  _______  ______  ____ _______ 
-   /     \ |  |  \|     ___/\__  \ \_  __ \/  ___/_/ __ \\_  __ \
-  |  Y Y  \|  |  /|    |     / __ \_|  | \/\___ \ \  ___/ |  | \/
-  |__|_|  /|____/ |____|    (____  /|__|  /____  > \___  >|__|   
-        \/                       \/            \/      \/        
-  Copyright (C) 2013 Ingo Berg
-
-  Permission is hereby granted, free of charge, to any person obtaining a copy of this 
-  software and associated documentation files (the "Software"), to deal in the Software
-  without restriction, including without limitation the rights to use, copy, modify, 
-  merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
-  permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included in all copies or 
-  substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
-  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
-  DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
+
+	 _____  __ _____________ _______  ______ ___________
+	/     \|  |  \____ \__  \\_  __ \/  ___// __ \_  __ \
+   |  Y Y  \  |  /  |_> > __ \|  | \/\___ \\  ___/|  | \/
+   |__|_|  /____/|   __(____  /__|  /____  >\___  >__|
+		 \/      |__|       \/           \/     \/
+   Copyright (C) 2004 - 2021 Ingo Berg
+
+	Redistribution and use in source and binary forms, with or without modification, are permitted
+	provided that the following conditions are met:
+
+	  * Redistributions of source code must retain the above copyright notice, this list of
+		conditions and the following disclaimer.
+	  * Redistributions in binary form must reproduce the above copyright notice, this list of
+		conditions and the following disclaimer in the documentation and/or other materials provided
+		with the distribution.
+
+	THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+	IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+	FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+	CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+	DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+	DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+	IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+	OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
-#include <cassert>
+
 #include <cstdio>
 #include <cstring>
 #include <map>
@@ -32,927 +35,963 @@
 #include "muParserTokenReader.h"
 #include "muParserBase.h"
 
+#if defined(_MSC_VER)
+	#pragma warning(push)
+	#pragma warning(disable : 26812) 
+#endif
+
 /** \file
-    \brief This file contains the parser token reader implementation.
+	\brief This file contains the parser token reader implementation.
 */
 
 
 namespace mu
 {
 
-  // Forward declaration
-  class ParserBase;
-
-  //---------------------------------------------------------------------------
-  /** \brief Copy constructor.
-
-      \sa Assign
-      \throw nothrow
-  */
-  ParserTokenReader::ParserTokenReader(const ParserTokenReader &a_Reader) 
-  { 
-    Assign(a_Reader);
-  }
-    
-  //---------------------------------------------------------------------------
-  /** \brief Assignment operator.
-
-      Self assignment will be suppressed otherwise #Assign is called.
-
-      \param a_Reader Object to copy to this token reader.
-      \throw nothrow
-  */
-  ParserTokenReader& ParserTokenReader::operator=(const ParserTokenReader &a_Reader) 
-  {
-    if (&a_Reader!=this)
-      Assign(a_Reader);
-
-    return *this;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Assign state of a token reader to this token reader. 
-      
-      \param a_Reader Object from which the state should be copied.
-      \throw nothrow
-  */
-  void ParserTokenReader::Assign(const ParserTokenReader &a_Reader)
-  {
-    m_pParser = a_Reader.m_pParser;
-    m_strFormula = a_Reader.m_strFormula;
-    m_iPos = a_Reader.m_iPos;
-    m_iSynFlags = a_Reader.m_iSynFlags;
-    
-    m_UsedVar         = a_Reader.m_UsedVar;
-    m_pFunDef         = a_Reader.m_pFunDef;
-    m_pConstDef       = a_Reader.m_pConstDef;
-    m_pVarDef         = a_Reader.m_pVarDef;
-    m_pStrVarDef      = a_Reader.m_pStrVarDef;
-    m_pPostOprtDef    = a_Reader.m_pPostOprtDef;
-    m_pInfixOprtDef   = a_Reader.m_pInfixOprtDef;
-    m_pOprtDef        = a_Reader.m_pOprtDef;
-    m_bIgnoreUndefVar = a_Reader.m_bIgnoreUndefVar;
-    m_vIdentFun       = a_Reader.m_vIdentFun;
-    m_pFactory        = a_Reader.m_pFactory;
-    m_pFactoryData    = a_Reader.m_pFactoryData;
-    m_iBrackets       = a_Reader.m_iBrackets;
-    m_cArgSep         = a_Reader.m_cArgSep;
-	m_fZero           = a_Reader.m_fZero;
-	m_lastTok         = a_Reader.m_lastTok;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Constructor. 
-      
-      Create a Token reader and bind it to a parser object. 
-
-      \pre [assert] a_pParser may not be NULL
-      \post #m_pParser==a_pParser
-      \param a_pParent Parent parser object of the token reader.
-  */
-  ParserTokenReader::ParserTokenReader(ParserBase *a_pParent)
-    :m_pParser(a_pParent)
-    ,m_strFormula()
-    ,m_iPos(0)
-    ,m_iSynFlags(0)
-    ,m_bIgnoreUndefVar(false)
-    ,m_pFunDef(NULL)
-    ,m_pPostOprtDef(NULL)
-    ,m_pInfixOprtDef(NULL)
-    ,m_pOprtDef(NULL)
-    ,m_pConstDef(NULL)
-    ,m_pStrVarDef(NULL)
-    ,m_pVarDef(NULL)
-    ,m_pFactory(NULL)
-    ,m_pFactoryData(NULL)
-    ,m_vIdentFun()
-    ,m_UsedVar()
-    ,m_fZero(0)
-    ,m_iBrackets(0)
-    ,m_lastTok()
-    ,m_cArgSep(',')
-  {
-    assert(m_pParser);
-    SetParent(m_pParser);
-  }
-    
-  //---------------------------------------------------------------------------
-  /** \brief Create instance of a ParserTokenReader identical with this 
-              and return its pointer. 
-
-      This is a factory method the calling function must take care of the object destruction.
-
-      \return A new ParserTokenReader object.
-      \throw nothrow
-  */
-  ParserTokenReader* ParserTokenReader::Clone(ParserBase *a_pParent) const
-  {
-    std::unique_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));
-    ptr->SetParent(a_pParent);
-    return ptr.release();
-  }
-
-  //---------------------------------------------------------------------------
-  ParserTokenReader::token_type& ParserTokenReader::SaveBeforeReturn(const token_type &tok)
-  {
-    m_lastTok = tok;
-    return m_lastTok;
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserTokenReader::AddValIdent(identfun_type a_pCallback)
-  {
-    // Use push_front is used to give user defined callbacks a higher priority than
-    // the built in ones. Otherwise reading hex numbers would not work
-    // since the "0" in "0xff" would always be read first making parsing of 
-    // the rest impossible.
-    // reference:
-    // http://sourceforge.net/projects/muparser/forums/forum/462843/topic/4824956
-    m_vIdentFun.push_front(a_pCallback);
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserTokenReader::SetVarCreator(facfun_type a_pFactory, void *pUserData)
-  {
-    m_pFactory = a_pFactory;
-    m_pFactoryData = pUserData;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return the current position of the token reader in the formula string. 
-
-      \return #m_iPos
-      \throw nothrow
-  */
-  int ParserTokenReader::GetPos() const
-  {
-    return m_iPos;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return a reference to the formula. 
-
-      \return #m_strFormula
-      \throw nothrow
-  */
-  const string_type& ParserTokenReader::GetExpr() const
-  {
-    return m_strFormula;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Return a map containing the used variables only. */
-  varmap_type& ParserTokenReader::GetUsedVar() 
-  {
-    return m_UsedVar;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Initialize the token Reader. 
-  
-      Sets the formula position index to zero and set Syntax flags to default for initial formula parsing.
-      \pre [assert] triggered if a_szFormula==0
-  */
-  void ParserTokenReader::SetFormula(const string_type &a_strFormula)
-  {
-    m_strFormula = a_strFormula;
-    ReInit();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Set Flag that controls behaviour in case of undefined variables being found. 
-  
-    If true, the parser does not throw an exception if an undefined variable is found. 
-    otherwise it does. This variable is used internally only!
-    It suppresses a "undefined variable" exception in GetUsedVar().  
-    Those function should return a complete list of variables including 
-    those the are not defined by the time of it's call.
-  */
-  void ParserTokenReader::IgnoreUndefVar(bool bIgnore)
-  {
-    m_bIgnoreUndefVar = bIgnore;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Reset the token reader to the start of the formula. 
-
-      The syntax flags will be reset to a value appropriate for the 
-      start of a formula.
-      \post #m_iPos==0, #m_iSynFlags = noOPT | noBC | noPOSTOP | noSTR
-      \throw nothrow
-      \sa ESynCodes
-  */
-  void ParserTokenReader::ReInit()
-  {
-    m_iPos = 0;
-    m_iSynFlags = sfSTART_OF_LINE;
-    m_iBrackets = 0;
-    m_UsedVar.clear();
-    m_lastTok = token_type();
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Read the next token from the string. */ 
-  ParserTokenReader::token_type ParserTokenReader::ReadNextToken()
-  {
-    assert(m_pParser);
-
-    const char_type *szFormula = m_strFormula.c_str();
-    token_type tok;
-
-    // Ignore all non printable characters when reading the expression
-    while (szFormula[m_iPos]>0 && szFormula[m_iPos]<=0x20) 
-      ++m_iPos;
-
-    if ( IsEOF(tok) )        return SaveBeforeReturn(tok); // Check for end of formula
-    if ( IsOprt(tok) )       return SaveBeforeReturn(tok); // Check for user defined binary operator
-    if ( IsFunTok(tok) )     return SaveBeforeReturn(tok); // Check for function token
-    if ( IsBuiltIn(tok) )    return SaveBeforeReturn(tok); // Check built in operators / tokens
-    if ( IsArgSep(tok) )     return SaveBeforeReturn(tok); // Check for function argument separators
-    if ( IsValTok(tok) )     return SaveBeforeReturn(tok); // Check for values / constant tokens
-    if ( IsVarTok(tok) )     return SaveBeforeReturn(tok); // Check for variable tokens
-    if ( IsStrVarTok(tok) )  return SaveBeforeReturn(tok); // Check for string variables
-    if ( IsString(tok) )     return SaveBeforeReturn(tok); // Check for String tokens
-    if ( IsInfixOpTok(tok) ) return SaveBeforeReturn(tok); // Check for unary operators
-    if ( IsPostOpTok(tok) )  return SaveBeforeReturn(tok); // Check for unary operators
-
-    // Check String for undefined variable token. Done only if a 
-    // flag is set indicating to ignore undefined variables.
-    // This is a way to conditionally avoid an error if 
-    // undefined variables occur. 
-    // (The GetUsedVar function must suppress the error for
-    // undefined variables in order to collect all variable 
-    // names including the undefined ones.)
-    if ( (m_bIgnoreUndefVar || m_pFactory) && IsUndefVarTok(tok) )  
-      return SaveBeforeReturn(tok);
-
-    // Check for unknown token
-    // 
-    // !!! From this point on there is no exit without an exception possible...
-    // 
-    string_type strTok;
-    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);
-    if (iEnd!=m_iPos)
-      Error(ecUNASSIGNABLE_TOKEN, m_iPos, strTok);
-
-    Error(ecUNASSIGNABLE_TOKEN, m_iPos, m_strFormula.substr(m_iPos));
-    return token_type(); // never reached
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserTokenReader::SetParent(ParserBase *a_pParent)
-  {
-    m_pParser       = a_pParent; 
-    m_pFunDef       = &a_pParent->m_FunDef;
-    m_pOprtDef      = &a_pParent->m_OprtDef;
-    m_pInfixOprtDef = &a_pParent->m_InfixOprtDef;
-    m_pPostOprtDef  = &a_pParent->m_PostOprtDef;
-    m_pVarDef       = &a_pParent->m_VarDef;
-    m_pStrVarDef    = &a_pParent->m_StrVarDef;
-    m_pConstDef     = &a_pParent->m_ConstDef;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Extract all characters that belong to a certain charset.
-
-    \param a_szCharSet [in] Const char array of the characters allowed in the token. 
-    \param a_strTok [out]  The string that consists entirely of characters listed in a_szCharSet.
-    \param a_iPos [in] Position in the string from where to start reading.
-    \return The Position of the first character not listed in a_szCharSet.
-    \throw nothrow
-  */
-  int ParserTokenReader::ExtractToken(const char_type *a_szCharSet, 
-                                      string_type &a_sTok, 
-                                      int a_iPos) const
-  {
-    int iEnd = (int)m_strFormula.find_first_not_of(a_szCharSet, a_iPos);
-
-    if (iEnd==(int)string_type::npos)
-        iEnd = (int)m_strFormula.length();
-    
-    // Assign token string if there was something found
-    if (a_iPos!=iEnd)
-      a_sTok = string_type( m_strFormula.begin()+a_iPos, m_strFormula.begin()+iEnd);
-
-    return iEnd;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check Expression for the presence of a binary operator token.
-  
-    Userdefined binary operator "++" gives inconsistent parsing result for
-    the equations "a++b" and "a ++ b" if alphabetic characters are allowed
-    in operator tokens. To avoid this this function checks specifically
-    for operator tokens.
-  */
-  int ParserTokenReader::ExtractOperatorToken(string_type &a_sTok, 
-                                              int a_iPos) const
-  {
-    // Changed as per Issue 6: https://code.google.com/p/muparser/issues/detail?id=6
-    int iEnd = (int)m_strFormula.find_first_not_of(m_pParser->ValidOprtChars(), a_iPos);
-    if (iEnd==(int)string_type::npos)
-      iEnd = (int)m_strFormula.length();
-
-    // Assign token string if there was something found
-    if (a_iPos!=iEnd)
-    {
-      a_sTok = string_type( m_strFormula.begin() + a_iPos, m_strFormula.begin() + iEnd);
-      return iEnd;
-    }
-    else
-    {
-      // There is still the chance of having to deal with an operator consisting exclusively
-      // of alphabetic characters.
-      return ExtractToken(MUP_CHARS, a_sTok, a_iPos);
-    }
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check if a built in operator or other token can be found
-      \param a_Tok  [out] Operator token if one is found. This can either be a binary operator or an infix operator token.
-      \return true if an operator token has been found.
-  */
-  bool ParserTokenReader::IsBuiltIn(token_type &a_Tok)
-  {
-    const char_type **const pOprtDef = m_pParser->GetOprtDef(),
-                     *const szFormula = m_strFormula.c_str();
-
-    // Compare token with function and operator strings
-    // check string for operator/function
-    for (int i=0; pOprtDef[i]; i++)
-    {
-      std::size_t len( std::char_traits<char_type>::length(pOprtDef[i]) );
-      if ( string_type(pOprtDef[i]) == string_type(szFormula + m_iPos, szFormula + m_iPos + len) )
-      {
-        switch(i)
-        {
-        //case cmAND:
-        //case cmOR:
-        //case cmXOR:
-        case cmLAND:
-        case cmLOR:
-        case cmLT:
-        case cmGT:
-        case cmLE:
-        case cmGE:
-        case cmNEQ:  
-        case cmEQ:
-        case cmADD:
-        case cmSUB:
-        case cmMUL:
-        case cmDIV:
-        case cmPOW:
-        case cmASSIGN:
-              //if (len!=sTok.length())
-              //  continue;
-
-              // The assignment operator need special treatment
-              if (i==cmASSIGN && m_iSynFlags & noASSIGN)
-                Error(ecUNEXPECTED_OPERATOR, m_iPos, pOprtDef[i]);
-
-              if (!m_pParser->HasBuiltInOprt()) continue;
-              if (m_iSynFlags & noOPT) 
-              {
-                // Maybe its an infix operator not an operator
-                // Both operator types can share characters in 
-                // their identifiers
-                if ( IsInfixOpTok(a_Tok) ) 
-                  return true;
-
-                Error(ecUNEXPECTED_OPERATOR, m_iPos, pOprtDef[i]);
-              }
-
-              m_iSynFlags  = noBC | noOPT | noARG_SEP | noPOSTOP | noASSIGN | noIF | noELSE | noEND;
-              break;
-
-		    case cmBO:
-              if (m_iSynFlags & noBO)
-	              Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);
-              
-              if (m_lastTok.GetCode()==cmFUNC)
-                m_iSynFlags = noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN | noIF | noELSE;
-              else
-                m_iSynFlags = noBC | noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN| noIF | noELSE;
-
-              ++m_iBrackets;
-              break;
-
-		    case cmBC:
-              if (m_iSynFlags & noBC)
-                Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);
-
-              m_iSynFlags  = noBO | noVAR | noVAL | noFUN | noINFIXOP | noSTR | noASSIGN;
-
-              if (--m_iBrackets<0)
-                Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);
-              break;
-
-        case cmELSE:
-              if (m_iSynFlags & noELSE)
-                Error(ecUNEXPECTED_CONDITIONAL, m_iPos, pOprtDef[i]);
-
-              m_iSynFlags = noBC | noPOSTOP | noEND | noOPT | noIF | noELSE;
-              break;
-
-        case cmIF:
-              if (m_iSynFlags & noIF)
-                Error(ecUNEXPECTED_CONDITIONAL, m_iPos, pOprtDef[i]);
-
-              m_iSynFlags = noBC | noPOSTOP | noEND | noOPT | noIF | noELSE;
-              break;
-
-		    default:      // The operator is listed in c_DefaultOprt, but not here. This is a bad thing...
-              Error(ecINTERNAL_ERROR);
-        } // switch operator id
-
-        m_iPos += (int)len;
-        a_Tok.Set( (ECmdCode)i, pOprtDef[i] );
-        return true;
-	    } // if operator string found
-    } // end of for all operator strings
-  
-    return false;
-  }
-
-  //---------------------------------------------------------------------------
-  bool ParserTokenReader::IsArgSep(token_type &a_Tok)
-  {
-    const char_type* szFormula = m_strFormula.c_str();
-
-    if (szFormula[m_iPos]==m_cArgSep)
-    {
-      // copy the separator into null terminated string
-      char_type szSep[2];
-      szSep[0] = m_cArgSep;
-      szSep[1] = 0;
-
-      if (m_iSynFlags & noARG_SEP)
-        Error(ecUNEXPECTED_ARG_SEP, m_iPos, szSep);
-
-      m_iSynFlags  = noBC | noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN;
-      m_iPos++;
-      a_Tok.Set(cmARG_SEP, szSep);
-      return true;
-    }
-
-    return false;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check for End of Formula.
-
-      \return true if an end of formula is found false otherwise.
-      \param a_Tok [out] If an eof is found the corresponding token will be stored there.
-      \throw nothrow
-      \sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsString, IsInfixOpTok, IsPostOpTok
-  */
-  bool ParserTokenReader::IsEOF(token_type &a_Tok)
-  {
-    const char_type* szFormula = m_strFormula.c_str();
-
-    // check for EOF
-    if ( !szFormula[m_iPos] /*|| szFormula[m_iPos] == '\n'*/)
-    {
-      if ( m_iSynFlags & noEND )
-        Error(ecUNEXPECTED_EOF, m_iPos);
-
-      if (m_iBrackets>0)
-        Error(ecMISSING_PARENS, m_iPos, _T(")"));
-
-      m_iSynFlags = 0;
-      a_Tok.Set(cmEND);
-      return true;
-    }
-
-    return false;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check if a string position contains a unary infix operator. 
-      \return true if a function token has been found false otherwise.
-  */
-  bool ParserTokenReader::IsInfixOpTok(token_type &a_Tok)
-  {
-    string_type sTok;
-    int iEnd = ExtractToken(m_pParser->ValidInfixOprtChars(), sTok, m_iPos);
-    if (iEnd==m_iPos)
-      return false;
-
-    // iterate over all postfix operator strings
-    funmap_type::const_reverse_iterator it = m_pInfixOprtDef->rbegin();
-    for ( ; it!=m_pInfixOprtDef->rend(); ++it)
-    {
-      if (sTok.find(it->first)!=0)
-        continue;
-
-      a_Tok.Set(it->second, it->first);
-      m_iPos += (int)it->first.length();
-
-      if (m_iSynFlags & noINFIXOP) 
-        Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString());
-
-      m_iSynFlags = noPOSTOP | noINFIXOP | noOPT | noBC | noSTR | noASSIGN;
-      return true;
-    }
-
-    return false;
+	// Forward declaration
+	class ParserBase;
+
+	/** \brief Copy constructor.
+
+		\sa Assign
+		\throw nothrow
+	*/
+	ParserTokenReader::ParserTokenReader(const ParserTokenReader& a_Reader)
+	{
+		Assign(a_Reader);
+	}
+
+
+	/** \brief Assignment operator.
+
+		Self assignment will be suppressed otherwise #Assign is called.
+
+		\param a_Reader Object to copy to this token reader.
+		\throw nothrow
+	*/
+	ParserTokenReader& ParserTokenReader::operator=(const ParserTokenReader& a_Reader)
+	{
+		if (&a_Reader != this)
+			Assign(a_Reader);
+
+		return *this;
+	}
+
+
+	/** \brief Assign state of a token reader to this token reader.
+
+		\param a_Reader Object from which the state should be copied.
+		\throw nothrow
+	*/
+	void ParserTokenReader::Assign(const ParserTokenReader& a_Reader)
+	{
+		m_pParser = a_Reader.m_pParser;
+		m_strFormula = a_Reader.m_strFormula;
+		m_iPos = a_Reader.m_iPos;
+		m_iSynFlags = a_Reader.m_iSynFlags;
+
+		m_UsedVar = a_Reader.m_UsedVar;
+		m_pFunDef = a_Reader.m_pFunDef;
+		m_pConstDef = a_Reader.m_pConstDef;
+		m_pVarDef = a_Reader.m_pVarDef;
+		m_pStrVarDef = a_Reader.m_pStrVarDef;
+		m_pPostOprtDef = a_Reader.m_pPostOprtDef;
+		m_pInfixOprtDef = a_Reader.m_pInfixOprtDef;
+		m_pOprtDef = a_Reader.m_pOprtDef;
+		m_bIgnoreUndefVar = a_Reader.m_bIgnoreUndefVar;
+		m_vIdentFun = a_Reader.m_vIdentFun;
+		m_pFactory = a_Reader.m_pFactory;
+		m_pFactoryData = a_Reader.m_pFactoryData;
+		m_bracketStack = a_Reader.m_bracketStack;
+		m_cArgSep = a_Reader.m_cArgSep;
+		m_fZero = a_Reader.m_fZero;
+		m_lastTok = a_Reader.m_lastTok;
+	}
+
+
+	/** \brief Constructor.
+
+		Create a Token reader and bind it to a parser object.
+
+		\pre [assert] a_pParser may not be NULL
+		\post #m_pParser==a_pParser
+		\param a_pParent Parent parser object of the token reader.
+	*/
+	ParserTokenReader::ParserTokenReader(ParserBase* a_pParent)
+		:m_pParser(a_pParent)
+		, m_strFormula()
+		, m_iPos(0)
+		, m_iSynFlags(0)
+		, m_bIgnoreUndefVar(false)
+		, m_pFunDef(nullptr)
+		, m_pPostOprtDef(nullptr)
+		, m_pInfixOprtDef(nullptr)
+		, m_pOprtDef(nullptr)
+		, m_pConstDef(nullptr)
+		, m_pStrVarDef(nullptr)
+		, m_pVarDef(nullptr)
+		, m_pFactory(nullptr)
+		, m_pFactoryData(nullptr)
+		, m_vIdentFun()
+		, m_UsedVar()
+		, m_fZero(0)
+		, m_bracketStack()
+		, m_lastTok()
+		, m_cArgSep(',')
+	{
+		MUP_ASSERT(m_pParser != nullptr);
+		SetParent(m_pParser);
+	}
+
+
+	/** \brief Create instance of a ParserTokenReader identical with this
+				and return its pointer.
+
+		This is a factory method the calling function must take care of the object destruction.
+
+		\return A new ParserTokenReader object.
+		\throw nothrow
+	*/
+	ParserTokenReader* ParserTokenReader::Clone(ParserBase* a_pParent) const
+	{
+		std::unique_ptr<ParserTokenReader> ptr(new ParserTokenReader(*this));
+		ptr->SetParent(a_pParent);
+		return ptr.release();
+	}
+
+
+	ParserTokenReader::token_type& ParserTokenReader::SaveBeforeReturn(const token_type& tok)
+	{
+		m_lastTok = tok;
+		return m_lastTok;
+	}
+
+
+	void ParserTokenReader::AddValIdent(identfun_type a_pCallback)
+	{
+		// Use push_front is used to give user defined callbacks a higher priority than
+		// the built in ones. Otherwise reading hex numbers would not work
+		// since the "0" in "0xff" would always be read first making parsing of 
+		// the rest impossible.
+		// reference:
+		// http://sourceforge.net/projects/muparser/forums/forum/462843/topic/4824956
+		m_vIdentFun.push_front(a_pCallback);
+	}
+
+
+	void ParserTokenReader::SetVarCreator(facfun_type a_pFactory, void* pUserData)
+	{
+		m_pFactory = a_pFactory;
+		m_pFactoryData = pUserData;
+	}
+
+
+	/** \brief Return the current position of the token reader in the formula string.
+
+		\return #m_iPos
+		\throw nothrow
+	*/
+	int ParserTokenReader::GetPos() const
+	{
+		return m_iPos;
+	}
+
+
+	/** \brief Return a reference to the formula.
+
+		\return #m_strFormula
+		\throw nothrow
+	*/
+	const string_type& ParserTokenReader::GetExpr() const
+	{
+		return m_strFormula;
+	}
+
+
+	/** \brief Return a map containing the used variables only. */
+	varmap_type& ParserTokenReader::GetUsedVar()
+	{
+		return m_UsedVar;
+	}
+
+
+	/** \brief Initialize the token Reader.
+
+		Sets the formula position index to zero and set Syntax flags to default for initial formula parsing.
+		\pre [assert] triggered if a_szFormula==0
+	*/
+	void ParserTokenReader::SetFormula(const string_type& a_strFormula)
+	{
+		m_strFormula = a_strFormula;
+		ReInit();
+	}
+
+
+	/** \brief Set Flag that controls behaviour in case of undefined variables being found.
+
+	  If true, the parser does not throw an exception if an undefined variable is found.
+	  otherwise it does. This variable is used internally only!
+	  It suppresses a "undefined variable" exception in GetUsedVar().
+	  Those function should return a complete list of variables including
+	  those the are not defined by the time of it's call.
+	*/
+	void ParserTokenReader::IgnoreUndefVar(bool bIgnore)
+	{
+		m_bIgnoreUndefVar = bIgnore;
+	}
+
+
+	/** \brief Reset the token reader to the start of the formula.
+
+		The syntax flags will be reset to a value appropriate for the
+		start of a formula.
+		\post #m_iPos==0, #m_iSynFlags = noOPT | noBC | noPOSTOP | noSTR
+		\throw nothrow
+		\sa ESynCodes
+	*/
+	void ParserTokenReader::ReInit()
+	{
+		m_iPos = 0;
+		m_iSynFlags = sfSTART_OF_LINE;
+		m_bracketStack = std::stack<int>();
+		m_UsedVar.clear();
+		m_lastTok = token_type();
+	}
+
+
+	/** \brief Read the next token from the string. */
+	ParserTokenReader::token_type ParserTokenReader::ReadNextToken()
+	{
+		MUP_ASSERT(m_pParser != nullptr);
+
+		const char_type* szExpr = m_strFormula.c_str();
+		token_type tok;
+
+		// Ignore all non printable characters when reading the expression
+		while (szExpr[m_iPos] > 0 && szExpr[m_iPos] <= 0x20)
+		{
+			// 14-31 are control characters. I don�t want to have to deal with such strings at all!
+			// (see https://en.cppreference.com/w/cpp/string/byte/isprint)
+			if (szExpr[m_iPos] >= 14 && szExpr[m_iPos] <= 31)
+				Error(ecINVALID_CHARACTERS_FOUND, m_iPos);
+
+			++m_iPos;
+		}
+
+		// Check for end of formula
+		if (IsEOF(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for user defined binary operator
+		if (IsOprt(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for function token
+		if (IsFunTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check built in operators / tokens
+		if (IsBuiltIn(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for function argument separators
+		if (IsArgSep(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for values / constant tokens
+		if (IsValTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for variable tokens
+		if (IsVarTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for string variables
+		if (IsStrVarTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for String tokens
+		if (IsString(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for unary operators
+		if (IsInfixOpTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for unary operators
+		if (IsPostOpTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check String for undefined variable token. Done only if a 
+		// flag is set indicating to ignore undefined variables.
+		// This is a way to conditionally avoid an error if 
+		// undefined variables occur. 
+		// (The GetUsedVar function must suppress the error for
+		// undefined variables in order to collect all variable 
+		// names including the undefined ones.)
+		if ((m_bIgnoreUndefVar || m_pFactory) && IsUndefVarTok(tok))
+			return SaveBeforeReturn(tok);
+
+		// Check for unknown token
+		// 
+		// !!! From this point on there is no exit without an exception possible...
+		// 
+		string_type strTok;
+		auto iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, (std::size_t)m_iPos);
+		if (iEnd != m_iPos)
+			Error(ecUNASSIGNABLE_TOKEN, m_iPos, strTok);
+
+		Error(ecUNASSIGNABLE_TOKEN, m_iPos, m_strFormula.substr(m_iPos));
+		return token_type(); // never reached
+	}
+
+
+	void ParserTokenReader::SetParent(ParserBase* a_pParent)
+	{
+		m_pParser = a_pParent;
+		m_pFunDef = &a_pParent->m_FunDef;
+		m_pOprtDef = &a_pParent->m_OprtDef;
+		m_pInfixOprtDef = &a_pParent->m_InfixOprtDef;
+		m_pPostOprtDef = &a_pParent->m_PostOprtDef;
+		m_pVarDef = &a_pParent->m_VarDef;
+		m_pStrVarDef = &a_pParent->m_StrVarDef;
+		m_pConstDef = &a_pParent->m_ConstDef;
+	}
+
+
+	/** \brief Extract all characters that belong to a certain charset.
+
+		\param a_szCharSet [in] Const char array of the characters allowed in the token.
+		\param a_strTok [out]  The string that consists entirely of characters listed in a_szCharSet.
+		\param a_iPos [in] Position in the string from where to start reading.
+		\return The Position of the first character not listed in a_szCharSet.
+		\throw nothrow
+	*/
+	int ParserTokenReader::ExtractToken(const char_type* a_szCharSet, string_type& a_sTok, std::size_t a_iPos) const
+	{
+		auto iEnd = m_strFormula.find_first_not_of(a_szCharSet, a_iPos);
+
+		if (iEnd == string_type::npos)
+			iEnd = m_strFormula.length();
+
+		// Assign token string if there was something found
+		if (a_iPos != iEnd)
+			a_sTok = string_type(m_strFormula.begin() + a_iPos, m_strFormula.begin() + iEnd);
+
+		return static_cast<int>(iEnd);
+	}
+
+
+	/** \brief Check Expression for the presence of a binary operator token.
+
+	  Userdefined binary operator "++" gives inconsistent parsing result for
+	  the equations "a++b" and "a ++ b" if alphabetic characters are allowed
+	  in operator tokens. To avoid this this function checks specifically
+	  for operator tokens.
+	*/
+	int ParserTokenReader::ExtractOperatorToken(string_type& a_sTok, std::size_t a_iPos) const
+	{
+		// Changed as per Issue 6: https://code.google.com/p/muparser/issues/detail?id=6
+		auto iEnd = m_strFormula.find_first_not_of(m_pParser->ValidOprtChars(), a_iPos);
+		if (iEnd == string_type::npos)
+			iEnd = m_strFormula.length();
+
+		// Assign token string if there was something found
+		if (a_iPos != iEnd)
+		{
+			a_sTok = string_type(m_strFormula.begin() + a_iPos, m_strFormula.begin() + iEnd);
+			return static_cast<int>(iEnd);
+		}
+		else
+		{
+			// There is still the chance of having to deal with an operator consisting exclusively
+			// of alphabetic characters.
+			return ExtractToken(_T("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), a_sTok, (std::size_t)a_iPos);
+		}
+	}
+
+
+	/** \brief Check if a built in operator or other token can be found
+		\param a_Tok  [out] Operator token if one is found. This can either be a binary operator or an infix operator token.
+		\return true if an operator token has been found.
+	*/
+	bool ParserTokenReader::IsBuiltIn(token_type& a_Tok)
+	{
+		const char_type** const pOprtDef = m_pParser->GetOprtDef(),
+			* const szFormula = m_strFormula.c_str();
+
+		// Compare token with function and operator strings
+		// check string for operator/function
+		for (int i = 0; pOprtDef[i]; i++)
+		{
+			std::size_t len(std::char_traits<char_type>::length(pOprtDef[i]));
+			if (string_type(pOprtDef[i]) == string_type(szFormula + m_iPos, szFormula + m_iPos + len))
+			{
+				switch (i)
+				{
+				case cmLAND:
+				case cmLOR:
+				case cmLT:
+				case cmGT:
+				case cmLE:
+				case cmGE:
+				case cmNEQ:
+				case cmEQ:
+				case cmADD:
+				case cmSUB:
+				case cmMUL:
+				case cmDIV:
+				case cmPOW:
+				case cmASSIGN:
+					// The assignment operator need special treatment
+					if (i == cmASSIGN && m_iSynFlags & noASSIGN)
+						Error(ecUNEXPECTED_OPERATOR, m_iPos, pOprtDef[i]);
+
+					if (!m_pParser->HasBuiltInOprt()) continue;
+					if (m_iSynFlags & noOPT)
+					{
+						// Maybe its an infix operator not an operator
+						// Both operator types can share characters in 
+						// their identifiers
+						if (IsInfixOpTok(a_Tok))
+							return true;
+
+						Error(ecUNEXPECTED_OPERATOR, m_iPos, pOprtDef[i]);
+					}
+
+					m_iSynFlags = noBC | noOPT | noARG_SEP | noPOSTOP | noASSIGN | noIF | noELSE | noEND;
+					break;
+
+				case cmBO:
+					if (m_iSynFlags & noBO)
+						Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);
+
+					if (m_lastTok.GetCode() == cmFUNC)
+						m_iSynFlags = noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN | noIF | noELSE;
+					else
+						m_iSynFlags = noBC | noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN | noIF | noELSE;
+
+					m_bracketStack.push(cmBO);
+					break;
+
+				case cmBC:
+					if (m_iSynFlags & noBC)
+						Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);
+
+					m_iSynFlags = noBO | noVAR | noVAL | noFUN | noINFIXOP | noSTR | noASSIGN;
+
+					if (!m_bracketStack.empty())
+						m_bracketStack.pop();
+					else
+						Error(ecUNEXPECTED_PARENS, m_iPos, pOprtDef[i]);
+					break;
+
+				case cmELSE:
+					if (m_iSynFlags & noELSE)
+						Error(ecUNEXPECTED_CONDITIONAL, m_iPos, pOprtDef[i]);
+
+					m_iSynFlags = noBC | noPOSTOP | noEND | noOPT | noIF | noELSE | noSTR;
+					break;
+
+				case cmIF:
+					if (m_iSynFlags & noIF)
+						Error(ecUNEXPECTED_CONDITIONAL, m_iPos, pOprtDef[i]);
+
+					m_iSynFlags = noBC | noPOSTOP | noEND | noOPT | noIF | noELSE | noSTR;
+					break;
+
+				default:      // The operator is listed in c_DefaultOprt, but not here. This is a bad thing...
+					Error(ecINTERNAL_ERROR);
+				} // switch operator id
+
+				m_iPos += (int)len;
+				a_Tok.Set((ECmdCode)i, pOprtDef[i]);
+				return true;
+			} // if operator string found
+		} // end of for all operator strings
+
+		return false;
+	}
+
+
+	bool ParserTokenReader::IsArgSep(token_type& a_Tok)
+	{
+		const char_type* szFormula = m_strFormula.c_str();
+
+		if (szFormula[m_iPos] == m_cArgSep)
+		{
+			// copy the separator into null terminated string
+			char_type szSep[2];
+			szSep[0] = m_cArgSep;
+			szSep[1] = 0;
+
+			if (m_iSynFlags & noARG_SEP)
+				Error(ecUNEXPECTED_ARG_SEP, m_iPos, szSep);
+
+			m_iSynFlags = noBC | noOPT | noEND | noARG_SEP | noPOSTOP | noASSIGN;
+			m_iPos++;
+			a_Tok.Set(cmARG_SEP, szSep);
+			return true;
+		}
+
+		return false;
+	}
+
+
+	/** \brief Check for End of Formula.
+
+		\return true if an end of formula is found false otherwise.
+		\param a_Tok [out] If an eof is found the corresponding token will be stored there.
+		\throw nothrow
+		\sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsString, IsInfixOpTok, IsPostOpTok
+	*/
+	bool ParserTokenReader::IsEOF(token_type& a_Tok)
+	{
+		const char_type* szFormula = m_strFormula.c_str();
+
+		// check for EOF
+		if (!szFormula[m_iPos] /*|| szFormula[m_iPos] == '\n'*/)
+		{
+			if (m_iSynFlags & noEND)
+				Error(ecUNEXPECTED_EOF, m_iPos);
+
+			if (!m_bracketStack.empty())
+				Error(ecMISSING_PARENS, m_iPos, _T(")"));
+
+			m_iSynFlags = 0;
+			a_Tok.Set(cmEND);
+			return true;
+		}
+
+		return false;
+	}
+
+
+	/** \brief Check if a string position contains a unary infix operator.
+		\return true if a function token has been found false otherwise.
+	*/
+	bool ParserTokenReader::IsInfixOpTok(token_type& a_Tok)
+	{
+		string_type sTok;
+		auto iEnd = ExtractToken(m_pParser->ValidInfixOprtChars(), sTok, (std::size_t)m_iPos);
+		if (iEnd == m_iPos)
+			return false;
+
+		// iterate over all postfix operator strings
+		funmap_type::const_reverse_iterator it = m_pInfixOprtDef->rbegin();
+		for (; it != m_pInfixOprtDef->rend(); ++it)
+		{
+			if (sTok.find(it->first) != 0)
+				continue;
+
+			a_Tok.Set(it->second, it->first);
+			m_iPos += (int)it->first.length();
+
+			if (m_iSynFlags & noINFIXOP)
+				Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString());
+
+			m_iSynFlags = noPOSTOP | noINFIXOP | noOPT | noBC | noSTR | noASSIGN | noARG_SEP;
+			return true;
+		}
+
+		return false;
+
+		/*
+			a_Tok.Set(item->second, sTok);
+			m_iPos = (int)iEnd;
+
+			if (m_iSynFlags & noINFIXOP)
+			  Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString());
+
+			m_iSynFlags = noPOSTOP | noINFIXOP | noOPT | noBC | noSTR | noASSIGN;
+			return true;
+		*/
+	}
+
+
+	/** \brief Check whether the token at a given position is a function token.
+		\param a_Tok [out] If a value token is found it will be placed here.
+		\throw ParserException if Syntaxflags do not allow a function at a_iPos
+		\return true if a function token has been found false otherwise.
+		\pre [assert] m_pParser!=0
+	*/
+	bool ParserTokenReader::IsFunTok(token_type& a_Tok)
+	{
+		string_type strTok;
+		auto iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, (std::size_t)m_iPos);
+		if (iEnd == m_iPos)
+			return false;
+
+		funmap_type::const_iterator item = m_pFunDef->find(strTok);
+		if (item == m_pFunDef->end())
+			return false;
+
+		// Check if the next sign is an opening bracket
+		const char_type* szFormula = m_strFormula.c_str();
+		if (szFormula[iEnd] != '(')
+			return false;
+
+		a_Tok.Set(item->second, strTok);
+
+		m_iPos = (int)iEnd;
+		if (m_iSynFlags & noFUN)
+			Error(ecUNEXPECTED_FUN, m_iPos - (int)a_Tok.GetAsString().length(), a_Tok.GetAsString());
+
+		m_iSynFlags = noANY ^ noBO;
+		return true;
+	}
+
+
+	/** \brief Check if a string position contains a binary operator.
+		\param a_Tok  [out] Operator token if one is found. This can either be a binary operator or an infix operator token.
+		\return true if an operator token has been found.
+	*/
+	bool ParserTokenReader::IsOprt(token_type& a_Tok)
+	{
+		const char_type* const szExpr = m_strFormula.c_str();
+		string_type strTok;
+
+		auto iEnd = ExtractOperatorToken(strTok, (std::size_t)m_iPos);
+		if (iEnd == m_iPos)
+			return false;
+
+		// Check if the operator is a built in operator, if so ignore it here
+		const char_type** const pOprtDef = m_pParser->GetOprtDef();
+		for (int i = 0; m_pParser->HasBuiltInOprt() && pOprtDef[i]; ++i)
+		{
+			if (string_type(pOprtDef[i]) == strTok)
+				return false;
+		}
+
+		// Note:
+		// All tokens in oprt_bin_maptype are have been sorted by their length
+		// Long operators must come first! Otherwise short names (like: "add") that
+		// are part of long token names (like: "add123") will be found instead 
+		// of the long ones.
+		// Length sorting is done with ascending length so we use a reverse iterator here.
+		funmap_type::const_reverse_iterator it = m_pOprtDef->rbegin();
+		for (; it != m_pOprtDef->rend(); ++it)
+		{
+			const string_type& sID = it->first;
+			if (sID == string_type(szExpr + m_iPos, szExpr + m_iPos + sID.length()))
+			{
+				a_Tok.Set(it->second, strTok);
+
+				// operator was found
+				if (m_iSynFlags & noOPT)
+				{
+					// An operator was found but is not expected to occur at
+					// this position of the formula, maybe it is an infix 
+					// operator, not a binary operator. Both operator types
+					// can share characters in their identifiers.
+					if (IsInfixOpTok(a_Tok))
+						return true;
+					else
+					{
+						// nope, no infix operator
+						return false;
+						//Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString()); 
+					}
+
+				}
+
+				m_iPos += (int)sID.length();
+				m_iSynFlags = noBC | noOPT | noARG_SEP | noPOSTOP | noEND | noASSIGN;
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+
+	/** \brief Check if a string position contains a unary post value operator. */
+	bool ParserTokenReader::IsPostOpTok(token_type& a_Tok)
+	{
+		// <ibg 20110629> Do not check for postfix operators if they are not allowed at
+		//                the current expression index.
+		//
+		//  This will fix the bug reported here:  
+		//
+		//  http://sourceforge.net/tracker/index.php?func=detail&aid=3343891&group_id=137191&atid=737979
+		//
+		if (m_iSynFlags & noPOSTOP)
+			return false;
+		// </ibg>
+
+		// Tricky problem with equations like "3m+5":
+		//     m is a postfix operator, + is a valid sign for postfix operators and 
+		//     for binary operators parser detects "m+" as operator string and 
+		//     finds no matching postfix operator.
+		// 
+		// This is a special case so this routine slightly differs from the other
+		// token readers.
+
+		// Test if there could be a postfix operator
+		string_type sTok;
+		auto iEnd = ExtractToken(m_pParser->ValidOprtChars(), sTok, (std::size_t)m_iPos);
+		if (iEnd == m_iPos)
+			return false;
+
+		// iterate over all postfix operator strings
+		funmap_type::const_reverse_iterator it = m_pPostOprtDef->rbegin();
+		for (; it != m_pPostOprtDef->rend(); ++it)
+		{
+			if (sTok.find(it->first) != 0)
+				continue;
+
+			a_Tok.Set(it->second, sTok);
+			m_iPos += (int)it->first.length();
+
+			m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noSTR | noASSIGN;
+			return true;
+		}
+
+		return false;
+	}
+
+
+	/** \brief Check whether the token at a given position is a value token.
+
+		Value tokens are either values or constants.
+
+		\param a_Tok [out] If a value token is found it will be placed here.
+		\return true if a value token has been found.
+	*/
+	bool ParserTokenReader::IsValTok(token_type& a_Tok)
+	{
+		MUP_ASSERT(m_pConstDef != nullptr);
+		MUP_ASSERT(m_pParser != nullptr);
+
+		string_type strTok;
+		value_type fVal(0);
+
+		// 2.) Check for user defined constant
+		// Read everything that could be a constant name
+		auto iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, (std::size_t)m_iPos);
+		if (iEnd != m_iPos)
+		{
+			valmap_type::const_iterator item = m_pConstDef->find(strTok);
+			if (item != m_pConstDef->end())
+			{
+				m_iPos = iEnd;
+				a_Tok.SetVal(item->second, strTok);
+
+				if (m_iSynFlags & noVAL)
+					Error(ecUNEXPECTED_VAL, m_iPos - (int)strTok.length(), strTok);
+
+				m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN;
+				return true;
+			}
+		}
+
+		// 3.call the value recognition functions provided by the user
+		// Call user defined value recognition functions
+		std::list<identfun_type>::const_iterator item = m_vIdentFun.begin();
+		for (item = m_vIdentFun.begin(); item != m_vIdentFun.end(); ++item)
+		{
+			int iStart = m_iPos;
+			if ((*item)(m_strFormula.c_str() + m_iPos, &m_iPos, &fVal) == 1)
+			{
+				// 2013-11-27 Issue 2:  https://code.google.com/p/muparser/issues/detail?id=2
+				strTok.assign(m_strFormula.c_str(), iStart, (std::size_t)m_iPos - iStart);
+
+				if (m_iSynFlags & noVAL)
+					Error(ecUNEXPECTED_VAL, m_iPos - (int)strTok.length(), strTok);
+
+				a_Tok.SetVal(fVal, strTok);
+				m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN;
+				return true;
+			}
+		}
+
+		return false;
+	}
+
+
+	/** \brief Check wheter a token at a given position is a variable token.
+		\param a_Tok [out] If a variable token has been found it will be placed here.
+		  \return true if a variable token has been found.
+	*/
+	bool ParserTokenReader::IsVarTok(token_type& a_Tok)
+	{
+		if (m_pVarDef->empty())
+			return false;
+
+		string_type strTok;
+		auto iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, (std::size_t)m_iPos);
+		if (iEnd == m_iPos)
+			return false;
+
+		varmap_type::const_iterator item = m_pVarDef->find(strTok);
+		if (item == m_pVarDef->end())
+			return false;
+
+		if (m_iSynFlags & noVAR)
+			Error(ecUNEXPECTED_VAR, m_iPos, strTok);
+
+		m_pParser->OnDetectVar(&m_strFormula, m_iPos, iEnd);
+
+		m_iPos = iEnd;
+		a_Tok.SetVar(item->second, strTok);
+		m_UsedVar[item->first] = item->second;  // Add variable to used-var-list
+
+		m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR;
+
+		//  Zur Info hier die SynFlags von IsVal():
+		//    m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN; 
+		return true;
+	}
+
+
+	bool ParserTokenReader::IsStrVarTok(token_type& a_Tok)
+	{
+		if (!m_pStrVarDef || m_pStrVarDef->empty())
+			return false;
+
+		string_type strTok;
+		auto iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, (std::size_t)m_iPos);
+		if (iEnd == m_iPos)
+			return false;
+
+		strmap_type::const_iterator item = m_pStrVarDef->find(strTok);
+		if (item == m_pStrVarDef->end())
+			return false;
+
+		if (m_iSynFlags & noSTR)
+			Error(ecUNEXPECTED_VAR, m_iPos, strTok);
+
+		m_iPos = iEnd;
+		if (!m_pParser->m_vStringVarBuf.size())
+			Error(ecINTERNAL_ERROR);
+
+		a_Tok.SetString(m_pParser->m_vStringVarBuf[item->second], m_pParser->m_vStringVarBuf.size());
+
+		m_iSynFlags = noANY ^ (noBC | noOPT | noEND | noARG_SEP);
+		return true;
+	}
+
+
+
+	/** \brief Check wheter a token at a given position is an undefined variable.
+
+		\param a_Tok [out] If a variable tom_pParser->m_vStringBufken has been found it will be placed here.
+		  \return true if a variable token has been found.
+		\throw nothrow
+	*/
+	bool ParserTokenReader::IsUndefVarTok(token_type& a_Tok)
+	{
+		string_type strTok;
+		auto iEnd(ExtractToken(m_pParser->ValidNameChars(), strTok, (std::size_t)m_iPos));
+		if (iEnd == m_iPos)
+			return false;
+
+		if (m_iSynFlags & noVAR)
+		{
+			// <ibg/> 20061021 added token string strTok instead of a_Tok.GetAsString() as the 
+			//                 token identifier. 
+			// related bug report:
+			// http://sourceforge.net/tracker/index.php?func=detail&aid=1578779&group_id=137191&atid=737979
+			Error(ecUNEXPECTED_VAR, m_iPos - (int)a_Tok.GetAsString().length(), strTok);
+		}
+
+		// If a factory is available implicitely create new variables
+		if (m_pFactory)
+		{
+			value_type* fVar = m_pFactory(strTok.c_str(), m_pFactoryData);
+			a_Tok.SetVar(fVar, strTok);
+
+			// Do not use m_pParser->DefineVar( strTok, fVar );
+			// in order to define the new variable, it will clear the
+			// m_UsedVar array which will kill previously defined variables
+			// from the list
+			// This is safe because the new variable can never override an existing one
+			// because they are checked first!
+			(*m_pVarDef)[strTok] = fVar;
+			m_UsedVar[strTok] = fVar;  // Add variable to used-var-list
+		}
+		else
+		{
+			a_Tok.SetVar((value_type*)&m_fZero, strTok);
+			m_UsedVar[strTok] = 0;  // Add variable to used-var-list
+		}
+
+		m_iPos = iEnd;
+
+		// Call the variable factory in order to let it define a new parser variable
+		m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noINFIXOP | noSTR;
+		return true;
+	}
+
+
+
+	/** \brief Check wheter a token at a given position is a string.
+		\param a_Tok [out] If a variable token has been found it will be placed here.
+		\return true if a string token has been found.
+		\sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsEOF, IsInfixOpTok, IsPostOpTok
+		\throw nothrow
+	*/
+	bool ParserTokenReader::IsString(token_type& a_Tok)
+	{
+		if (m_strFormula[m_iPos] != '"')
+			return false;
+
+		string_type strBuf(&m_strFormula[(std::size_t)m_iPos + 1]);
+		std::size_t iEnd(0), iSkip(0);
+
+		// parser over escaped '\"' end replace them with '"'
+		for (iEnd = (int)strBuf.find(_T('\"')); iEnd != 0 && iEnd != string_type::npos; iEnd = (int)strBuf.find(_T('\"'), iEnd))
+		{
+			if (strBuf[iEnd - 1] != '\\') break;
+			strBuf.replace(iEnd - 1, 2, _T("\""));
+			iSkip++;
+		}
+
+		if (iEnd == string_type::npos)
+			Error(ecUNTERMINATED_STRING, m_iPos, _T("\""));
+
+		string_type strTok(strBuf.begin(), strBuf.begin() + iEnd);
+
+		if (m_iSynFlags & noSTR)
+			Error(ecUNEXPECTED_STR, m_iPos, strTok);
 
-/*
-    a_Tok.Set(item->second, sTok);
-    m_iPos = (int)iEnd;
+		m_pParser->m_vStringBuf.push_back(strTok); // Store string in internal buffer
+		a_Tok.SetString(strTok, m_pParser->m_vStringBuf.size());
 
-    if (m_iSynFlags & noINFIXOP) 
-      Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString());
+		m_iPos += (int)strTok.length() + 2 + (int)iSkip;  // +2 for quotes; +iSkip for escape characters 
+		m_iSynFlags = noANY ^ (noARG_SEP | noBC | noOPT | noEND);
 
-    m_iSynFlags = noPOSTOP | noINFIXOP | noOPT | noBC | noSTR | noASSIGN; 
-    return true;
-*/
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check whether the token at a given position is a function token.
-      \param a_Tok [out] If a value token is found it will be placed here.
-      \throw ParserException if Syntaxflags do not allow a function at a_iPos
-      \return true if a function token has been found false otherwise.
-      \pre [assert] m_pParser!=0
-  */
-  bool ParserTokenReader::IsFunTok(token_type &a_Tok)
-  {
-    string_type strTok;
-    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);
-    if (iEnd==m_iPos)
-      return false;
-
-    funmap_type::const_iterator item = m_pFunDef->find(strTok);
-    if (item==m_pFunDef->end())
-      return false;
-
-    // Check if the next sign is an opening bracket
-    const char_type *szFormula = m_strFormula.c_str();
-    if (szFormula[iEnd]!='(')
-      return false;
-
-    a_Tok.Set(item->second, strTok);
-
-    m_iPos = (int)iEnd;
-    if (m_iSynFlags & noFUN)
-      Error(ecUNEXPECTED_FUN, m_iPos-(int)a_Tok.GetAsString().length(), a_Tok.GetAsString());
-
-    m_iSynFlags = noANY ^ noBO;
-    return true;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check if a string position contains a binary operator.
-      \param a_Tok  [out] Operator token if one is found. This can either be a binary operator or an infix operator token.
-      \return true if an operator token has been found.
-  */
-  bool ParserTokenReader::IsOprt(token_type &a_Tok)
-  {
-    const char_type *const szExpr = m_strFormula.c_str();
-    string_type strTok;
-
-    int iEnd = ExtractOperatorToken(strTok, m_iPos);
-    if (iEnd==m_iPos)
-      return false;
-
-    // Check if the operator is a built in operator, if so ignore it here
-    const char_type **const pOprtDef = m_pParser->GetOprtDef();
-    for (int i=0; m_pParser->HasBuiltInOprt() && pOprtDef[i]; ++i)
-    {
-      if (string_type(pOprtDef[i])==strTok)
-        return false;
-    }
-
-    // Note:
-    // All tokens in oprt_bin_maptype are have been sorted by their length
-    // Long operators must come first! Otherwise short names (like: "add") that
-    // are part of long token names (like: "add123") will be found instead 
-    // of the long ones.
-    // Length sorting is done with ascending length so we use a reverse iterator here.
-    funmap_type::const_reverse_iterator it = m_pOprtDef->rbegin();
-    for ( ; it!=m_pOprtDef->rend(); ++it)
-    {
-      const string_type &sID = it->first;
-      if ( sID == string_type(szExpr + m_iPos, szExpr + m_iPos + sID.length()) )
-      {
-        a_Tok.Set(it->second, strTok);
-
-        // operator was found
-        if (m_iSynFlags & noOPT) 
-        {
-          // An operator was found but is not expected to occur at
-          // this position of the formula, maybe it is an infix 
-          // operator, not a binary operator. Both operator types
-          // can share characters in their identifiers.
-          if ( IsInfixOpTok(a_Tok) ) 
-            return true;
-          else
-          {
-            // nope, no infix operator
-            return false;
-            //Error(ecUNEXPECTED_OPERATOR, m_iPos, a_Tok.GetAsString()); 
-          }
-
-        }
-
-        m_iPos += (int)sID.length();
-        m_iSynFlags  = noBC | noOPT | noARG_SEP | noPOSTOP | noEND | noASSIGN;
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check if a string position contains a unary post value operator. */
-  bool ParserTokenReader::IsPostOpTok(token_type &a_Tok)
-  {
-    // <ibg 20110629> Do not check for postfix operators if they are not allowed at
-    //                the current expression index.
-    //
-    //  This will fix the bug reported here:  
-    //
-    //  http://sourceforge.net/tracker/index.php?func=detail&aid=3343891&group_id=137191&atid=737979
-    //
-    if (m_iSynFlags & noPOSTOP)
-      return false;
-    // </ibg>
-
-    // Tricky problem with equations like "3m+5":
-    //     m is a postfix operator, + is a valid sign for postfix operators and 
-    //     for binary operators parser detects "m+" as operator string and 
-    //     finds no matching postfix operator.
-    // 
-    // This is a special case so this routine slightly differs from the other
-    // token readers.
-    
-    // Test if there could be a postfix operator
-    string_type sTok;
-    int iEnd = ExtractToken(m_pParser->ValidOprtChars(), sTok, m_iPos);
-    if (iEnd==m_iPos)
-      return false;
-
-    // iterate over all postfix operator strings
-    funmap_type::const_reverse_iterator it = m_pPostOprtDef->rbegin();
-    for ( ; it!=m_pPostOprtDef->rend(); ++it)
-    {
-      if (sTok.find(it->first)!=0)
-        continue;
-
-      a_Tok.Set(it->second, sTok);
-  	  m_iPos += (int)it->first.length();
-
-      m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noSTR | noASSIGN;
-      return true;
-    }
-
-    return false;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check whether the token at a given position is a value token.
-
-    Value tokens are either values or constants.
-
-    \param a_Tok [out] If a value token is found it will be placed here.
-    \return true if a value token has been found.
-  */
-  bool ParserTokenReader::IsValTok(token_type &a_Tok)
-  {
-    assert(m_pConstDef);
-    assert(m_pParser);
-
-    string_type strTok;
-    value_type fVal(0);
-    int iEnd(0);
-    
-    // 2.) Check for user defined constant
-    // Read everything that could be a constant name
-    iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);
-    if (iEnd!=m_iPos)
-    {
-      valmap_type::const_iterator item = m_pConstDef->find(strTok);
-      if (item!=m_pConstDef->end())
-      {
-        m_iPos = iEnd;
-        a_Tok.SetVal(item->second, strTok);
-
-        if (m_iSynFlags & noVAL)
-          Error(ecUNEXPECTED_VAL, m_iPos - (int)strTok.length(), strTok);
-
-        m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN; 
-        return true;
-      }
-    }
-
-    // 3.call the value recognition functions provided by the user
-    // Call user defined value recognition functions
-    std::list<identfun_type>::const_iterator item = m_vIdentFun.begin();
-    for (item = m_vIdentFun.begin(); item!=m_vIdentFun.end(); ++item)
-    {
-      int iStart = m_iPos;
-      if ( (*item)(m_strFormula.c_str() + m_iPos, &m_iPos, &fVal)==1 )
-      {
-        // 2013-11-27 Issue 2:  https://code.google.com/p/muparser/issues/detail?id=2
-        strTok.assign(m_strFormula.c_str(), iStart, m_iPos-iStart);
-
-        if (m_iSynFlags & noVAL)
-          Error(ecUNEXPECTED_VAL, m_iPos - (int)strTok.length(), strTok);
-
-        a_Tok.SetVal(fVal, strTok);
-        m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN;
-        return true;
-      }
-    }
-
-    return false;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Check wheter a token at a given position is a variable token. 
-      \param a_Tok [out] If a variable token has been found it will be placed here.
-	    \return true if a variable token has been found.
-  */
-  bool ParserTokenReader::IsVarTok(token_type &a_Tok)
-  {
-    if (m_pVarDef->empty())
-      return false;
-
-    string_type strTok;
-    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);
-    if (iEnd==m_iPos)
-      return false;
-
-    varmap_type::const_iterator item =  m_pVarDef->find(strTok);
-    if (item==m_pVarDef->end())
-      return false;
-
-    if (m_iSynFlags & noVAR)
-      Error(ecUNEXPECTED_VAR, m_iPos, strTok);
-
-    m_pParser->OnDetectVar(&m_strFormula, m_iPos, iEnd);
-
-    m_iPos = iEnd;
-    a_Tok.SetVar(item->second, strTok);
-    m_UsedVar[item->first] = item->second;  // Add variable to used-var-list
-
-    m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR;
-
-//  Zur Info hier die SynFlags von IsVal():
-//    m_iSynFlags = noVAL | noVAR | noFUN | noBO | noINFIXOP | noSTR | noASSIGN; 
-    return true;
-  }
-
-  //---------------------------------------------------------------------------
-  bool ParserTokenReader::IsStrVarTok(token_type &a_Tok)
-  {
-    if (!m_pStrVarDef || m_pStrVarDef->empty())
-      return false;
-
-    string_type strTok;
-    int iEnd = ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos);
-    if (iEnd==m_iPos)
-      return false;
-
-    strmap_type::const_iterator item =  m_pStrVarDef->find(strTok);
-    if (item==m_pStrVarDef->end())
-      return false;
-
-    if (m_iSynFlags & noSTR)
-      Error(ecUNEXPECTED_VAR, m_iPos, strTok);
-
-    m_iPos = iEnd;
-    if (!m_pParser->m_vStringVarBuf.size())
-      Error(ecINTERNAL_ERROR);
-
-    a_Tok.SetString(m_pParser->m_vStringVarBuf[item->second], m_pParser->m_vStringVarBuf.size() );
-
-    m_iSynFlags = noANY ^ ( noBC | noOPT | noEND | noARG_SEP);
-    return true;
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Check wheter a token at a given position is an undefined variable. 
-
-      \param a_Tok [out] If a variable tom_pParser->m_vStringBufken has been found it will be placed here.
-	    \return true if a variable token has been found.
-      \throw nothrow
-  */
-  bool ParserTokenReader::IsUndefVarTok(token_type &a_Tok)
-  {
-    string_type strTok;
-    int iEnd( ExtractToken(m_pParser->ValidNameChars(), strTok, m_iPos) );
-    if ( iEnd==m_iPos )
-      return false;
-
-    if (m_iSynFlags & noVAR)
-    {
-      // <ibg/> 20061021 added token string strTok instead of a_Tok.GetAsString() as the 
-      //                 token identifier. 
-      // related bug report:
-      // http://sourceforge.net/tracker/index.php?func=detail&aid=1578779&group_id=137191&atid=737979
-      Error(ecUNEXPECTED_VAR, m_iPos - (int)a_Tok.GetAsString().length(), strTok);
-    }
-
-    // If a factory is available implicitely create new variables
-    if (m_pFactory)
-    {
-      value_type *fVar = m_pFactory(strTok.c_str(), m_pFactoryData);
-      a_Tok.SetVar(fVar, strTok );
-
-      // Do not use m_pParser->DefineVar( strTok, fVar );
-      // in order to define the new variable, it will clear the
-      // m_UsedVar array which will kill previously defined variables
-      // from the list
-      // This is safe because the new variable can never override an existing one
-      // because they are checked first!
-      (*m_pVarDef)[strTok] = fVar;
-      m_UsedVar[strTok] = fVar;  // Add variable to used-var-list
-    }
-    else
-    {
-      a_Tok.SetVar((value_type*)&m_fZero, strTok);
-      m_UsedVar[strTok] = 0;  // Add variable to used-var-list
-    }
-
-    m_iPos = iEnd;
-
-    // Call the variable factory in order to let it define a new parser variable
-    m_iSynFlags = noVAL | noVAR | noFUN | noBO | noPOSTOP | noINFIXOP | noSTR;
-    return true;
-  }
-
-
-  //---------------------------------------------------------------------------
-  /** \brief Check wheter a token at a given position is a string.
-      \param a_Tok [out] If a variable token has been found it will be placed here.
-  	  \return true if a string token has been found.
-      \sa IsOprt, IsFunTok, IsStrFunTok, IsValTok, IsVarTok, IsEOF, IsInfixOpTok, IsPostOpTok
-      \throw nothrow
-  */
-  bool ParserTokenReader::IsString(token_type &a_Tok)
-  {
-    if (m_strFormula[m_iPos]!='"') 
-      return false;
-
-    string_type strBuf(&m_strFormula[m_iPos+1]);
-    std::size_t iEnd(0), iSkip(0);
-
-    // parser over escaped '\"' end replace them with '"'
-    for(iEnd=(int)strBuf.find( _T('\"') ); iEnd!=0 && iEnd!=string_type::npos; iEnd=(int)strBuf.find( _T('\"'), iEnd))
-    {
-      if (strBuf[iEnd-1]!='\\') break;
-      strBuf.replace(iEnd-1, 2, _T("\"") );
-      iSkip++;
-    }
-
-    if (iEnd==string_type::npos)
-      Error(ecUNTERMINATED_STRING, m_iPos, _T("\"") );
-
-    string_type strTok(strBuf.begin(), strBuf.begin()+iEnd);
-
-    if (m_iSynFlags & noSTR)
-      Error(ecUNEXPECTED_STR, m_iPos, strTok);
+		return true;
+	}
 
-		m_pParser->m_vStringBuf.push_back(strTok); // Store string in internal buffer
-    a_Tok.SetString(strTok, m_pParser->m_vStringBuf.size());
-
-    m_iPos += (int)strTok.length() + 2 + (int)iSkip;  // +2 for quotes; +iSkip for escape characters 
-    m_iSynFlags = noANY ^ ( noARG_SEP | noBC | noOPT | noEND );
-
-    return true;
-  }
-
-  //---------------------------------------------------------------------------
-  /** \brief Create an error containing the parse error position.
-
-    This function will create an Parser Exception object containing the error text and its position.
-
-    \param a_iErrc [in] The error code of type #EErrorCodes.
-    \param a_iPos [in] The position where the error was detected.
-    \param a_strTok [in] The token string representation associated with the error.
-    \throw ParserException always throws thats the only purpose of this function.
-  */
-  void  ParserTokenReader::Error( EErrorCodes a_iErrc, 
-                                  int a_iPos, 
-                                  const string_type &a_sTok) const
-  {
-    m_pParser->Error(a_iErrc, a_iPos, a_sTok);
-  }
-
-  //---------------------------------------------------------------------------
-  void ParserTokenReader::SetArgSep(char_type cArgSep)
-  {
-    m_cArgSep = cArgSep;
-  }
-
-  //---------------------------------------------------------------------------
-  char_type ParserTokenReader::GetArgSep() const
-  {
-    return m_cArgSep;
-  }
+
+	/** \brief Create an error containing the parse error position.
+
+	  This function will create an Parser Exception object containing the error text and its position.
+
+	  \param a_iErrc [in] The error code of type #EErrorCodes.
+	  \param a_iPos [in] The position where the error was detected.
+	  \param a_strTok [in] The token string representation associated with the error.
+	  \throw ParserException always throws thats the only purpose of this function.
+	*/
+	void  ParserTokenReader::Error(EErrorCodes a_iErrc,	int a_iPos,	const string_type& a_sTok) const
+	{
+		m_pParser->Error(a_iErrc, a_iPos, a_sTok);
+	}
+
+
+	void ParserTokenReader::SetArgSep(char_type cArgSep)
+	{
+		m_cArgSep = cArgSep;
+	}
+
+
+	char_type ParserTokenReader::GetArgSep() const
+	{
+		return m_cArgSep;
+	}
 } // namespace mu
 
+#if defined(_MSC_VER)
+	#pragma warning(pop)
+#endif
diff --git a/test/t_ParserTest.cpp b/test/t_ParserTest.cpp
new file mode 100644
index 0000000..9d0463a
--- /dev/null
+++ b/test/t_ParserTest.cpp
@@ -0,0 +1,9 @@
+#include "muParserTest.h"
+
+using namespace mu::Test;
+
+int main(int, char**)
+{
+  ParserTester tester;
+  return tester.Run();
+}

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/7e/994321a8bfe86d527ef42993cfc5c0b5c7eaac.debug
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/cmake/muparser/muparser-targets-none.cmake
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/cmake/muparser/muparser-targets.cmake
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/cmake/muparser/muparserConfig.cmake
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/cmake/muparser/muparserConfigVersion.cmake
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/libmuparser.so.2.3.3
lrwxrwxrwx  root/root   /usr/lib/x86_64-linux-gnu/libmuparser.so.2 -> libmuparser.so.2.3.3

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/include/muParserStack.h
-rw-r--r--  root/root   /usr/lib/debug/.build-id/9b/b7fad9ddc5537595605d9e3e45f3c036e7b56e.debug
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/libmuparser.so.2.2.6
lrwxrwxrwx  root/root   /usr/lib/x86_64-linux-gnu/libmuparser.so.2 -> libmuparser.so.2.2.6

Control files of package libmuparser-dev: lines which differ (wdiff format)

  • Homepage: http://muparser.sourceforge.net https://beltoforion.de/en/muparser/

Control files of package libmuparser2v5: lines which differ (wdiff format)

  • Depends: libc6 (>= 2.32), libgcc-s1 (>= 3.0), libgomp1 (>= 4.9), libstdc++6 (>= 11)
  • Homepage: http://muparser.sourceforge.net https://beltoforion.de/en/muparser/

Control files of package libmuparser2v5-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 9bb7fad9ddc5537595605d9e3e45f3c036e7b56e 7e994321a8bfe86d527ef42993cfc5c0b5c7eaac

Run locally

More details

Full run details