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

Comparing trunk/OOPSE/libBASS/parse_tree.c (file contents):
Revision 674 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
Revision 675 by mmeineke, Mon Aug 11 19:38:44 2003 UTC

# 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 431 | Line 435 | void kill_tree( struct node_tag* the_node ){
435          free( the_node->the_data.asmt.identifier );
436          break;
437  
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
438        default:
439          // nothing to do here, everyone else can be freed normally.
440          break;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines