/* Production 32 chapter 3.4 corba 2.3.1 (reformulated without recursion) */ public void and_expr() { /*@bgen(jjtree) and_expr */ ASTand_expr jjtn000 = new ASTand_expr(this, IDLParserTreeConstants.JJTAND_EXPR); bool jjtc000 = true; jjtree.openNodeScope(jjtn000); try { shift_expr(); while (true) { switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) { case 37: ; break; default: jj_la1[36] = jj_gen; goto label_13; break; } jj_consume_token(37); shift_expr(); } label_13: ; } catch (Exception jjte000) { if (jjtc000) { jjtree.clearNodeScope(jjtn000); jjtc000 = false; } else { jjtree.popNode(); } {if (true) throw ;} } finally { if (jjtc000) { jjtree.closeNodeScope(jjtn000, true); } } }
/** * @see parser.IDLParserVisitor#visit(ASTand_expr, Object) */ public Object visit(ASTand_expr node, Object data) { Literal result = (Literal)node.jjtGetChild(0).jjtAccept(this, data); for(int i=1; i < node.jjtGetNumChildren(); i++) { // evaluate the shift-expr and and it to the current result result = result.And((Literal)node.jjtGetChild(i).jjtAccept(this, data)); } return result; }