| 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/mpiBASS.h" |
| 56 |
+ |
#endif |
| 57 |
|
|
| 58 |
|
extern int yylineno; |
| 59 |
|
|
| 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 |
< |
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 |
|
|
| 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 |
|
|