--- trunk/OOPSE/libBASS/parse_tree.c 2003/03/21 17:42:12 378 +++ trunk/OOPSE/libBASS/parse_tree.c 2003/09/25 19:27:15 787 @@ -144,6 +144,20 @@ void walk_down( struct node_tag* the_node, struct name } else{ init_torsion( the_node->index ); + current_namespc.index = the_node->index; + current_namespc.type = the_node->type; + walk_down( the_node->stmt_list, current_namespc ); + } + break; + + case ZCONSTRAINT_HEAD: + if( the_namespc.type != GLOBAL_HEAD ){ + print_tree_error( the_node, + "The Zconstraint block is not in " + "the global namespace" ); + } + else{ + init_zconstraint( the_node->index ); current_namespc.index = the_node->index; current_namespc.type = the_node->type; walk_down( the_node->stmt_list, current_namespc ); @@ -217,16 +231,6 @@ void walk_down( struct node_tag* the_node, struct name init_orientation( the_node, the_namespc ); break; - case START_INDEX_STMT: - if( the_namespc.type != COMPONENT_HEAD ){ - print_tree_error( the_node, - "start_index statement is not located in an " - "component block" ); - } - - //init_start_index( the_node, the_namespc ); - break; - default: print_tree_error( the_node, "unrecognized statement" ); break; @@ -300,7 +304,14 @@ void print_tree_error( struct node_tag* err_node, char err_node->index, err_msg ); break; - + + case ZCONSTRAINT_HEAD: + sprintf( painCave.errMsg, + "Parse tree error: Zconstraint head node error [%d] -> %s\n", + err_node->index, + err_msg ); + break; + case MEMBER_STMT: sprintf( painCave.errMsg, "Parse tree error: member node error => ( %d, %d, %d, %d )\n" @@ -373,13 +384,6 @@ void print_tree_error( struct node_tag* err_node, char err_msg ); break; - case START_INDEX_STMT: - sprintf( painCave.errMsg, - "Parse tree error: start_index error -> %s\n", - err_msg ); - break; - - default: sprintf( painCave.errMsg, "Parse tree error: unknown node type -> %s\n", @@ -402,12 +406,7 @@ void kill_tree( struct node_tag* the_node ){ void kill_tree( struct node_tag* the_node ){ - // These two are needed to get rid of the integer list - struct integer_list_tag* current_il; - struct integer_list_tag* temp_il; - - if( the_node != NULL ){ if( the_node->stmt_list != NULL ){ @@ -431,17 +430,6 @@ void kill_tree( struct node_tag* the_node ){ free( the_node->the_data.asmt.identifier ); break; - case START_INDEX_STMT: - - current_il = the_node->the_data.il_head; - while( current_il != NULL ){ - temp_il = current_il->next; - free( current_il ); - current_il = temp_il; - } - the_node->the_data.il_head = NULL; - break; - default: // nothing to do here, everyone else can be freed normally. break;