Beispiel #1
0
/* Production 1, chapter 3.4 in CORBA 2.3.1 spec, pragma prefix handling added here */
  public ASTspecification specification() {
 /*@bgen(jjtree) specification */
  ASTspecification jjtn000 = new ASTspecification(this, IDLParserTreeConstants.JJTSPECIFICATION);
  bool jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
      case 13:
      case 16:
      case 17:
      case 18:
      case 22:
      case 23:
      case 32:
      case 48:
      case 49:
      case 61:
      case 62:
      case 66:
      case 76:
      case IDLParserConstants.PRAGMA:
        while (true) {
          if (jj_2_1(2)) {
            definition();
          } else if (jj_2_2(2)) {
            pragmaPrefix();
          } else {
            jj_consume_token(-1);
            throw new ParseException();
          }
          switch ((jj_ntk==-1)?jj_ntk_calc():jj_ntk) {
          case 13:
          case 16:
          case 17:
          case 18:
          case 22:
          case 23:
          case 32:
          case 48:
          case 49:
          case 61:
          case 62:
          case 66:
          case 76:
          case IDLParserConstants.PRAGMA:
            ;
            break;
          default:
            jj_la1[1] = jj_gen;
            goto label_1;
            break;
          }
        }
        label_1: ;
        
    jjtree.closeNodeScope(jjtn000, true);
    jjtc000 = false;
    if (m_modForPrefix != null) {
        jjtree.closeNodeScope(m_modForPrefix, true); // close inserted module node scope for prefix, if one is open after parse completition
        jjtree.closeNodeScope(m_defForPrefix, true); // close inserted definition node scope for prefix
    }
    {if (true) return jjtn000;}
        break;
      case 0:
        jj_consume_token(0);
            jjtree.closeNodeScope(jjtn000, true);
            jjtc000 = false;
            {if (true) return jjtn000;}
        break;
      default:
        jj_la1[2] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
        break;
      }
    } catch (Exception jjte000) {
  if (jjtc000) {
    jjtree.clearNodeScope(jjtn000);
    jjtc000 = false;
  } else {
    jjtree.popNode();
  }
{if (true) throw ;}
    } finally {
  if (jjtc000) {
    jjtree.closeNodeScope(jjtn000, true);
  }
    }
    throw new Error("Missing return statement in function");
  }
 /**
  * @see parser.IDLParserVisitor#visit(ASTspecification, Object)
  * @param data unused
  */
 public Object visit(ASTspecification node, Object data) {
     if (!m_initalized) { 
         throw new InternalCompilerException("initalize not called"); 
     }
     Scope topScope = m_symbolTable.getTopScope();
     BuildInfo info = new BuildInfo(topScope, null, null);
     node.childrenAccept(this, info);
     m_initalized = false; // this file is finished
     m_typeManager.AssertAllTypesDefined(); // check if all types are completely defined. if not ok, assembly can't be saved to file.
     return null;
 }