int lineNo = 0;
boolean seenVertices = false;
boolean seenEdges = false;
Map<String,Integer> labelToVertex = new HashMap<String,Integer>();
for (String line : new LineReader(f)) {
++lineNo;
// Skip comments and blank lines
if (line.matches("\\s*%.*") || line.matches("\\s+"))
continue;
else if (line.startsWith("*vertices")) {