* Lexer state needs to be flushed on failure to open.
void aglexinit(Agdisc_t * disc, void *ifile);
int aaglex(void);
void aglexeof(void);
+void aglexbad(void);
/* ID management */
int agmapnametoid(Agraph_t * g, int objtype, char *str,
Disc = (disc? disc : &AgDefaultDisc);
aglexinit(Disc, chan);
yyparse();
+ if (Ag_G_global == NILgraph) aglexbad();
return Ag_G_global;
}
/* must be here to see flex's macro defns */
void aglexeof() { unput(GRAPH_EOF_TOKEN); }
+void aglexbad() { YY_FLUSH_BUFFER; }
+
#ifndef YY_CALL_ONLY_ARG
# define YY_CALL_ONLY_ARG void
#endif