package Token;

import java.util.List;
import java.util.Stack;

import Main.Expression;

public abstract class Token {
	int arity;
	int positionInPredicate;
	static char uniqueChar = 1000;
	/**
	 * 
	 * @return a string. It is gauranteed that the string does not have ascii characters, and that no two calls
	 * return the same value.
	 */
	protected String getUniqueString(){
		uniqueChar++;
		return Character.toString(uniqueChar);
	}
	public void put(List<Token> postOrder){
		postOrder.add(this);
	}

	public abstract void act(Stack<Expression> S) throws Exception;
	public boolean isOperator(){
		return false;
	}
	public int getPositionInPredicate(){return positionInPredicate;}
	public int getArity(){return arity;}
	public void setArity(int arity){this.arity = arity;}
	public void setPositionInPredicate(int positionInPredicate){this.positionInPredicate = positionInPredicate;}
}