commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mansour Al Akeel <mansour.alak...@gmail.com>
Subject Re: Parsing and solving algebraic equation from string
Date Sun, 27 Jul 2014 23:34:26 GMT
William,
Thank you a lot.

Is there building instructions ?

Are there any interest in creating/adding these efforts as
commons-math subproject.
I understand and agree with the point that a parser is outside of the
scope of commons-math, but may be we can create a subproject
"commons-math-sandbox" or "commons-math-ext" or
"commons-math-optional", that will host efforts and project related
but does not fit the scope. This will separate the concerns and allow
those who need this functionality to find it easily, at the same time
it will give the project a home, and make it available for wider
users.

Is this a valid suggestion ?




On Mon, Jul 21, 2014 at 8:39 AM, William Speirs <wspeirs@apache.org> wrote:
> Errr... nothing at the moment, but I'll make it Apache2 :-)
>
> Bill-
>
>
> On Mon, Jul 21, 2014 at 8:29 AM, Paul Libbrecht <paul@hoplahup.net> wrote:
>
>> Coool. License?
>>
>> paul
>>
>>
>> On 21 juil. 2014, at 14:26, William Speirs <wspeirs@apache.org> wrote:
>>
>> > It's certainly incomplete, but I started working on a CAS (Computer
>> Algebra
>> > System: http://en.wikipedia.org/wiki/Computer_algebra_system) that was
>> > "backed" by commons-math: https://github.com/wspeirs/math
>> >
>> > The JJT (parser file for JavaCC) file can be found here, and is fairly
>> > complete if I remember correctly:
>> >
>> https://raw.githubusercontent.com/wspeirs/Math/master/src/main/java/com/educatedsolutions/parser/Math.jjt
>> >
>> > I'd be happy to help you with it further and/or accept pull requests to
>> > improve it :-)
>> >
>> > Bill-
>> >
>> >
>> > On Mon, Jul 21, 2014 at 1:59 AM, Ted Dunning <ted.dunning@gmail.com>
>> wrote:
>> >
>> >> On Sun, Jul 20, 2014 at 9:18 PM, Mansour Al Akeel <
>> >> mansour.alakeel@gmail.com
>> >>> wrote:
>> >>
>> >>> As Luc said, it will big project to write a parser that takes any
>> >>> equation as a string, and generate the matrix (2-dimensional array)
to
>> >>> feed it into Commons Math.
>> >>>
>> >>
>> >>
>> >> It actually isn't a big project.
>> >>
>> >> See http://www.antlr.org/
>> >>
>> >> The simplest example they give there is this one:
>> >>
>> >> *grammar Expr;*
>> >> *prog: (expr NEWLINE)* ; *
>> >> *expr: expr ('*'|'/') expr *
>> >> *    | expr ('+'|'-') expr *
>> >> *    | INT | '(' expr ')' ; *
>> >> *NEWLINE : [\r\n]+ ; INT : [0-9]+ ;*
>> >>
>> >> This will compile into a java program that parses expressions very much
>> >> like what you want.
>> >>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message