Parsing from string to Function

Jun 19, 2014 at 3:54 PM
Hi,

Firstly, thank you for the brilliant library.

I was wondering if any one has written a parser to create a Function object directly from a string. For example, I would like to do something along the following lines:
Function f = ParseFromString( "x*x + 1")
which would create the function as if I had written:
Variable x = new Variable("x")
Function f = x * x + 1;
Of course, my use case is a bit more complicated (I would like to be able to parse a differential operator and create an appropriate representation for it) but first I need to take these baby steps.

I have looked at using Irony but unfortunately the lack of documentation there is making it quite difficult.

Any comments/suggestions would be very welcome.
Coordinator
Jun 27, 2014 at 9:29 AM
Thanks for your interest and your nice words. Parsing of string expression is currently beyond the scope of the project. But Irony looks very promising, so I bed it would be pretty easy to set of a parser in that library and make it output Function and Variable objects.

Let me know if you succeed in doing so!

Morten