ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/parse_tree.c
(Generate patch)

Comparing:
branches/mmeineke/OOPSE/libBASS/parse_tree.c (file contents), Revision 377 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
trunk/OOPSE/libBASS/parse_tree.c (file contents), Revision 854 by mmeineke, Thu Nov 6 19:24:31 2003 UTC

# Line 1 | Line 1
1   #include <stdlib.h>
2   #include <stdio.h>
3  
4 < #include <parse_tree.h>
5 < #include <simError.h>
4 > #include "parse_tree.h"
5 > #include "simError.h"
6  
7   #ifdef IS_MPI
8   #define __is_lex__
9 < #include <mpiBASS.h>
9 > #include "mpiBASS.h"
10   #endif
11  
12   void walk_down( struct node_tag* the_node, struct namespc the_namespc );
# Line 149 | Line 149 | void walk_down( struct node_tag* the_node, struct name
149            walk_down( the_node->stmt_list, current_namespc );
150          }
151          break;
152 +      
153 +      case ZCONSTRAINT_HEAD:
154 +        if( the_namespc.type != GLOBAL_HEAD ){
155 +          print_tree_error( the_node,
156 +                            "The Zconstraint block is not in "
157 +                            "the global namespace" );
158 +        }
159 +        else{
160 +          init_zconstraint( the_node->index );
161 +          current_namespc.index = the_node->index;
162 +          current_namespc.type = the_node->type;
163 +          walk_down( the_node->stmt_list, current_namespc );
164 +        }
165 +        break;
166          
167        default:
168          print_tree_error( the_node, "Not a valid code block" );
# Line 217 | Line 231 | void walk_down( struct node_tag* the_node, struct name
231          init_orientation( the_node, the_namespc );
232          break;
233  
220      case START_INDEX_STMT:
221        if( the_namespc.type != COMPONENT_HEAD ){
222          print_tree_error( the_node,
223                            "start_index statement is not located in an "
224                            "component block" );
225        }
226        
227        //init_start_index( the_node, the_namespc );
228        break;
229
234        default:
235          print_tree_error( the_node, "unrecognized statement" );
236          break;
# Line 300 | Line 304 | void print_tree_error( struct node_tag* err_node, char
304               err_node->index,
305               err_msg );
306      break;
307 <    
307 >  
308 >  case ZCONSTRAINT_HEAD:
309 >    sprintf( painCave.errMsg,
310 >             "Parse tree error: Zconstraint head node error [%d] -> %s\n",
311 >             err_node->index,
312 >             err_msg );
313 >    break;
314 >
315    case MEMBER_STMT:
316      sprintf( painCave.errMsg,
317               "Parse tree error: member node error => ( %d, %d, %d, %d )\n"
# Line 373 | Line 384 | void print_tree_error( struct node_tag* err_node, char
384               err_msg );
385      break;
386  
376  case START_INDEX_STMT:
377    sprintf( painCave.errMsg,
378             "Parse tree error: start_index error -> %s\n",
379             err_msg );
380    break;
381
382
387    default:
388      sprintf( painCave.errMsg,
389               "Parse tree error: unknown node type -> %s\n",
# Line 402 | Line 406 | void kill_tree( struct node_tag* the_node ){
406    
407   void kill_tree( struct node_tag* the_node ){
408    
405  // These two are needed to get rid of the integer list
409  
407  struct integer_list_tag* current_il;
408  struct integer_list_tag* temp_il;
409
410
410    if( the_node != NULL ){
411      
412      if( the_node->stmt_list != NULL ){
# Line 431 | Line 430 | void kill_tree( struct node_tag* the_node ){
430          free( the_node->the_data.asmt.identifier );
431          break;
432  
434      case START_INDEX_STMT:
435        
436        current_il = the_node->the_data.il_head;
437        while( current_il != NULL ){
438          temp_il = current_il->next;
439          free( current_il );
440          current_il = temp_il;
441        }
442        the_node->the_data.il_head = NULL;
443        break;
444
433        default:
434          // nothing to do here, everyone else can be freed normally.
435          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines