protected void edgeStmt(StreamTokenizer tk, final int nindex) throws Exception { tk.nextToken();  GraphEdge e=null; if(tk.ttype=='>') { tk.nextToken(); if(tk.ttype=='{') { while(true) { tk.nextToken(); if(tk.ttype=='}') break; else { nodeID(tk); e = new GraphEdge(nindex, m_nodes.indexOf( new GraphNode(tk.sval, null) ), DIRECTED); if( m_edges!=null && !(m_edges.contains(e)) ) { m_edges.addElement( e );   } } } } else { nodeID(tk); e = new GraphEdge(nindex, m_nodes.indexOf( new GraphNode(tk.sval, null) ), DIRECTED); if( m_edges!=null && !(m_edges.contains(e)) ) { m_edges.addElement( e );   } } } else if(tk.ttype=='-') { System.err.println("Error at line "+tk.lineno()+". Cannot deal with undirected edges"); if(tk.ttype==tk.TT_WORD) tk.pushBack(); return; } else { System.err.println("Error at line "+tk.lineno()+" in edgeStmt"); if(tk.ttype==tk.TT_WORD) tk.pushBack(); return; }  tk.nextToken();  if(tk.ttype=='[') edgeAttrib(tk, e); else tk.pushBack();
protected void edgeStmt(StreamTokenizer tk, final int nindex) throws Exception { tk.nextToken();  GraphEdge e=null; if(tk.ttype=='>') { tk.nextToken(); if(tk.ttype=='{') { while(true) { tk.nextToken(); if(tk.ttype=='}') break; else { nodeID(tk); e = new GraphEdge(nindex, m_nodes.indexOf( new GraphNode(tk.sval, null) ), DIRECTED); if( m_edges!=null && !(m_edges.contains(e)) ) { m_edges.addElement( e );     } } } } else { nodeID(tk); e = new GraphEdge(nindex, m_nodes.indexOf( new GraphNode(tk.sval, null) ), DIRECTED); if( m_edges!=null && !(m_edges.contains(e)) ) { m_edges.addElement( e );    } }
    protected void edgeStmt(StreamTokenizer tk, final int nindex) throws Exception {	tk.nextToken();	GraphEdge e=null;	if(tk.ttype=='>') {	    tk.nextToken();	    if(tk.ttype=='{') {		while(true) {		    tk.nextToken();		    if(tk.ttype=='}')			break;		    else {			nodeID(tk);			e = new GraphEdge(nindex, m_nodes.indexOf( new GraphNode(tk.sval, null) ), DIRECTED);			if( m_edges!=null && !(m_edges.contains(e)) ) {			    m_edges.addElement( e );			    //System.out.println("Added edge from "+((GraphNode)(m_nodes.elementAt(nindex))).ID+" to "+			    //		       ((GraphNode)(m_nodes.elementAt(e.dest))).ID);  			}				    }		}	    }	    else {		nodeID(tk);		e = new GraphEdge(nindex, m_nodes.indexOf( new GraphNode(tk.sval, null) ), DIRECTED);		if( m_edges!=null && !(m_edges.contains(e)) ) {		    m_edges.addElement( e );		    //System.out.println("Added edge from "+((GraphNode)(m_nodes.elementAt(nindex))).ID+" to "+		    //		       ((GraphNode)(m_nodes.elementAt(e.dest))).ID);  		}	    }	}	else if(tk.ttype=='-') { 	    System.err.println("Error at line "+tk.lineno()+". Cannot deal with undirected edges"); 	    if(tk.ttype==tk.TT_WORD)		tk.pushBack(); 	    return; 	}	else { 	    System.err.println("Error at line "+tk.lineno()+" in edgeStmt"); 	    if(tk.ttype==tk.TT_WORD)		tk.pushBack(); 	    return;	}	tk.nextToken();		if(tk.ttype=='[')	    edgeAttrib(tk, e);	else 	    tk.pushBack();    }