I'm writing program solving differential equations. I'd like to have an option of
inserting my equation through standard input. I define an equation by
the code:
How to convert string "-3./t*x[1]" or "sin(x[1]*t)/t+tanh(x)" to something which I can use in my "void equation" function. Is there any library which can that easily for me?
Parsing can be an ugly process, and kind of frustrating. I think regex, which is C+11, might help with this. Don't quote me, I know very little about regex