ridiculousfish
eeff32cde7
Disable MUPARSER_ATTR_WARN_UNUSED_RESULT on gcc
...
Fixes a warning when building with gcc.
2017-12-22 13:45:27 -08:00
ridiculousfish
873ea0f0df
[muparser] Remove OnDetectVar and Diff
...
These are unused and useless.
2017-12-18 23:01:18 -08:00
ridiculousfish
2c317a2585
[muparser] Remove muParserFixes.h
...
This appears to be random pragmas for ICC only.
2017-12-18 23:01:18 -08:00
ridiculousfish
886341fdea
[muparser] Remove ParserCallback m_bAllowOpti flag
...
muParser can no longer optimize, so this is unused.
2017-12-18 23:01:18 -08:00
ridiculousfish
e728bf45de
[muparser] Remove m_strFormula from the ParserError
2017-12-18 23:01:18 -08:00
ridiculousfish
409173e0f0
[muparser] Default ParserError's constructors
...
No need to define these explicitly when the defaults will do.
2017-12-18 23:01:18 -08:00
ridiculousfish
e9c106b881
[muparser] Delete ParserByteCode copy and assignment ctors
...
These are not used.
2017-12-18 23:01:18 -08:00
ridiculousfish
8b0d2ff641
[muparser] Remove muParserTemplateMagic.h
...
This header is now empty
2017-12-18 23:01:18 -08:00
ridiculousfish
1f456c71f7
[muparser] Remove MathImpl
...
This layer of indirection is silly.
2017-12-18 23:01:18 -08:00
ridiculousfish
f0de6e0852
[muparser] Remove struct TypeInfo
...
The STL's facilities are totally sufficient here.
2017-12-18 23:01:18 -08:00
ridiculousfish
fd60a7cff7
[muparser] Remove unused fields from SToken
2017-12-18 23:01:17 -08:00
ridiculousfish
732b32c8b4
[muparser] Clean up constructors and other miscellaneous
2017-12-18 23:01:17 -08:00
ridiculousfish
e675a66504
[muparser] Remove some unused "optimized" opcodes
2017-12-18 23:01:17 -08:00
ridiculousfish
3f21fb64de
[muparser] Remove additional unused functions
2017-12-18 23:01:17 -08:00
ridiculousfish
ab95f94048
[muparser] Remove m_nIfElseCounter instance variable
...
No idea why this isn't just a local.
2017-12-18 23:01:17 -08:00
ridiculousfish
4452d9ce18
[muparser] Remove m_pParseFormula function pointer
...
This is a very strange design that determines whether initialization
needs to be performed by reassigning a function pointer. A misguided
optimization? Just check explicitly.
2017-12-18 23:01:17 -08:00
ridiculousfish
3ed9c851a3
[muparser] Remove some OpenMP / "bulk mode" detritus
2017-12-18 23:01:17 -08:00
ridiculousfish
fdefabdb1d
[muparser] Remove fun_type overloads that have four or more parameters
...
Supporting these is rather excessive.
2017-12-18 23:01:17 -08:00
ridiculousfish
bb9e15675e
[muparser] Remove muParserDLL.h and muParserDLL.cpp
...
This is a C interface (?) which fish does not use and is not needed.
2017-12-18 23:01:17 -08:00
ridiculousfish
554382a286
[muparser] Remove 'AllowOpt' parameters
...
This parameter was used as a hint to optimize functions invoked
with constants, but is no longer used.
2017-12-18 23:01:17 -08:00
ridiculousfish
5d2cf3f666
[muparser] Remove getOrThrow()
...
This is no longer used or needed
2017-12-18 23:01:16 -08:00
ridiculousfish
11d729d09c
[muparser] DefineFun() to return an error instead of throwing
2017-12-18 23:01:16 -08:00
ridiculousfish
6f14d55612
[muparser] Convert more exception handling into explicit errors
2017-12-18 23:01:16 -08:00
ridiculousfish
0be08e4683
[muparser] DefinePostfixOprt and DefineInfixOprt to return errors
...
Return errors explicitly instead of throwing.
2017-12-18 23:01:16 -08:00
ridiculousfish
62bedde23d
[muparser] Clean up error handling in ParserTokenReader
2017-12-18 23:01:16 -08:00
ridiculousfish
91c28449aa
[muparser] Parser mathematical functions to return errors instead of throw
...
Remove exceptions from Parser functions such as sqrt, min, and others.
2017-12-18 23:01:16 -08:00
ridiculousfish
3faccc8b3e
[muparser] Remove querying variables and constants
...
fish does not need to query variables and constants from muparser.
This simplifies the code.
2017-12-18 23:01:16 -08:00
ridiculousfish
234808bc32
[muparser] ApplyRemainingOprt to return explicit errors
2017-12-18 23:01:16 -08:00
ridiculousfish
60d9c9fa00
[muparser] More functions to return errors
...
Return OptionalError for more functions, allowing for explicit error
handling.
2017-12-18 23:01:16 -08:00
ridiculousfish
d97bb3425f
[muparser] Clean up ParserTokenReader constructor
2017-12-18 23:01:16 -08:00
ridiculousfish
83799832bc
[muparser] Make ParserTokenReader non-copyable
...
There's no reason to copy these.
2017-12-18 23:01:16 -08:00
ridiculousfish
3b1b5b30ca
[muparser] Clean up ParserToken::GetFuncAddr
2017-12-18 23:01:16 -08:00
ridiculousfish
c4c89dff4e
[muparser] Clean up ParserCallback interface
...
Remove Clone() method and mark some functions as defaulted.
2017-12-18 23:01:15 -08:00
ridiculousfish
9443a4bf2d
[muparser] Remove copy and assignment
...
There is no reason for muParsers to be copyable or assignable.
Also remove some dead code and switch an auto_ptr to unique_ptr.
2017-12-18 23:01:15 -08:00
ridiculousfish
65f4963542
[muparser] Eliminate MUP_FAIL and MUP_ASSERT
...
Replace MUP_ASSERT with assert(). MUP_FAIL was unused.
2017-12-18 23:01:15 -08:00
ridiculousfish
f05b55c84c
[muparser] Remove \throw nothrow comments
...
Soon it will all be nothrow!
2017-12-18 23:01:15 -08:00
ridiculousfish
9649b132bd
[muparser] Continue adopting ValueOrError
2017-12-18 23:01:15 -08:00
ridiculousfish
bfd70880a5
[muparser] Begin adopting ValueOrError
...
Switch custom function types to return ValueOrError, which will
enable us to remove exceptions.
2017-12-18 23:01:15 -08:00
ridiculousfish
5655f255ef
[muparser] Add a muParser ValueOrError type
...
First steps towards removing exceptions from muParser.
2017-12-18 23:01:15 -08:00
ridiculousfish
a7f6105497
[muparser] Remove the optimizer
...
The optimizer adds a fair amount of complexity in muparser with no
benefit to fish, since fish is not going to use complicated expressions
or cache parsed expressions.
2017-12-18 23:01:15 -08:00
ridiculousfish
85334432ed
[muparser] Remove cmFUNC_BULK
...
fish does not need bulk functions, which are used to enable parallel
computations.
2017-12-18 23:01:15 -08:00
ridiculousfish
38a2e0218d
[muparser] Remove muParserError.h
...
To help remove exception handling, we will need to have a type that
has visibility into both ParserError and value_type. We're going to
put this type in muParserDef.h. Remove the error header and fold its
contents into muParserDef.h.
2017-12-18 11:58:14 -08:00
ridiculousfish
5f7f1102db
[muparser] Remove ParserErrorMsg
...
This was a class to "manage" error messages. Remove it and replace
it with a function.
2017-12-18 11:58:14 -08:00
ridiculousfish
cad9bbd2a2
[muparser] Remove muParserStack.h
...
This was a silly data structure that didn't carry its weight.
Replace it with a wrapper around std::vector that doesn't explicitly
throw exceptions. It's unclear if muparser relied on the exception
throwing behavior of ParserStack, and it seems there's no way to find
out except removing it and seeing what breaks.
The tests pass for what that's worth!
2017-12-18 11:58:13 -08:00
ridiculousfish
e2b798cda3
[muparser] Restyle muparser sources to match fish
...
Add muparser soruces to style.fish, and run it to make muparser
match fish style guidelines.
2017-12-18 11:58:13 -08:00
ridiculousfish
8364e59709
[muparser] Remove MUP_USE_OPENMP
...
We are not using OpenMP in the fish shell.
2017-12-18 11:58:13 -08:00
ridiculousfish
483930946b
[muParser] Remove ecINTERNAL_ERROR
...
Internal errors should not be represented as exceptions, but
instead as assertion failures.
2017-12-18 11:58:13 -08:00
David Adam
86b1c5a5a4
Update MuParser source
...
Drop build system artefacts and move to versioned directory.
Tarball from
https://github.com/beltoforion/muparser/archive/v2.2.5.tar.gz with
samples/example2 directory removed.
2017-08-25 07:54:40 +08:00