anchor.diff:        fi;
       fi;
     od;
  +  # read the `---' line
  +  l:=ReadLine(infile);
  +
     # now read the table
     tab:=List([1..n],i->[]);
     p:=0;
     l:=ReadLine(infile);
     flag:=true;
  -  while flag and l<>fail and Length(l)>1 do
  +  while flag and l<>fail and Length(l)>1 and l[1]<>'=' do
       p:=p+1;
  -    l:=SplitString(l,""," :\n"); # remove colon, space and newline
  +    l:=SplitString(l,""," :|\n"); # remove colon, space, | and newline
       # syntax check
       if Int(l[1])=fail or Int(l[1])<>p then
  +      PopOptions();
         Error("syntax error in file");
       fi;
       for i in [1..n] do
  
positive.code:       for j in [1..m] do
          n:=Position(nums,GeneratorSyllable(w[i],j));
          e:=ExponentSyllable(w[i],j);
          AppendTo(ACEinfo.infile,WordAlp(CHARS_LALPHA,n));
          if e<>1 then
            AppendTo(ACEinfo.infile,"^",e);
          fi;
          if j<m then
            AppendTo(ACEinfo.infile,"*");
          fi;
        od;
        if i<Length(w) then
          AppendTo(ACEinfo.infile,",");
        fi;
      od;
    end;
  
    DoWords(grels);
  
    AppendTo(ACEinfo.infile,";\nSUBG:H\nGEN:");
    DoWords(fsgens);
    AppendTo(ACEinfo.infile,";\n");
  
    # now do the options
    a:=ValueOption("com");
    if IsInt(a) and a>=0 then
      AppendTo(ACEinfo.infile,"COM:",a,";\n");
    fi;
  
    a:=ValueOption("workspace");
    if IsInt(a) and a>0 then
      AppendTo(ACEinfo.infile,"WO:",a,";\n");
    fi;
  
    a:=ValueOption("max");
    if a<>fail then
      if IsList(a) then
        l:="";
        for i in [1..Length(a)] do
          Append(l,String(a[i]));
          if i<Length(a) then
            Add(l,',');
          fi;
        od;
        AppendTo(ACEinfo.infile,"MAX:",l,";\n");
      elif IsInt(a) then
        AppendTo(ACEinfo.infile,"MAX:",a,";\n");
      fi;
    fi;
  
    a:=ValueOption("ct");
    if a<>fail then
      if IsList(a) then
        l:="";
        for i in [1..Length(a)] do
          Append(l,String(a[i]));
          if i<Length(a) then
            Add(l,',');
          fi;
        od;
        AppendTo(ACEinfo.infile,"CT:",l,";\n");
      elif IsInt(a) then
        AppendTo(ACEinfo.infile,"CT:",a,";\n");
      fi;
    fi;
  
    a:=ValueOption("rt");
    if a<>fail then
      if IsList(a) then
        l:="";
        for i in [1..Length(a)] do
          Append(l,String(a[i]));
          if i<Length(a) then
            Add(l,',');
          fi;
        od;
        AppendTo(ACEinfo.infile,"RT:",l,";\n");
      elif IsInt(a) then
        AppendTo(ACEinfo.infile,"RT:",a,";\n");
      fi;
    fi;
  
    a:=ValueOption("time");
    if IsInt(a) and a>0 then
      AppendTo(ACEinfo.infile,"TI:",a,";\n");
    fi;
  
    a:=ValueOption("fill");
    if a<>fail then
      if IsList(a) then
        l:="";
        for i in [1..Length(a)] do
          Append(l,String(a[i]));
          if i<Length(a) then
            Add(l,',');
          fi;
        od;
        AppendTo(ACEinfo.infile,"FI:",l,";\n");
      elif IsInt(a) then
        AppendTo(ACEinfo.infile,"FI:",a,";\n");
      fi;
    fi;
  
    a:=ValueOption("mendelsohn");
    if a<>fail then
      AppendTo(ACEinfo.infile,"MEND:1;\n");
    fi;
    a:=ValueOption("asis");
    if a<>fail then
      AppendTo(ACEinfo.infile,"ASIS:0;\n");
    fi;
    a:=ValueOption("mess");
    if a<>fail then
      if IsInt(a) and (a<-1 or a>1) then
        AppendTo(ACEinfo.infile,"MESS:",a,";\n");
      fi;
      redir:="";
    else
      redir:="> temp";
    fi;
  
  
    AppendTo(ACEinfo.infile,"END\nAO:");
    AppendTo(ACEinfo.infile,ACEinfo.outfile);
    AppendTo(ACEinfo.infile,";\nPR: 0;\n");
    Exec(Concatenation("cd ",Filename(ACEinfo.tmpdir,""),"; ",
            ACEinfo.binary," <ein ",redir));
  
    infile:=InputTextFile(ACEinfo.outfile);
    l:=ReadLine(infile);
  
    # skip some header
    while l<>fail and l[1]<>' ' do
      l:=ReadLine(infile);
    od;
  
    if l=fail then
      Error("no output from ACE?");
    fi;
  
    # get the indices
    ind:=[];
    p:=0;
    i:=1;
    while i<Length(l) do
      while i<Length(l) and l[i] in " \n" do
        i:=i+1;
  
negative.code:             "to `ACE'.\nType `quit;' to exit to the main loop.");
      fi;
    until l<>fail;
    StandardizeTable(l);
    return l;
  end));
  