I’m building an app that would analyze phone’s motion through accelerometer and gyroscope output. It is likely that I will capture this motion as a set of variables that the app would keep track of internally.
I’m trying to include a way to graph these variables and equations involving these variables. I would like to offer the user an ability to adjust how the app displays equations of these variables by typing equations like a + b – c = d with the a,b,c variables being calculated by my app. The user can write equations and graph variables in the field. Since it has been ages since I wrote an algebraic parser in any language, I’m wandering if there’s an expression parser in objective-c that I can readily plug into my app, where a user would type something like a + b – c = d into a text field and the app would tokenize and substitute variables that I provide in place of the user-entered placeholders.
A couple of open source options:
GCMathParser
http://www.apptree.net/parser.htm
DDMathParser
https://github.com/davedelong/DDMathParser