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