1 2 23 24 25 26 27 28 29 30 public class ASTBitwiseOrNode extends SimpleNode { 31 ASTBitwiseOrNode(int id) { 32 super(id); 33 } 34 35 36 public void interpret() 37 { 38 jjtGetChild(0).interpret(); 39 jjtGetChild(1).interpret(); 40 41 if (stack[top] instanceof Boolean ) 42 stack[--top] = new Boolean (((Boolean )stack[top]).booleanValue() | 43 ((Boolean )stack[top + 1]).booleanValue()); 44 else if (stack[top] instanceof Integer ) 45 stack[--top] = new Integer (((Integer )stack[top]).intValue() | 46 ((Integer )stack[top + 1]).intValue()); 47 } 48 } 49 | Popular Tags |