https://github.com/fathzer/javaluator
A java infix evaluator based on "Shunting Yard" algorithm.
https://github.com/fathzer/javaluator
evaluate-expressions java-library
Last synced: 6 months ago
JSON representation
A java infix evaluator based on "Shunting Yard" algorithm.
- Host: GitHub
- URL: https://github.com/fathzer/javaluator
- Owner: fathzer
- License: apache-2.0
- Created: 2019-08-16T17:12:22.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-05-30T17:56:37.000Z (about 1 year ago)
- Last Synced: 2025-08-03T16:46:38.555Z (11 months ago)
- Topics: evaluate-expressions, java-library
- Language: Java
- Homepage: http://javaluator.fathzer.com
- Size: 1.27 MB
- Stars: 36
- Watchers: 2
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Javaluator
[](https://javadoc.io/doc/com.fathzer/javaluator) [](https://maven-badges.herokuapp.com/maven-central/com.fathzer/javaluator) [](https://sonarcloud.io/dashboard?id=fathzer_javaluator)
A java infix evaluator based on "Shunting Yard" algorithm.
Evaluate an arithmetic expression is as simple as:
```
Double result = new DoubleEvaluator().evaluate("(e^3-1)*sin(pi/4)*ln(pi^2)").
```
But Javaluator provides you with much more ...
Key features:
- Functions support, including variable argument count.
- Constants support: e, pi, etc ...
- Variables support: Example sin(x) for x = pi/4.
- Highly configurable: Reduce the built-in operator or function sets, define your own brackets.
- Extensible: Define your own grammar, or extends the existing one.
- Localizable: Define localized names for functions or constants.
- Syntax check
- Small footprint: 26kB, no additional library required.
- Fully documented
Please visit the project's web site to learn more: https://javaluator.fathzer.com
If you use Javaluator in your product, we will be happy to add a link to your product in the Javaluator's web site.