diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -49,6 +49,30 @@ [Maven Central](https://search.maven.org/search?q=a:%22EvalEx%22).\ You will find there also copy/paste templates for including EvalEx in your project with build systems like Maven or Gradle. +### Maven + +To include it in your Maven project, add the dependency to your pom. For example: + +```xml + + + com.ezylang + EvalEx + 3.0.1 + + +``` + +### Gradle + +If you're using gradle add the dependencies to your project's app build.gradle: + +```gradle +dependencies { + compile 'com.ezylang:EvalEx:3.0.1' +} +``` + ## Examples ### A simple example, that shows how it works in general: @@ -139,6 +163,14 @@ BigDecimal result = expression.evaluate().getNumberValue(); System.out.println(result); // prints 44.85 ``` + +## EvalEx-big-math + +[Big-math](https://github.com/eobermuhlner/big-math) is a library by Eric Obermühlner. It provides +advanced Java BigDecimal math functions using an arbitrary precision. + +[EvalEx-big-math](https://github.com/ezylang/EvalEx-big-math) adds the advanced math functions from +big-math to EvalEx. ## Author and License diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,7 @@ +_site +.sass-cache +.jekyll-cache +.jekyll-metadata +vendor +Gemfile +Gemfile.lock diff --git a/docs/README.md b/docs/README.md --- a/docs/README.md +++ b/docs/README.md @@ -17,3 +17,12 @@ ## Using _JustTheDocs_ template: https://just-the-docs.github.io/just-the-docs/ + +## Install Jekyll locally (for testing the site locally) + +https://jekyllrb.com/docs/installation/ + +## Testing locally + +https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll + diff --git a/docs/_config.yml b/docs/_config.yml --- a/docs/_config.yml +++ b/docs/_config.yml @@ -2,9 +2,9 @@ remote_theme: just-the-docs/just-the-docs title: EvalEx Documentation aux_links: "View on GitHub": - - "//github.com/ezylang/EvalEx" + - "https://github.com/ezylang/EvalEx" "Download from Maven Central": - - "//search.maven.org/search?q=a:%22EvalEx%22" + - "https://search.maven.org/search?q=a:%22EvalEx%22" "Release Notes": - - "//github.com/ezylang/EvalEx/releases" + - "https://github.com/ezylang/EvalEx/releases" footer_content: "Copyright © 2012-2022 Udo Klimaschewski" diff --git a/docs/concepts/changes.md b/docs/concepts/changes.md --- a/docs/concepts/changes.md +++ b/docs/concepts/changes.md @@ -106,7 +106,7 @@ Adding custom operators is now easier, but has changed significantly. See chapter [Custom Operators](../customization/custom_operators.html) for details. -### Custom function +### Custom functions Adding custom functions is now easier, but has changed significantly. See chapter [Custom Functions](../customization/custom_functions.html) for details. diff --git a/docs/index.md b/docs/index.md --- a/docs/index.md +++ b/docs/index.md @@ -9,7 +9,9 @@ EvalEx is a handy expression evaluator for Java, that allows to parse and evaluate expression strings. -_Version 3 of EvalEx is a complete rewrite of the popular expression evaluator. See [Major Changes](https://ezylang.github.io/EvalEx/concepts/changes.html) for an overview of the changes._ +_Version 3 of EvalEx is a complete rewrite of the popular expression evaluator. +See [Major Changes](https://ezylang.github.io/EvalEx/concepts/changes.html) for an overview of the +changes._ ## Key Features: @@ -28,6 +30,42 @@ - Supports hexadecimal and scientific notations of numbers. - Supports implicit multiplication, e.g. (a+b)(a-b) or 2(x-y) which equals to (a+b)\*(a-b) or 2\*( x-y) - Lazy evaluation of function parameters (see the IF function) and support of sub-expressions. + +## Discussion + +For announcements, questions and ideas visit +the [Discussions area](https://github.com/ezylang/EvalEx/discussions). + +## Download / Including + +You can download the binaries, source code and JavaDoc jars from +[Maven Central](https://search.maven.org/search?q=a:%22EvalEx%22).\ +You will find there also copy/paste templates for including EvalEx in your project with build +systems like Maven or Gradle. + +### Maven + +To include it in your Maven project, add the dependency to your pom. For example: + +```xml + + + com.ezylang + EvalEx + 3.0.1 + + +``` + +### Gradle + +If you're using gradle add the dependencies to your project's app build.gradle: + +```gradle +dependencies { + compile 'com.ezylang:EvalEx:3.0.1' +} +``` ## Examples @@ -114,6 +152,14 @@ BigDecimal result = expression.evaluate().getNumberValue(); System.out.println(result); // prints 44.85 ``` + +## EvalEx-big-math + +[Big-math](https://github.com/eobermuhlner/big-math) is a library by Eric Obermühlner. It provides +advanced Java BigDecimal math functions using an arbitrary precision. + +[EvalEx-big-math](https://github.com/ezylang/EvalEx-big-math) adds the advanced math functions from +big-math to EvalEx. ## Author and License diff --git a/docs/references/operators.md b/docs/references/operators.md --- a/docs/references/operators.md +++ b/docs/references/operators.md @@ -11,7 +11,7 @@ Available through the _ExpressionConfiguration.StandardOperatorsDictionary_ constant: ### Arithmetic operators -| Name | Value | +| Name | Description | |------|-----------------------------------------| | - | The prefix minus operator, like in "-2" | | + | The prefix minus operator, like in "+2" | @@ -24,7 +24,7 @@ | % | The modulo operator (remainder) | ### Boolean operators -| Name | Value | +| Name | Description | |--------------|-------------------------------------| | =, == | The equals operator | | !=, <> | The not equals operator | diff --git a/pom.xml b/pom.xml --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.ezylang EvalEx - 3.0.1-SNAPSHOT + 3.0.1 EvalEx @@ -94,7 +94,7 @@ org.mockito mockito-core - 4.6.1 + 4.8.0 test