You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Himanshu <g....@gmail.com> on 2015/12/15 05:48:00 UTC
[Proposal] simple expression language in commons-math
Hi,
Recently I needed to embed support for simple math expressions in my
project. Example grammar is...
expr : ('-'|'!') expr
| expr '^' expr
| expr ('*'|'/'|'%') expr
| expr ('+'|'-') expr
| expr ('<'|'<='|'>'|'>='|'=='|'!=') expr
| '(' expr ')'
| ID
| DOUBLE
| LONG
;
with basic math functions like sqrt supported in the expressions. I thought
such expression language would be available in commons-math, but it is not
(please correct me if I am wrong).
I am working on it already for my project and would love to contribute to
commons-math. Just wondering, How likely is commons community ready to
accept same?
-- Himanshu
Re: [Proposal] simple expression language in commons-math
Posted by Gary Gregory <ga...@gmail.com>.
This seems out of scope to me; especially since Java has built-in support
for JavaScript and any and all languages that support the Java scripting
API.
Gary
On Mon, Dec 14, 2015 at 8:48 PM, Himanshu <g....@gmail.com> wrote:
> Hi,
>
> Recently I needed to embed support for simple math expressions in my
> project. Example grammar is...
>
> expr : ('-'|'!') expr
> | expr '^' expr
> | expr ('*'|'/'|'%') expr
> | expr ('+'|'-') expr
> | expr ('<'|'<='|'>'|'>='|'=='|'!=') expr
> | '(' expr ')'
> | ID
> | DOUBLE
> | LONG
> ;
>
> with basic math functions like sqrt supported in the expressions. I thought
> such expression language would be available in commons-math, but it is not
> (please correct me if I am wrong).
>
> I am working on it already for my project and would love to contribute to
> commons-math. Just wondering, How likely is commons community ready to
> accept same?
>
> -- Himanshu
>
--
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory