Fix exceptions when using the ExpressionCombiner to change the result of an affectation expression by something other than a variable
Change the requisite to Java 8
Fix the clone() method of the CodeBlock class
Fix the evaluation of functions which did not work when using arrays as arguments
Fix the ExpressionCombiner not taking correctly into account CodeBlock expressions
Add the "~" character to the list of allowed characters
Fix the behavior of the ExpressionCombiner used with a CodeBlock
Add the new "boolean" syntax for booleans in addition to "bool"
Fix the simplification of expressions with blocks, if-then-else, and while which were not handled
Change the package to org.expressionj
The distribution is now a Java 9 automatic module
Fix several exception messages
Allow to use a File or URL to parse an equation
Add a wiki
Allow semicolons inside function declaration
Fix expressions before semicolons followed by function expressions not being taken into account in some cases
Add the array declaration and array affectation expressions
Make the expressions cloneable
Add a new combiner method allowing to easily create an array expression
Add the sign function
Add the echo function
Add several characters to the list of characters allowed in expressions: =, <, >
Add comments
Fix several bugs in expressions combiner, including Array expressions
Fix constant of type String exported without enclosing double-quotes
Make the parser much more lenient on the use of semicolons or not to separate expressions. The parser accept more than one semicolon to separate expressions, and it accept semicolons before the end of a block separated by an open bracket. For example "int a = 2;;; if (a == 2) {return a;;;} else {return 10;;}" is accepted
Add decrement operator (--)... read more
Add increment operator (++)
Fix else expression code blocks not being able to have more than one line
Fix some cases when unwinding of curly brackets was not performed well and could lead to false results for some expressions
Fix some cases when the parser could parse incorrectly expressions containing both while and choice expressions
Fix wrong parsing for choice expressions without else and else if
Fix local variables not being available in a block if they where defined in a super block. Previously a global variable with the same name was created or used, now the local variable is correctly used
Fix some expressions in blocks not being parsed in some cases
Add while expressions
This is an important release as it adds if-then-else constructs, and code blocks, as well as internal variables.
Add blocks of expressions separated by semicolons. For example the following expression is parsed correctly: "c=a+cos(b); return c"
Add local variables in blocks. For example the following expression is parsed correctly: "int c=a+cos(b); return c", and in this case the expression export only 2 global variables, a and b (c is local)... read more
Add the XOR function (a ^ b)
Fix the AND, OR, NEQ, and EQ functions which results were wrong in some cases
Fix adding strings and numeric expressions which should work and return strings (for example "a" + 1 return "a1")
Fix combination of functions in ary expressions which returned the wrong value or did not parse correctly. For example, now
c + function(a, b) now parse and evaluate correctly
Add the MOD function (a % b) and the ABS function
Make sure that only ParserExceptions are thrown by the parser (other Exceptions that may be thrown are encapsulated)
Fix indexes of arrays which could not be parsed if they were the rsult of expressions (such as TAB[a+1])
Add the atn2 mathematical expression
Improve result for ExpressionExporter with expressions like a + (-b) case, which are now exported as a - b
Fix expressions like a*(-2) which were not parsed correctly
Improve result for ExpressionExporter with expressions like +a which are now exported as "a" rather than "+a"
Improve result for ExpressionExporter with expressions like a*(b) which are now exported as "a * b" rather than "a * (b)"
Simplify internally expressions obtained through add, substract, multiply, or divide methods in the ExpressionCombiner
Fix a bug whereas value types would be mistakenly defined as DYNAMIC for constants
Fix wrong export of expressions like -e or +e (ADD or SUB without first expression)
Add several new methods in the ExpressionCombiner to allow to add, substract, multiply, or divide two expressions easily
Fix a bug which could appear in some cases in the ExpressionExporter
Ensure that the Variable.getValue() method will never throw a NullPointerException, even if the Variable has no value yet
Avoid a StackTrace exception in the expression combiner if the sub expression is equal to the expression to combine
Fix exporting expressions with associative operations with enclosed parenthesis; For example, the export of 1 + 2 + 3 is 1 + 2 + 3 (which is expected) and not (1 + 2) + 3 (which was correct but uselessly complex)
Fix the jar building keeping some html files
Add utility methods in the util package to detect if an Expression is a Constant or a Variable
Add new simplification patterns: Now if two constants are combined in a numeric expression, the resulting Constant result is returned rather than the expression
Version 0.8 Beta 1 is released. 0.8 is for now hosted the performance branch. All the unit tests are passing, and the performance boost in the same scenarios seem to be in the class 50% - 100% compared to 0.7
It is now possible to use any expression in functions, (even custom functions). For example "function(a+1)" or "function2(a, c - function3(a, b * sin(a)))" are allowed
Fix some cases where the export of an ary expression under an unary operator did not enclose the expression under parenthesis
- Vararg functions are now handled
- Add the ability to choose when exporting an expression if the named constants must be exported as their values or with their names
- Keep the names of constants defined explicitely in the global constants
This Beta version add several utility classes which allows to export an Expression as a String, to replace a Variable by an Expression, or to simplify an Expression
Also SUB and ADD expressions can now be parsed if the first argument is omitted, like for example "-a" or "+2"
This version adds the true and false constants, and allow to give a name to constants. Some new characters are allowed for String literal values: ":","(",")","!","?" .
It also fix the following bugs: Make sure that Variables instances are not removed when parsing expressions, if these Variables are already existing, the Boolean result type for functions was not handled
Some new characters are allowed for String literal values: ":","(",")","!","?"