Jep 3.2 - Java Expression Parser
JEP is a Java library for parsing and evaluating mathematical expressions. With this package you can allow your users to enter an arbitrary formula as a string, and instantly evaluate it. JEP supports user defined variables, constants, and functions. A number of common mathematical functions and constants are included.
As of February, a new release of Jep is available! We made a bunch of improvements to the configurable parser component, making it even more powerful than before. Additionally you can now analyse parsed expressions, parse multiple expressions separated by semi-colons, and much more.
See the Jep web site for more information: http://www.singularsys.com/jep
Changes from Jep 3.1 to 3.2:
- Added support for expression tree analysis using TreeAnalyser
- Fixed errors in the documentation of the default configuration
- Improved the operator table
Changes to the configurable parser:
- New StandardConfigurableParser class
- Parse error reporting with line and column numbers
- Added support for hexadecimal numbers (e.g.
- Added support for bitwise operators (bitwise or:
a | b, bit shifting
a << 2) in BitwiseOperatorTable
- Added support for
- Added support for case-insensitive operators
- Added support for multiple expressions separated by semicolons
- Added support for multiple dimensional array access (
aaccesses the first element of a two-dimensional array)
- Fixed issues with escape characters
- Fixed power and unary minus precedence to be consistent with the standard parser ("-3^2" should equal -9)
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)