Commit graph

159 commits

Author SHA1 Message Date
Bruce Wells
aa12a41b1b
Division By Zero Exception support
Updated the documentation.
Unit tests for strings.
Added more unit tests.
DivisionByZeroException support.
2018-10-31 10:03:55 -04:00
Bruce Wells
72aaf58e55
Updated from NeonXP/MathExecutor 2018-10-31 09:57:27 -04:00
Bruce Wells
07d02e1fb0
Merge branch 'master' into master 2018-10-31 09:51:19 -04: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
43f0ff3f28
Support for better invalid expression detection and divide by zero (#30)
* Additional validation for bad expressions (*+ for example)

* Removing DivisionByZeroException testing for now

Added more unit tests.
2018-10-25 11:54:54 -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
12d41b160b
Merge pull request #1 from NeonXP/master
Merge from upstream master
2018-09-12 14:21:25 -04:00
Alexander Kiryukhin
4a672cfd94
Merge pull request #28 from phpfui/support_for_double_quoted_strings
Support for double quoted strings
2018-09-12 20:05:09 +03: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
76d1b4b8f0
Update .travis.yml 2018-09-06 21:12:54 +03:00
Alexander Kiryukhin
2a629d37dd
Merge pull request #27 from NeonXP/dev
Dev
2018-09-06 20:41:20 +03:00
Alexander Kiryukhin
7b657db13f
Merge branch 'master' into dev 2018-09-06 20:41:13 +03:00
Alexander Kiryukhin
aa1a092a9e
Merge pull request #26 from phpfui/getters_for_function_and_operators
Getters for function and operators
2018-09-06 20:39:56 +03:00
Alexander Kiryukhin
3011a1c556
Merge branch 'master' into getters_for_function_and_operators 2018-09-06 20:39:47 +03:00
Alexander Kiryukhin
a969571772
Merge pull request #25 from phpfui/Exception_messages
Exception Messages
2018-09-06 20:37:48 +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
Alexander Kiryukhin
3cd949c04f Merge pull request #20 from ochi51/master
Fixes exponentiation operator
2017-09-12 15:32:08 +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
Alexander Kiryukhin
3436e0a51f Update composer.json 2017-03-10 15:29:42 +03:00
charles VILLETTE
9e0c01722f Removing the numeric test on setVar. 2016-07-07 14:36:01 +02:00
Alexander Kiryukhin
fa935b0af6 + Test for division by zero 2016-04-01 17:25:29 +03:00
NeonXP
fd7a113b95 Merge pull request #13 from bajb/master
Avoid division by zero
2016-04-01 18:06:45 +04: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
Alexander Kiryukhin
e28fb4d7aa Merge pull request #12 from waffle-iron/master
waffle.io Badge
2015-09-29 15:52:35 +03:00
Making GitHub Delicious.
e0eb2d9586 add waffle.io badge 2015-09-29 06:42:26 -06:00
NeonXP
b04cf54aa3 Merge branch 'dev' of github.com:NeonXP/MathExecutor into dev 2013-09-18 20:35:19 +04:00
NeonXP
0b7e6b1b86 + added test for custom user functions 2013-09-18 20:34:51 +04:00
NeonXP
4b092895bc ~ remove callable for PHP 5.3 2013-09-18 20:27:46 +04:00
Alexander Kiryukhin
ec9e067421 Update README.md 2013-09-06 17:33:47 +04:00
NeonXP
e3bac0c101 ~Change readme 2013-09-06 17:30:48 +04:00
NeonXP
abc629a10b + Tests for scientific notation by AntonStoeckl 2013-09-06 16:43:45 +04:00
Alexander Kiryukhin
a0f031dc23 Merge pull request #6 from AntonStoeckl/master
Make TokenNumber aware of scientific notation
2013-09-06 05:39:10 -07: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
Alexander Kiryukhin
10c04a966f Update README.md 2013-09-06 08:35:55 +04:00
Alexander Kiryukhin
591b8b61c9 Update README.md 2013-09-06 08:32:03 +04:00
Alexander Kiryukhin
74cb31c8be Update README.md 2013-09-06 08:26:53 +04: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
Alexander Kiryukhin
f172123a0d Merge pull request #3 from ZhukV/master
Fix to PSR standart, fix tokenizer, fix function executor.
2013-08-03 04:15:02 -07:00