Commit graph

26 commits

Author SHA1 Message Date
Bruce Wells
5bdc27efdb Fixed function in () block issue 2018-11-26 10:01:01 -05:00
Bruce Wells
f0d4562b9e Division By Zero Exception support
Updated the documentation.
Unit tests for strings.
DivisionByZeroException support.
2018-10-31 09:35:40 -04:00
Bruce Wells
334dd26e3c Removing DivisionByZeroException testing for now
Added more unit tests.
2018-10-25 11:43:57 -04:00
Bruce Wells
b9f72a001b Additional validation for bad expressions (*+ for example) 2018-10-24 16:01:01 -04:00
Bruce Wells
2722a5201d
Fixed merge error 2018-09-12 13:02:03 -04:00
Bruce Wells
7a36e07736
Merge branch 'master' into support_for_double_quoted_strings 2018-09-12 12:36:15 -04:00
Bruce Wells
00def17f0e Support for double quoted strings
Changed array() to [] syntax.
Added variable in question to unknown variable exception.
Added getVar and getVars accessor functions.
Added getOperators and getFunctions accessor functions for completeness.
Extended all Exceptions off MathExecutorException.
2018-09-12 12:33:17 -04:00
Alexander Kiryukhin
7b657db13f
Merge branch 'master' into dev 2018-09-06 20:41:13 +03:00
Alexander Kiryukhin
3011a1c556
Merge branch 'master' into getters_for_function_and_operators 2018-09-06 20:39:47 +03:00
Bruce Wells
7db873a636 Added variable type to diagnostic message 2018-09-05 18:17:05 -04:00
Bruce Wells
29d32a155f Add ability to get functions and operators that have been registered 2018-08-31 12:22:58 -04:00
Bruce Wells
af2436d7cc Exception Messages
Basically the token that is causing the exception for better diagnostics.
2018-08-27 17:47:28 -04:00
Alexander Kiryukhin
855ca5dfc1 Merge pull request #16 from Deisss/master
Removing the numeric test on setVar.
2017-09-12 15:33:11 +03:00
ochi51
8d602b30dd Fixes exponentiation operator 2017-09-12 20:54:51 +09:00
ochi51
1086fccc92 Bug fixes about "Undefined offset -1" if stack is empty array and token association is RIGHT_ASSOC 2017-09-12 20:47:22 +09:00
charles VILLETTE
9e0c01722f Removing the numeric test on setVar. 2016-07-07 14:36:01 +02:00
bajb
9acdc3bb57 Specifically check for 0 in division to allow for negative operations 2016-04-01 14:52:34 +01:00
bajb
5d19d0660c Avoid division by zero 2016-04-01 14:29:41 +01:00
NeonXP
4b092895bc ~ remove callable for PHP 5.3 2013-09-18 20:27:46 +04:00
Anton Stöckl
31f4bc044d Make TokenNumber aware of scientific notation
Update the regex so scientific notation numbers work, e.g.:
'1 + 3.5E-8'
'1 + 3.5E8'
2013-09-06 10:05:10 +02:00
NeonXP
46173b180f ~ Fix PHP 5.3 compatibility 2013-09-06 08:23:58 +04:00
NeonXP
5ce6a3ca43 ~ Fix PHP 5.3 compatibility 2013-09-06 08:21:31 +04:00
NeonXP
9cef8dbc79 + Added cache, which speeds up the repetitive calculations
+ Returned variables, because they need for cached expressions
2013-09-06 08:19:02 +04:00
NeonXP
4b08ec4b4d ~ PHP CS fixer 2013-09-06 05:43:22 +04:00
NeonXP
9cdc34290a Mass refactoring
Some changes:
+ Added support of functions with multiple arguments
+ Added some default function (min, max, avg). just example of multiple arguments :)
- Removed variables support (I think they pointless)
~ All tokens now in individual classes
~ Parsing based on regular expressions
~ Fix negative numbers
~ Fix grouping with brackets
2013-09-06 05:42:09 +04:00
zhukv
eb9c365161 Fix to PSR standart, fix tokenizer, fix function executor. 2013-08-03 13:47:47 +03:00