14151617181920
* 预编译 */ public El(CharSequence cs){ ShuntingYard sy = new ShuntingYard(); Queue<Object> rpn = sy.parseToRPN(cs.toString()); rc = new RPN(rpn); }
363738394041424344
return eval(null, val); } public static Object eval(Context context, String val) { ShuntingYard sy = new ShuntingYard(); RPN rc = new RPN(); Queue<Object> rpn = sy.parseToRPN(val); return rc.calculate(context, rpn); }
16171819202122
*/ public El(CharSequence cs){ elstr = cs; ShuntingYard sy = new ShuntingYard(); Queue<Object> rpn = sy.parseToRPN(cs.toString()); rc = new RPN(rpn); }
383940414243444546