* requires pushing back whatever was previously read.
* There probably is a right way of doing this.
*/
-void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile;}
+void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile; graphType = 0;}
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
[\000-\040\177] /* ignore whitespace */
"node" return(T_node); /* see tokens in agcanonstr */
"edge" return(T_edge);
-"graph" graphType = T_graph; return(T_graph);
-"digraph" graphType = T_digraph; return(T_digraph);
+"graph" if (!graphType) graphType = T_graph; return(T_graph);
+"digraph" if (!graphType) graphType = T_digraph; return(T_digraph);
"strict" return(T_strict);
"subgraph" return(T_subgraph);
"->" if (graphType == T_digraph) return(T_edgeop); else return ('-');
* requires pushing back whatever was previously read.
* There probably is a right way of doing this.
*/
-void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile;}
+void aglexinit(Agdisc_t *disc, void *ifile) { Disc = disc; Ifile = ifile; graphType = 0;}
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
[ \t\r] /* ignore whitespace */
"node" return(T_node); /* see tokens in agcanonstr */
"edge" return(T_edge);
-"graph" graphType = T_graph; return(T_graph);
-"digraph" graphType = T_digraph; return(T_digraph);
+"graph" if (!graphType) graphType = T_graph; return(T_graph);
+"digraph" if (!graphType) graphType = T_digraph; return(T_digraph);
"strict" return(T_strict);
"subgraph" return(T_subgraph);
"->" if (graphType == T_digraph) return(T_edgeop); else return('-');