ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/BASS_parse/BASS.y
(Generate patch)

Comparing trunk/mdtools/BASS_parse/BASS.y (file contents):
Revision 131 by chuckv, Wed Oct 9 22:29:40 2002 UTC vs.
Revision 163 by mmeineke, Tue Nov 5 22:04:42 2002 UTC

# Line 49 | Line 49
49   #include "node_list.h"
50   #include "make_nodes.h"
51   #include "parse_tree.h"
52 + #include "../headers/simError.h"
53   #ifdef IS_MPI
54   #define __is_lex__
55 < #include "../headers/mpiInterface.h"
55 > #include "../headers/mpiBASS.h"
56   #endif
57  
58   extern int yylineno;
# Line 231 | Line 232 | int yyerror( char *err_msg ){
232  
233   int yyerror( char *err_msg ){
234  
235 <  fprintf( stderr, "yacc parse error in %s at line %d: %s\n", yyfile_name->my_name, yylineno, err_msg );
236 < #ifdef IS_MPI
237 <  mpiInterfaceExit();
238 < #endif
238 <  exit(8);
235 >  sprintf( painCave.errMsg, "yacc parse error in %s at line %d: %s\n",
236 >           yyfile_name->my_name, yylineno, err_msg );
237 >  painCave.isFatal = 1;
238 >  simError();
239    return 0;
240   }
241  
# Line 255 | Line 255 | void yacc_BASS( char* file_name ){
255  
256    in_file = fopen( file_name, "r" );
257    if( in_file == NULL ){
258 <    fprintf( stderr, "yacc error: couldn't open file =>%s\n", file_name );
259 <    exit(0);
258 >    sprintf( painCave.errMsg, "yacc error: couldn't open file =>%s\n",
259 >             file_name );
260 >    painCave.isFatal = 1;
261 >    simError();
262    }
263  
264 <  yyfile_name = (struct filename_list*)malloc( sizeof( struct filename_list ) );
264 >  yyfile_name =
265 >    (struct filename_list*)malloc( sizeof( struct filename_list ) );
266    yyfile_name->next = NULL;
267    strcpy( yyfile_name->my_name, file_name );
268    change_in_file( in_file );
269    
270    yyparse();
271 +  
272 + #ifdef IS_MPI
273 +  strcpy( checkPointMsg, "yyParse successful." );
274 +  MPIcheckPoint();
275 +  painCave.isEventLoop = 1;
276 + #endif // is_mpi
277 +  
278    fclose( in_file );
279    kill_lists();
280    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines