- yyin = fopen(file, "r");
- if (yyin == NULL)
- xbt_die("Failed to open automaton file `%s': %s", file, strerror(errno));
- yyparse();
+ xbt_automaton_parser_in = fopen(file, "r");
+ xbt_assert(xbt_automaton_parser_in != NULL, "Failed to open automaton file `%s': %s", file, strerror(errno));
+ xbt_automaton_parser_parse();
+ fclose(xbt_automaton_parser_in);