package parser.ast; public enum AccumulationSymbol { ACCDIAPLUS, ACCDIAMINUS, ACCBOXPLUS, ACCBOXMINUS; public String toString() { switch(this) { case ACCBOXMINUS: return "[-]"; case ACCBOXPLUS: return "[+]"; case ACCDIAMINUS: return "<->"; case ACCDIAPLUS: return "<+>"; default: throw new RuntimeException("Unknown accumulation symbol"); } } public boolean isDia() { return (this == ACCDIAPLUS) || (this == ACCDIAMINUS); } public boolean isBox() { return (this == ACCBOXPLUS) || (this == ACCBOXMINUS); } public boolean isMinus() { return (this == ACCDIAMINUS) || (this == ACCBOXMINUS); } public boolean isPlus() { return (this == ACCDIAPLUS) || (this == ACCBOXPLUS); } }