org.nutz.el.arithmetic.RPN Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nutz Show documentation
Show all versions of nutz Show documentation
Nutz, which is a collections of lightweight frameworks, each of them can be used independently
package org.nutz.el.arithmetic;
import java.util.LinkedList;
import java.util.Queue;
import org.nutz.el.ElCache;
import org.nutz.el.Operator;
import org.nutz.el.obj.Elobj;
import org.nutz.lang.util.Context;
/**
* 逆波兰表示法(Reverse Polish notation,RPN,或逆波兰记法),是一种是由波兰数学家扬·武卡谢维奇1920年引入的数学表达式方式,在逆波兰记法中,所有操作符置于操作数的后面,因此也被称为后缀表示法。
* 参考:逆波兰表达式
*
* @author juqkai([email protected])
*
*/
public class RPN {
//存放context
private final ElCache ec = new ElCache();
//预编译后的对象
private LinkedList