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 118 by chuckv, Wed Sep 25 22:51:14 2002 UTC vs.
Revision 157 by mmeineke, Tue Oct 29 21:48:25 2002 UTC

# Line 49 | Line 49
49   #include "node_list.h"
50   #include "make_nodes.h"
51   #include "parse_tree.h"
52 < #ifdef MPI
53 < #include "../headers/mpiInterface.h"
52 > #include "../headers/simError.h"
53 > #ifdef IS_MPI
54 > #define __is_lex__
55 > #include "../headers/mpiBASS.h"
56   #endif
57  
58   extern int yylineno;
# Line 230 | 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 MPI
237 <  mpiInterfaceExit();
238 < #endif
237 <  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 254 | 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 );

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines