iPhone iOS是否有一个代数计算器的应用程序的表达式解析器? [英] iPhone iOS is there an expression parser for an algebraic calculator-like app?
问题描述
我试图包含一个方法来绘制这些变量和涉及这些变量的方程式。我想向用户提供一个调整应用程序如何显示这些变量的方程式的能力,方法是输入a + b - c = d,其中a,b,c变量由我的应用程序计算。用户可以在现场编写方程和图形变量。由于自从我用任何语言编写了一个代数解析器以来,它已经很年龄了,如果在Objective-C中有一个表达式解析器,我可以很容易地插入到我的应用程序中,那么用户会输入一些东西像一个+ b - c = d到一个文本字段,应用程序将标记和替换我提供的代替用户输入的占位符。
几个开源选项:
GCMathParser
http://www.apptree.net/parser.htm
DDMathParser
https://github.com/davedelong/DDMathParser
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
这篇关于iPhone iOS是否有一个代数计算器的应用程序的表达式解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!