#include "UNKNOWN.h"



int Cd_graph::check_repetition(  )
{
  DEM_TRACE("Cd_graph","int Cd_graph::check_repetition()");
  int return_val =  1 ;

  this->check_repetition_( return_val );
  return return_val;
}
//  Cd_graph  = <adjacencies > Adjacency_Nlist 
//            [ <terminal_sets > Vertex_Comma_list  ] .
void Cd_graph::check_repetition_( int& return_val )
{
  DEM_TRACE("Cd_graph","void Cd_graph::check_repetition_(int& return_val)");
  // variables for carrying in and out

  // assignments for carrying in

  // prefix class wrappers
 cout << endl
                     << "Checking that two class names on the right hand side"
                     << endl 
                     << "\tof every repetition production are identical ..."
                     << endl;
              

  // outgoing calls
  // construction edge prefix wrappers
  this->get_adjacencies()->check_repetition_( return_val );
  // construction edge suffix wrappers

  // suffix class wrappers

  // assignments for carrying out
}

//  Adjacency  = <source > Vertex 
//             [ <parameters > Vertex_Comma_list  ] 
//            <ns > Neighbors 
//            "." 
//            *l.
void Adjacency::check_repetition_( int& return_val )
{
  DEM_TRACE("Adjacency","void Adjacency::check_repetition_(int& return_val)");
  // variables for carrying in and out

  // assignments for carrying in

  // prefix class wrappers

  // outgoing calls
  // construction edge prefix wrappers
  this->get_ns()->check_repetition_( return_val );
  // construction edge suffix wrappers

  // suffix class wrappers

  // assignments for carrying out
}

//  Neighbors  : Neighbors_wc   |
//            Repetit_n 
//           *common* .
void Neighbors::check_repetition_( int& return_val )
{
  DEM_TRACE("Neighbors","void Neighbors::check_repetition_(int& return_val)");
#ifndef NOTRACE
   DemTrace demTraceEmptyMethod(__FILE__,__LINE__,"Neighbors",form(" at %s , ***  PREMATURELY TERMINATED *** ", this->get_type()));
#endif

}

//  Repetit_n  = "~" 
//            <sandwiched > Kernel_Sandwich .
void Repetit_n::check_repetition_( int& return_val )
{
  DEM_TRACE("Repetit_n","void Repetit_n::check_repetition_(int& return_val)");
  // variables for carrying in and out

  // assignments for carrying in


  // prefix class wrappers

  // outgoing calls
  // construction edge prefix wrappers
  this->get_sandwiched()->check_repetition_( return_val );
  // construction edge suffix wrappers

  // suffix class wrappers

  // assignments for carrying out

}

//  Kernel  =  [ <nonempty > Term  ] 
//         "{" 
//         <repeated > Term_Sandwich 
//         "}" .
void Kernel::check_repetition_( int& return_val )
{
  DEM_TRACE("Kernel","void Kernel::check_repetition_(int& return_val)");
  // variables for carrying in and out
  Term*  t =  this->get_nonempty() ? 
                            this->get_nonempty() : NULL ;

  // assignments for carrying in

  // prefix class wrappers

  // outgoing calls
  // construction edge prefix wrappers
  this->get_repeated()->check_repetition_( return_val, t  );
  // construction edge suffix wrappers

  // suffix class wrappers

  // assignments for carrying out
}

//  Term  : Normal   |
//       CppTerm 
//           *common* <vertex > Vertex 
//                    <moduleRef > TermRef 
//                     [ <actual_parameters > Term_Comma_list  ] .
void Term::check_repetition_( int& return_val, Term*  t )
{
  DEM_TRACE("Term","void Term::check_repetition_(int& return_val,Term*  t)");
  // variables for carrying in and out

  // assignments for carrying in

  // prefix class wrappers
 if (t != NULL) {
                  if (!this->g_equal(t)) {
                    cout << "sem-check: error: on line "
                         << this->find_line_number() 
                         << " two class instances are not identical."
                         << endl;
                    return_val = 0;
                  }
                }
              


  // suffix class wrappers

  // assignments for carrying out
}

//  Adjacency_Nlist  ~ Adjacency  { Adjacency  }. .
void Adjacency_Nlist::check_repetition_( int& return_val )
{
  DEM_TRACE("Adjacency_Nlist","void Adjacency_Nlist::check_repetition_(int& return_val)");
  // variables for carrying in and out

  // assignments for carrying in

  // prefix class wrappers

  // outgoing calls
  Adjacency_list_iterator	next_Adjacency(*this);
  Adjacency*		each_Adjacency;

  while ( each_Adjacency = next_Adjacency() )
  {
  // repetition edge prefix wrappers
    each_Adjacency->check_repetition_( return_val );
  // repetition edge suffix wrappers
  }

  // suffix class wrappers

  // assignments for carrying out
}

//  Kernel_Sandwich  = <first > Syntax_vertex_List 
//                  <inner > Kernel 
//                  <second > Syntax_vertex_List .
void Kernel_Sandwich::check_repetition_( int& return_val )
{
  DEM_TRACE("Kernel_Sandwich","void Kernel_Sandwich::check_repetition_(int& return_val)");
  // variables for carrying in and out

  // assignments for carrying in

  // prefix class wrappers

  // outgoing calls
  // construction edge prefix wrappers
  this->get_inner()->check_repetition_( return_val );
  // construction edge suffix wrappers

  // suffix class wrappers

  // assignments for carrying out
}

//  Term_Sandwich  = <first > Syntax_vertex_List 
//                <inner > Term 
//                <second > Syntax_vertex_List .
void Term_Sandwich::check_repetition_( int& return_val, Term*  t )
{
  DEM_TRACE("Term_Sandwich","void Term_Sandwich::check_repetition_(int& return_val,Term*  t)");
  // variables for carrying in and out

  // assignments for carrying in

  // prefix class wrappers

  // outgoing calls
  // construction edge prefix wrappers
  this->get_inner()->check_repetition_( return_val, t  );
  // construction edge suffix wrappers

  // suffix class wrappers

  // assignments for carrying out
}


