/* Production 31 chapter 3.4 corba 2.3.1 (reformulated without recursion) */ public void xor_expr() { /*@bgen(jjtree) xor_expr */ ASTxor_expr jjtn000 = new ASTxor_expr(this, IDLParserTreeConstants.JJTXOR_EXPR); bool jjtc000 = true; jjtree.openNodeScope(jjtn000); try { and_expr(); while (true) { switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) { case 36: ; break; default: jj_la1[35] = jj_gen; goto label_12; break; } jj_consume_token(36); and_expr(); } label_12: ; } 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(ASTxor_expr, Object) */ public Object visit(ASTxor_expr node, Object data) { Literal result = (Literal)node.jjtGetChild(0).jjtAccept(this, data); for(int i=1; i < node.jjtGetNumChildren(); i++) { // evaluate the and-expr and xor it to the current result result = result.Xor((Literal)node.jjtGetChild(i).jjtAccept(this, data)); } return result; }