final public ObjectInfo ObjectDefinition(Recovery next) throws ParseException {
    Type type;
    Token sort_t;
    ContactInfoPart contactinfo;
    NodeList revision;
    OrganizationPart organization;
    SyntaxPart syntax;
    UnitsPart units;
    AccessPart access;
    StatusPart status;
    DescriptionPart description;
    ReferencePart reference;
    IndexPart index;
    DefValPart defval;
    NodeList objects;
    NodeList notification;
    NodeList modulecapabilities;
    NodeList modulecompliance;
    ProductReleasePart productrelease;
    LastUpdatedPart lastupdated;
    NumericValue number;
    Token type_t;
    ObjectInfo object_info;
    AssignedValue assigned_value;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case OBJECT_IDENTIFIER_T:
      sort_t = jj_consume_token(OBJECT_IDENTIFIER_T);
            object_info = new ObjectInfoObjectIdentifier();
      break;
    case OBJECT_TYPE_T:
      sort_t = jj_consume_token(OBJECT_TYPE_T);
            next.push(DEFVAL_T);
            next.push(INDEX_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
            next.push(STATUS_T);
            next.push(MAX_ACCESS_T);
            next.push(UNITS_T);
      syntax = SyntaxPart(next);
            next.pop(); /* UNITS_T */

      units = UnitsPart(next);
            next.pop(); /* MAX_ACCESS_T */
            next.contains(-1);
      access = AccessPart(MAX_ACCESS_T, next);
            next.pop(); /* STATUS_T */

      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            next.pop(); /* INDEX_T */

      index = IndexPart(next);
            next.pop(); /* DEFVAL_T */

      defval = DefValPart(next);
            object_info = new ObjectInfoObjectType(syntax,
                                            units,
                                            access,
                                            status,
                                            description,
                                            reference,
                                            index,
                                            defval);
      break;
    case MODULE_IDENTITY_T:
      sort_t = jj_consume_token(MODULE_IDENTITY_T);
            next.push(REVISION_T);
            next.push(DESCRIPTION_T);
            next.push(CONTACT_INFO_T);
            next.push(ORGANIZATION_T);
      lastupdated = LastUpdatedPart(next);
            next.pop(); /* ORGANIZATION_T */

      organization = OrganizationPart(next);
            next.pop(); /* CONTACT_INFO_T */

      contactinfo = ContactInfoPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REVISION_T */

      revision = RevisionPart(next);
            object_info = new ObjectInfoModuleIdentity(lastupdated,
                                            organization,
                                            contactinfo,
                                            description,
                                            revision);
      break;
    case OBJECT_IDENTITY_T:
      sort_t = jj_consume_token(OBJECT_IDENTITY_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            object_info = new ObjectInfoObjectIdentity(status,
                                            description,
                                            reference);
      break;
    case OBJECT_GROUP_T:
      sort_t = jj_consume_token(OBJECT_GROUP_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
            next.push(STATUS_T);
      objects = ObjectsPart(false, next);
            next.pop(); /* STATUS_T */

      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            object_info = new ObjectInfoObjectGroup(objects,
                                            status,
                                            description,
                                            reference);
      break;
    case NOTIFICATION_TYPE_T:
      sort_t = jj_consume_token(NOTIFICATION_TYPE_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
            next.push(STATUS_T);
      objects = ObjectsPart(true, next);
            next.pop(); /* STATUS_T */

      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            object_info = new ObjectInfoNotificationType(objects,
                                            status,
                                            description,
                                            reference);
      break;
    case NOTIFICATION_GROUP_T:
      sort_t = jj_consume_token(NOTIFICATION_GROUP_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
            next.push(STATUS_T);
      notification = NotificationPart(next);
            next.pop(); /* STATUS_T */

      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            object_info = new ObjectInfoNotificationGroup(notification,
                                            status,
                                            description,
                                            reference);
      break;
    case MODULE_COMPLIANCE_T:
      sort_t = jj_consume_token(MODULE_COMPLIANCE_T);
            next.push(MODULE_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            next.pop(); /* MODULE_T */

      modulecompliance = ModuleCompliancePart();
            object_info = new ObjectInfoModuleCompliance(status,
                                            description,
                                            reference,
                                            modulecompliance);
      break;
    case AGENT_CAPABILITIES_T:
      sort_t = jj_consume_token(AGENT_CAPABILITIES_T);
            next.push(SUPPORTS_T);
            next.push(REFERENCE_T);
            next.push(DESCRIPTION_T);
            next.push(STATUS_T);
      productrelease = ProductReleasePart(next);
            next.pop(); /* STATUS_T */

      status = StatusPart(next);
            next.pop(); /* DESCRIPTION_T */

      description = DescriptionPart(next);
            next.pop(); /* REFERENCE_T */

      reference = ReferencePart(next);
            next.pop(); /* SUPPORTS_T */

      modulecapabilities = ModuleCapabilitiesPart();
            object_info = new ObjectInfoAgentCapabilities(productrelease,
                                            status,
                                            description,
                                            reference,
                                            modulecapabilities);
      break;
    default:
      jj_la1[12] = jj_gen;
      jj_consume_token(-1);
      throw new ParseException();
    }
        {if (true) return object_info;}
    throw new Error("Missing return statement in function");
  }