final public ModuleDefinition ModuleDefinition() throws ParseException {
    ModuleIdentifier module_id = null;
    Token definitions_t;
    Token assign_t;
    Token begin_t;
    Token var10;
    NodeList exp_symbols = new NodeList();
    Token var13;
    Token var17;
    NodeList imports_mod_list = new NodeList();
    ModuleImport imports_symbols;
    Token var21;
    NodeList var22 = new NodeList();
    Assignment var24;
    Token var36;
    Recovery next = new Recovery();
    int next_type[] = { ASSIGN_T };
    int next_value[] = { OBJECT_IDENTIFIER_T, OBJECT_TYPE_T,
                                 OBJECT_IDENTITY_T, OBJECT_GROUP_T,
                                 NOTIFICATION_TYPE_T, NOTIFICATION_GROUP_T,
                                 MODULE_IDENTITY_T, MODULE_COMPLIANCE_T,
                                 AGENT_CAPABILITIES_T, TRAP_TYPE_T };
    int next_macro[] = { MACRO_T };
    int next_assign[] = { ASSIGN_T };
    try {
      module_id = ModuleIdentifier();
      definitions_t = jj_consume_token(DEFINITIONS_T);
            next.push(END_T);
            next.push(new RecoveryItem(TYPE_IDENTIFIER_T, next_type));
            next.push(new RecoveryItem(INDEX_SYNTAX_T, next_type));
            next.push(new RecoveryItem(APPLICATION_SYNTAX_T, next_type));
            next.push(new RecoveryItem(OBJECT_SYNTAX_T, next_type));
            next.push(new RecoveryItem(SIMPLE_SYNTAX_T, next_type));
            next.push(new RecoveryItem(VALUE_IDENTIFIER_T, next_value));
            next.push(new RecoveryItem(OBJECT_TYPE_T, next_macro));
            next.push(new RecoveryItem(OBJECT_IDENTITY_T, next_macro));
            next.push(new RecoveryItem(OBJECT_GROUP_T, next_macro));
            next.push(new RecoveryItem(TEXTUAL_CONVENTION_T, next_macro));
            next.push(new RecoveryItem(NOTIFICATION_TYPE_T, next_macro));
            next.push(new RecoveryItem(NOTIFICATION_GROUP_T, next_macro));
            next.push(new RecoveryItem(MODULE_IDENTITY_T, next_macro));
            next.push(new RecoveryItem(MODULE_COMPLIANCE_T, next_macro));
            next.push(new RecoveryItem(AGENT_CAPABILITIES_T, next_macro));
            next.push(new RecoveryItem(TRAP_TYPE_T, next_macro));
            next.push(new RecoveryItem(IP_ADDRESS_T, next_assign));
            next.push(new RecoveryItem(NETWORK_ADDRESS_T, next_assign));
            next.push(new RecoveryItem(COUNTER_T, next_assign));
            next.push(new RecoveryItem(COUNTER32_T, next_assign));
            next.push(new RecoveryItem(COUNTER64_T, next_assign));
            next.push(new RecoveryItem(GAUGE_T, next_assign));
            next.push(new RecoveryItem(GAUGE32_T, next_assign));
            next.push(new RecoveryItem(TIMETICKS_T, next_assign));
            next.push(new RecoveryItem(OPAQUE_T, next_assign));
            next.push(new RecoveryItem(INTEGER32_T, next_assign));
            next.push(new RecoveryItem(UINTEGER32_T, next_assign));
            next.push(new RecoveryItem(UNSIGNED32_T, next_assign));
            next.push(IMPORTS_T);
            next.push(EXPORTS_T);
            next.push(BEGIN_T);
      AssignSymbol(next);
            next.pop(); /* BEGIN_T */

      begin_t = jj_consume_token(BEGIN_T);
            next.pop(); /* EXPORTS_T */

      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case EXPORTS_T:
        var10 = jj_consume_token(EXPORTS_T);
        exp_symbols = ModuleExport(exp_symbols);
        var13 = jj_consume_token(SEMI_COLON_T);
              exp_symbols.nodes.trimToSize();
        break;
      default:
        jj_la1[1] = jj_gen;
        ;
      }
            next.pop(); /* IMPORTS_T */

      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case IMPORTS_T:
        var17 = jj_consume_token(IMPORTS_T);
              next.push(SEMI_COLON_T);
        label_2:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case OBJECT_TYPE_T:
          case OBJECT_IDENTITY_T:
          case OBJECT_GROUP_T:
          case TEXTUAL_CONVENTION_T:
          case NOTIFICATION_TYPE_T:
          case NOTIFICATION_GROUP_T:
          case MODULE_IDENTITY_T:
          case MODULE_COMPLIANCE_T:
          case AGENT_CAPABILITIES_T:
          case TRAP_TYPE_T:
          case CURRENT_T:
          case DEPRECATED_T:
          case OBSOLETE_T:
          case MANDATORY_T:
          case NOT_IMPLEMENTED_T:
          case COUNTER32_T:
          case COUNTER_T:
          case GAUGE32_T:
          case GAUGE_T:
          case TIMETICKS_T:
          case OPAQUE_T:
          case IP_ADDRESS_T:
          case NETWORK_ADDRESS_T:
          case NSAP_ADDRESS_T:
          case COUNTER64_T:
          case UNSIGNED32_T:
          case UINTEGER32_T:
          case INTEGER32_T:
          case INDEX_SYNTAX_T:
          case APPLICATION_SYNTAX_T:
          case OBJECT_SYNTAX_T:
          case SIMPLE_SYNTAX_T:
          case VALUE_IDENTIFIER_T:
          case TYPE_IDENTIFIER_T:
            ;
            break;
          default:
            jj_la1[2] = jj_gen;
            break label_2;
          }
          try {
            imports_symbols = ModuleImport(next);
                      imports_mod_list.addNode(imports_symbols);
          } catch (ParseException e) {
                    if (e.currentToken.kind == FROM_T) {
                        makeError(e.currentToken, "incorrect module name");
                    }
                    if (e.currentToken.kind != SEMI_COLON_T) {
                        getNextToken();
                    }
          }
        }
                imports_mod_list.nodes.trimToSize();
                next.pop(); /* SEMI_COLON_T */

        var21 = jj_consume_token(SEMI_COLON_T);
        break;
      default:
        jj_la1[3] = jj_gen;
        ;
      }
      label_3:
      while (true) {
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case OBJECT_TYPE_T:
        case OBJECT_IDENTITY_T:
        case OBJECT_GROUP_T:
        case TEXTUAL_CONVENTION_T:
        case NOTIFICATION_TYPE_T:
        case NOTIFICATION_GROUP_T:
        case MODULE_IDENTITY_T:
        case MODULE_COMPLIANCE_T:
        case AGENT_CAPABILITIES_T:
        case TRAP_TYPE_T:
        case CURRENT_T:
        case DEPRECATED_T:
        case OBSOLETE_T:
        case MANDATORY_T:
        case NOT_IMPLEMENTED_T:
        case COUNTER32_T:
        case COUNTER_T:
        case GAUGE32_T:
        case GAUGE_T:
        case TIMETICKS_T:
        case OPAQUE_T:
        case IP_ADDRESS_T:
        case NETWORK_ADDRESS_T:
        case NSAP_ADDRESS_T:
        case COUNTER64_T:
        case UNSIGNED32_T:
        case UINTEGER32_T:
        case INTEGER32_T:
        case INDEX_SYNTAX_T:
        case APPLICATION_SYNTAX_T:
        case OBJECT_SYNTAX_T:
        case SIMPLE_SYNTAX_T:
        case VALUE_IDENTIFIER_T:
        case TYPE_IDENTIFIER_T:
          ;
          break;
        default:
          jj_la1[4] = jj_gen;
          break label_3;
        }
        var24 = Assignment(next);
                var22.addNode(var24);
                /* We do a recovery, making sure we see a next Assignment. */
                recovery(next);
      }
          var22.nodes.trimToSize();
      var36 = jj_consume_token(END_T);
    } catch (ParseException e) {
        makeError(e.currentToken,
                        "error in module " + ((module_id != null) ? module_id.toString() : ""));
        recovery(next);
    }
      {if (true) return new ModuleDefinition(module_id,
                            exp_symbols,
                            imports_mod_list,
                            var22);}
    throw new Error("Missing return statement in function");
  }