示例#1
0
/* Production 30 chapter 3.4 corba 2.3.1 (resolved left side recursion here) */
  public void or_expr() {
 /*@bgen(jjtree) or_expr */
  ASTor_expr jjtn000 = new ASTor_expr(this, IDLParserTreeConstants.JJTOR_EXPR);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      xor_expr();
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
        case 35:
          ;
          break;
        default:
          jj_la1[34] = jj_gen;
          goto label_11;
          break;
        }
        jj_consume_token(35);
        xor_expr();
      }
      label_11: ;
      
    } 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(ASTor_expr, Object)
  */
 public Object visit(ASTor_expr node, Object data) {
     Literal result = 
         (Literal)node.jjtGetChild(0).jjtAccept(this, data);
     for(int i=1; i < node.jjtGetNumChildren(); i++) {
         // evaluate the xor-expr and or it to the current result
         result = result.Or((Literal)node.jjtGetChild(i).jjtAccept(this, data));
     }
     return result;                
 }