// Check that the first class of the Cd_graph is a construction class *operation* int check_first_class() *init* (@ 1 @) *traverse* *from* Cd_graph *to-stop* Adjacency_Nlist *wrapper* Cd_graph *prefix* (@ cout << endl << "Checking that the first production is an" << endl << "\tunparameterized construction production ..." << endl; @) *wrapper* Adjacency_Nlist *prefix* (@ Adjacency_list_iterator next_Adjacency(*this); if (!next_Adjacency()->check_first_class1()) return_val = 0; @) // If a repetition or alternation class can be reached from this adjacency // class then the first class is not a construction class. *operation* int check_first_class1() *init* (@ 1 @) *traverse* *from* Adjacency *to-stop* {Repetit_n, Alternat_ns} *wrapper* {Repetit_n, Alternat_ns} *prefix* (@ return_val = 0; @) *wrapper* Adjacency *suffix* (@ if (this->get_parameters() != NULL) return_val = 0; if (return_val == 0) { cout << endl << "The first production of your class dictionary has to" << endl << "be an unparameterized production. Your first production" << endl; this->g_print(); cout << " is not an unparameterized construction production." << endl << "Add for example" << endl << "\t\tExample = "; this->get_source()->g_print(); if (this->get_parameters() != NULL) { cout << "("; this->get_parameters()->g_print(); cout << ")"; } cout << " ." << endl << "as your first production." << endl; } @)