// file: tr_lxt_debug_0.cc
//
 
// isip include files
//
#include "train_lex_tree.h"
#include "train_lex_tree_constants.h"

// method: debug_cc
//
// arguments:
//  FILE* fp: (input) file pointer used for output
//  char_1* message: (input) a message concatenated to each debug message
//
// return: a logical_1 value indicating status
//
// this method displays the values of all internal data
//
logical_1 Train_Lex_tree::debug_cc(FILE* fp_a, char_1* message_a) {

  // dump the word-history information
  //
  fprintf(fp_a, "%s::%s: history_d = %p\n", TRAIN_LXT_CLASS_NAME, message_a,
	  history_d);
  if (history_d != (Train_Hash_cell*)NULL) {
    history_d->debug_cc(fp_a, message_a);
  }

  // dump the lexical tree nodes starting from the head
  //
  fprintf(fp_a, "%s::%s: head_d = %p\n", TRAIN_LXT_CLASS_NAME, message_a, head_d);
  if (head_d != (Train_Lex_node*)NULL) {
    head_d->debug_cc(fp_a, message_a);
  }
  fprintf(fp_a, "\n");

  // output the status information
  //
  fprintf(fp_a, "%s::%s: status_d = %c\n", TRAIN_LXT_CLASS_NAME, message_a,
	  status_d);
  
  // exit gracefully
  //
  return ISIP_TRUE;
}
