public static final int ANDEQ=10;
public static final int XOREQ=11;
public static final int OREQ=12;
+ public static final int POSTINC=13;
+ public static final int POSTDEC=14;
private int operation;
public AssignOperation(int op) {
this.operation=parseOp(op);
}
+ public int getOp() {
+ return operation;
+ }
+
public Operation getBaseOp() {
switch(operation) {
case EQ:
return new Operation(Operation.LEFTSHIFT);
case RSHIFTEQ:
return new Operation(Operation.RIGHTSHIFT);
+ case URSHIFTEQ:
+ return new Operation(Operation.URIGHTSHIFT);
case ANDEQ:
return new Operation(Operation.BIT_AND);
case XOREQ:
return new Operation(Operation.BIT_XOR);
case OREQ:
return new Operation(Operation.BIT_OR);
+ case POSTINC:
+ return new Operation(Operation.POSTINC);
+ case POSTDEC:
+ return new Operation(Operation.POSTDEC);
}
throw new Error();
}
return MINUSEQ;
else if (st.equals("lshifteq"))
return LSHIFTEQ;
+ else if (st.equals("urshifteq"))
+ return URSHIFTEQ;
else if (st.equals("rshifteq"))
return RSHIFTEQ;
else if (st.equals("andeq"))
return XOREQ;
else if (st.equals("oreq"))
return OREQ;
+ else if (st.equals("postinc"))
+ return POSTINC;
+ else if (st.equals("postdec"))
+ return POSTDEC;
else throw new Error();
}
return "<=";
else if (operation==RSHIFTEQ)
return ">=";
+ else if (operation==RSHIFTEQ)
+ return ">>=";
else if (operation==ANDEQ)
return "&=";
else if (operation==XOREQ)
return "^=";
else if (operation==OREQ)
return "|=";
+ else if (operation==POSTINC)
+ return "postinc";
+ else if (operation==POSTDEC)
+ return "postdec";
else throw new Error();
}