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

Comparing trunk/OOPSE-2.0/src/io/parse_tree.c (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2263 by tim, Wed Jul 13 15:54:00 2005 UTC

# Line 51 | Line 51 | int mol_index; // keeps track of the number of molecul
51   #endif
52  
53   void walk_down( struct node_tag* the_node, struct namespc the_namespc );
54 < int mol_index; // keeps track of the number of molecules
55 < int comp_index; // keeps track of the number of components.
54 > int mol_index; /* keeps track of the number of molecules*/
55 > int comp_index; /* keeps track of the number of components.*/
56  
57   /*
58   * This is the parse tree function that is called by the yacc
# Line 71 | Line 71 | void pt_me( struct node_tag* head_node ){
71      simError();
72   #ifdef IS_MPI
73      mpiInterfaceExit();
74 < #endif //is_mpi
74 > #endif /*is_mpi*/
75    }
76  
77    global_namespc.index = 0;
# Line 80 | Line 80 | void pt_me( struct node_tag* head_node ){
80    mol_index = 0;
81    comp_index = 0;
82    walk_down( head_node->next_stmt, global_namespc );
83 <  // closed global namespace and exit
83 >  /* closed global namespace and exit*/
84  
85   }
86  
# Line 106 | Line 106 | void walk_down( struct node_tag* the_node, struct name
106  
107      if( the_node->stmt_list != NULL ){
108  
109 <      // the statement is a block node of some sort
109 >      /* the statement is a block node of some sort*/
110        
111        switch( the_node->type ){
112  
# Line 238 | Line 238 | void walk_down( struct node_tag* the_node, struct name
238      
239      else{
240        
241 <      // the node is a statement
241 >      /* the node is a statement */
242  
243        switch( the_node->type ){
244  
245        case MEMBERS_STMT:
246          switch( the_namespc.type ){
247 <        case BOND_HEAD: // fall through
248 <        case BEND_HEAD: // fall through
247 >        case BOND_HEAD: /* fall through*/
248 >        case BEND_HEAD: /* fall through*/
249          case TORSION_HEAD:
250          case RIGIDBODY_HEAD:
251 <        case CUTOFFGROUP_HEAD: // same for the first four
251 >        case CUTOFFGROUP_HEAD: /* same for the first four*/
252            init_members( the_node, the_namespc );
253            break;
254  
# Line 262 | Line 262 | void walk_down( struct node_tag* the_node, struct name
262  
263        case CONSTRAINT_STMT:
264          switch( the_namespc.type ){
265 <        case BOND_HEAD: // fall through
266 <        case BEND_HEAD: // fall through
267 <        case TORSION_HEAD: // same for the first three
265 >        case BOND_HEAD: /* fall through*/
266 >        case BEND_HEAD: /* fall through*/
267 >        case TORSION_HEAD: /* same for the first three*/
268            init_constraint( the_node, the_namespc );
269            break;
270  
# Line 306 | Line 306 | void walk_down( struct node_tag* the_node, struct name
306        }
307      }
308      
309 <    // recurse down to the next node
309 >    /* recurse down to the next node*/
310  
311      walk_down( the_node->next_stmt, the_namespc );
312    }
313  
314 <  // send an end of block signal
314 >  /* send an end of block signal*/
315    else end_of_block();
316    
317 <  // we're done
317 >  /* we're done*/
318   }
319  
320  
# Line 465 | Line 465 | void print_tree_error( struct node_tag* err_node, char
465    simError();
466   #ifdef IS_MPI
467    mpiInterfaceExit();
468 < #endif //is_mpi
468 > #endif /*is_mpi*/
469  
470   }
471  
# Line 482 | Line 482 | void kill_tree( struct node_tag* the_node ){
482      
483      if( the_node->stmt_list != NULL ){
484  
485 <      // the statement is a block node of some sort
485 >      /* the statement is a block node of some sort*/
486        
487        kill_tree( the_node->stmt_list );
488      }
489      
490      else{
491        
492 <      // the node is a statement
492 >      /* the node is a statement */
493  
494        switch( the_node->type ){
495  
# Line 509 | Line 509 | void kill_tree( struct node_tag* the_node ){
509          break;
510        
511        default:
512 <        // nothing to do here, everyone else can be freed normally.
512 >        /* nothing to do here, everyone else can be freed normally.*/
513          break;
514        }
515      }
516      
517 <    // recurse down to the next node
517 >    /* recurse down to the next node*/
518  
519      kill_tree( the_node->next_stmt );
520      free( the_node );    
521    }
522  
523 <  // we're done
523 >  /* we're done*/
524   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines