aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* PHP 7.4 supportBruce Wells2019-12-014-7/+6
|
* Update README.md and more function supportBruce Wells2019-11-274-28/+202
|
* Merge branch 'master' of https://github.com/neonxp/MathExecutorBruce Wells2019-11-2718-13/+526
|\ | | | | | | | | | | # Conflicts: # .gitignore # tests/MathTest.php
| * TokenFactory: allowing multicharacter tokens (#49)franksl2019-11-260-0/+0
| |
| * Logicandcompare (#50)franksl2019-11-2617-13/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TokenFactory: allowing multicharacter tokens * Added logical and compare operators: <, <=, >, >=, ==, !=, ||, && * Fixed operator priorities * Error messages fixes * Fixed operators priority The priorities are assigned by following the php language standard (https://www.php.net/manual/en/language.operators.precedence.php) I've assigned precedence in steps of 10 units by following the linked page: 230 clone new 220 ** 210 ++ -- ~ (int) (float) (string) (array) (object) (bool) @ 200 instanceof 190 ! 180 * / % 170 + - . 160 << >> 150 < <= > >= 140 == != === !== <> <=> 130 & 120 ^ 110 | 100 && 90 || 80 ?? 70 ? : 60 = += -= *= **= /= .= %= &= |= ^= <<= >>= 50 yield from 40 yield 30 and 20 xor 10 or * Added if() function * Cache key fix There are cases where the cache key creation raised an error, for example while evaluating the expression "if(cos(2), cos(2), 0)", because the if() function was passing a float to the MathExecutor:execute() method.
| * Upgrading to PHP 7.1 (#48)V1.0.0Bruce Wells2019-10-313-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Subtraction fix (#46) (#7) * Updated unit tests * Fixed docs * Better unary minus support * Subtraction fix (#46) (#8) * Updated unit tests * Fixed docs * Better unary minus support * Upgrading PHPUnit and dropping support for 5.6 and 7.0
| * Subtraction fix (#46)v0.8.0Bruce Wells2019-08-165-7/+50
| | | | | | | | | | * Updated unit tests * Fixed docs * Better unary minus support
| * Merge pull request #44 from phpfui/masterv0.7.2Alexander Kiryukhin2019-01-165-26/+70
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed comma operator Added unit tests for expressions in function arguments. Changed array_push to $var[] = native code. * Fixed merge error * Fixed typo in constant
* | \ Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-10-314-10/+3
|\ \ \
| * | | Upgrading PHPUnit and dropping support for 5.6 and 7.0Bruce Wells2019-10-314-10/+3
| | | |
| * | | Subtraction fix (#46) (#8)Bruce Wells2019-10-310-0/+0
| | | | | | | | | | | | | | | | | | | | * Updated unit tests * Fixed docs * Better unary minus support
* | | | Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-08-165-6/+39
|\| | |
| * | | Subtraction fix (#46) (#7)Bruce Wells2019-08-165-7/+50
| | |/ | |/| | | | | | | | | | * Updated unit tests * Fixed docs * Better unary minus support
* | | Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-08-167-34/+86
|\| | | | | | | | | | | | | | # Conflicts: # src/NXP/Classes/Token/TokenFunction.php
| * | Fixed typo in constantBruce Wells2019-01-161-1/+1
| | |
| * | Fixed merge errorBruce Wells2019-01-161-14/+1
| | |
| * | Merge branch 'master' into masterBruce Wells2019-01-161-0/+9
| |\|
| | * Update code-of-conduct.ru.mdAlexander Kiryukhin2019-01-121-0/+1
| | |
| | * Create code-of-conduct.ru.mdAlexander Kiryukhin2019-01-121-0/+4
| | |
| | * Fixed function parameter order (#42)v0.7.1Bruce Wells2019-01-125-27/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed parsing for () * sync (#5) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * Fix md typo (#39) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Syncing to origin (#4) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * \\ instead of \ * Update README.md Some small fixes * Fix single quotes parsing (#41) * Fix single quotes parsing Fix e-mails Some small fixes * Mistake in test * More PHP versions * Update README.md Deleted `dev` branch * Fixed function parameter order Corrected $places default value for addFunction to match TokenFactory Added function order test and put expected order first in assertEquals If else blocks in calculator Updated docs
| * | Fixed comma operatorBruce Wells2019-01-165-30/+74
| | | | | | | | | | | | | | | Added unit tests for expressions in function arguments. Changed array_push to $var[] = native code.
| * | Fixed function parameter orderBruce Wells2019-01-161-8/+12
| | | | | | | | | | | | | | | | | | | | | Corrected $places default value for addFunction to match TokenFactory Added function order test and put expected order first in assertEquals If else blocks in calculator Updated docs
| * | sync (#6)Bruce Wells2019-01-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed function parameter order (#42) * Fixed parsing for () * sync (#5) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * Fix md typo (#39) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Syncing to origin (#4) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * \\ instead of \ * Update README.md Some small fixes * Fix single quotes parsing (#41) * Fix single quotes parsing Fix e-mails Some small fixes * Mistake in test * More PHP versions * Update README.md Deleted `dev` branch * Fixed function parameter order Corrected $places default value for addFunction to match TokenFactory Added function order test and put expected order first in assertEquals If else blocks in calculator Updated docs * Create code-of-conduct.ru.md * Update code-of-conduct.ru.md
| * | Merge branch 'master' into masterBruce Wells2019-01-121-3/+2
| |\|
| | * Merge branch 'master' into masterBruce Wells2019-01-111-1/+1
| | |\
| | * | Update README.mdAlexander Kiryukhin2019-01-111-6/+0
| | | | | | | | | | | | Deleted `dev` branch
| | * | Fix single quotes parsing (#41)Alexander Kiryukhin2019-01-1126-178/+231
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix single quotes parsing Fix e-mails Some small fixes * Mistake in test * More PHP versions
| | * | Update README.mdAlexander Kiryukhin2019-01-111-2/+2
| | | | | | | | | | | | Some small fixes
| | * | Fix md typo (#39)Bruce Wells2019-01-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Syncing to origin (#4) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * \\ instead of \
| | * | Replaceable operators (#38)v0.7Bruce Wells2019-01-102-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression
| | * | Added simple coc (#37)Alexander Kiryukhin2019-01-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | * Added simple coc * Fix
| | * | MathExecutor allow override default operators, functions and vars (#36)Timur2019-01-102-32/+78
| | | |
| | * | Documentation fixes (#34)Bruce Wells2018-12-201-6/+6
| | | | | | | | | | | | | | | | Fixing typos in and clarifying documentation.
| * | | Fixed function parameter orderBruce Wells2019-01-125-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrected $places default value for addFunction to match TokenFactory Added function order test and put expected order first in assertEquals If else blocks in calculator Updated docs
| * | | Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-01-1228-127/+239
| |\ \ \ | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/NXP/Classes/Lexer.php
| * \ \ \ Merge branch 'master' of https://github.com/phpfui/MathExecutorBruce Wells2019-01-092-8/+23
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # src/NXP/Classes/Lexer.php
| * | | | | Fixed parsing for ()Bruce Wells2018-11-231-31/+34
| | | | | |
* | | | | | Fixed function argument ordering and default parameter type for addFunctionBruce Wells2019-01-114-6/+14
| |_|/ / / |/| | | | | | | | | | | | | | | | | | | Updated unit tests Fixed docs
* | | | | sync (#5)Bruce Wells2019-01-1127-187/+233
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * Fix md typo (#39) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Syncing to origin (#4) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression * \\ instead of \ * Update README.md Some small fixes * Fix single quotes parsing (#41) * Fix single quotes parsing Fix e-mails Some small fixes * Mistake in test * More PHP versions * Update README.md Deleted `dev` branch
* | | | Syncing to origin (#4)Bruce Wells2019-01-103-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Added simple coc (#37) * Added simple coc * Fix * Replaceable operators (#38) * Updated from NeonXP/MathExecutor * Fixed function in () block issue * Fixing typos in and clarifying documentation. * Syncing from origin (#3) * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36) * Allow for operators to be replaced based on regex expression
* | | | Syncing from origin (#3)Bruce Wells2019-01-102-32/+78
| |/ / |/| | | | | | | | | | | | | | | | | | | | * Documentation fixes (#34) Fixing typos in and clarifying documentation. * MathExecutor allow override default operators, functions and vars (#36)
* | | Merge branch 'master' into masterBruce Wells2018-12-190-0/+0
|\ \ \ | | |/ | |/|
| * | Fixed Lexor to correctly generate reverse polish notation (#33)v0.6Bruce Wells2018-11-263-133/+151
| | | | | | | | | | | | | | | | | | * Updated from NeonXP/MathExecutor * Fixed function in () block issue
| * | Division By Zero Exception supportv0.5Bruce Wells2018-10-310-0/+0
| | | | | | | | | | | | | | | | | | Updated the documentation. Unit tests for strings. Added more unit tests. DivisionByZeroException support.
| * | Merge branch 'master' into masterBruce Wells2018-10-316-49/+167
| |\ \
| * | | Support for better invalid expression detection and divide by zero (#30)Bruce Wells2018-10-258-4/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Additional validation for bad expressions (*+ for example) * Removing DivisionByZeroException testing for now Added more unit tests.
* | | | Fixing typos in and clarifying documentation.Bruce Wells2018-12-191-6/+6
| | | |
* | | | Fixed function in () block issueBruce Wells2018-11-263-133/+151
| |_|/ |/| |
* | | Updated from NeonXP/MathExecutorBruce Wells2018-10-310-0/+0
| |/ |/|
* | Division By Zero Exception supportBruce Wells2018-10-316-49/+167
| | | | | | | | | | | | Updated the documentation. Unit tests for strings. DivisionByZeroException support.