                 else if ((result = l.match(re1)) != null)
                     found = 1;
                 if (found) {
-                    var derived = result[1];
-                    var base = stripNamespaces(result[2]);
-                    all_lines.push(new LineInfo(derived,base,found==2,fn,i+1));
+                    var first_base;
+                    var derived;
+                    var extra_bases = [];
+                    if (found == 2) {
+                        derived = result[1];
+                        first_base = result[2]
+                    } else if (found == 1) {
+                        result = l.match(re_inheritance_line);
+                        derived = result[1];
+                        var bases_text = result[2];
+                        result = bases_text.match(re_first_base_class);
+                        var first_base = result[1];
+                        bases_text = result[2];
+                        while (result = bases_text.match(re_next_base_class)) {
+                            extra_bases.push(stripNamespaces(result[1]));
+                            bases_text = result[2];
+                        }
+                        if (bases_text.match(re_no_next_base_class_on_this_line)) {
+                            print(fn+":"+(i+1)+" WARNING: base class list of "+
+                                  derived+" has trailing comma without name.");
+                            // throw new Error("trailing comma without name.");
+                        }
+                    }
+                    var base = stripNamespaces(first_base);
+                    all_lines.push(new LineInfo(derived,base,found==2,extra_bases, fn,i+1));
                 }
             }
             else if (!ignore && l.indexOf("~") != -1) {

    var derived;            // name of the class being defined
    var base;               // name of its base class
    var isExact;            // true iff the class is exactly traced
    var filename;           // file where we found the definition of 'derived'
    var lineno;             // line where we found the definition of 'derived'
    var baseref = null;     // reference to the LineInfo for the base class

    print("  E - at least one of the definitions is exactly traced");
    print("  M - multiple definitions in the tree (in different namespaces or nested within classes)");
    print("  # - continuation line for M with additional locations");
    print("  m - at least one of the definitions has > 1 base.");
    print("  X - definitions of the same name exist outside the tree");
    print("  @ - continuation line for @ with locations");
    print("");
