anchor.diff:              "to `ACE'.\nType `quit;' to exit to the main loop.");
       fi;
     until l<>fail;
  +  StandardizeTable(l);
     return l;
   end));
  
positive.code: ACEinfo.version:=ACEinfo.version{
                           [ACEinfo.file+1..Position(ACEinfo.version,' ',ACEinfo.file)-1]};
  
  Print("  Loading the `ACE' share package version ",PACKAGES_VERSIONS.ace,"\n");
  Print("  Using ACE binary version ",ACEinfo.version,"\n");
  
  BindGlobal("CallACE",function(fgens,grels,fsgens)
    local j,k,n,nums,i,DoWords,infile,l,ind,p,gens,w,tab,a,redir,flag;
    n:=Length(fgens);
    if ForAny(fgens,i->NumberSyllables(i)<>1 or ExponentSyllable(i,1)<>1) then
      Error("wrong fgens");
    fi;
    nums:=List(fgens,i->GeneratorSyllable(i,1));
    IsSSortedList(nums); # force sort flag
    PrintTo(ACEinfo.infile,"ENUM:G\nGR:");
    gens:=[];
    for i in [1..n] do
      w:=WordAlp(CHARS_LALPHA,i);
      Add(gens,w);
      AppendTo(ACEinfo.infile,w);
      if i<n then
        AppendTo(ACEinfo.infile,",");
      fi;
    od;
    AppendTo(ACEinfo.infile,";\nREL:");
  
    DoWords:=function(w)
      local i,j,m,e,n;
  
negative.code:       for j in [1..m] do
          n:=Position(nums,GeneratorSyllable(w[i],j));
          e:=ExponentSyllable(w[i],j);
          AppendTo(infile,WordAlp(CHARS_LALPHA,n));
          if e<>1 then
            AppendTo(infile,"^",e);
          fi;
          if j<m then
            AppendTo(infile,"*");
          fi;
        od;
        if i<Length(w) then
          AppendTo(infile,",");
        fi;
      od;
    end;
  
    DoWords(grels);
  
    AppendTo(infile,";\nSUBG:H\nGEN:");
    DoWords(fsgens);
    AppendTo(infile,";\n");
  
    # now do the options
  
    ParseBooleanOption:=function(arg)
      a:=ValueOption(arg[1]);
      if a=true then
        if Length(arg)>1 then
  	AppendTo(infile,arg[2],";\n");
        else
  	AppendTo(infile,arg[1],";\n");
        fi;
      elif a=false then
        if Length(arg)>2 then
  	AppendTo(infile,arg[3],";\n");
        fi;
      fi;
    end;
  
    ParseValueOption:=function(arg)
      a:=ValueOption(arg[1]);
      if a<>fail then
        if IsBool(a) then
  	PopOptions();
          Error("Option ",arg[1]," needs a value");
        fi;
        AppendTo(infile,arg[Length(arg)],":",String(a),";\n");
      fi;
    end;
  
    # first the strategies
    ParseBooleanOption("default");
    ParseBooleanOption("easy");
    ParseBooleanOption("hard");
    ParseBooleanOption("hlt");
    ParseBooleanOption("purec");
    ParseBooleanOption("purer");
    ParseBooleanOption("felsch0","felsch:0");
    ParseBooleanOption("felsch1","felsch:1");
    ParseBooleanOption("sims1","sims:1");
    ParseBooleanOption("sims3","sims:3");
    ParseBooleanOption("sims5","sims:5");
    ParseBooleanOption("sims7","sims:7");
    ParseBooleanOption("sims9","sims:9");
  
    # now the modifying options
    ParseBooleanOption("asis","asis:1","asis:0");
    ParseValueOption("ct");
    ParseValueOption("rt");
    ParseValueOption("number");
    ParseBooleanOption("mendelsohn","mend:1","mend:0");
    ParseValueOption("fill");
    ParseValueOption("pmode");
    ParseValueOption("psize");
    ParseBooleanOption("norow","row:0","row:1");
    ParseValueOption("look");
    ParseValueOption("dmode");
    ParseValueOption("dsize");
  
    # Technical options
    ParseValueOption("workspace");
    ParseValueOption("rtime","time");
    ParseValueOption("maxdef","max");
  
    # Info Stuff
    ParseValueOption("aep");
    a:=ValueOption("rep");
    if a<>fail then
      if IsInt(a) then
        AppendTo(infile,"rep:",a,";\n");
      elif IsList(a) then
        AppendTo(infile,"rep:",a[1],",",a[2],";\n");
      fi;
    fi;
  
    a:=ValueOption("mess");
    if a<>fail then
      if IsInt(a) and (a<-1 or a>1) then
        AppendTo(infile,"MESS:",a,";\n");
      fi;
      redir:="";
    else
      redir:="> temp";
    fi;
  
    a:=ValueOption("messfile");
    if a<>fail then
      AppendTo(infile,"AO:",a,";\n");
      redir:="> temp";
    fi;
  
    AppendTo(infile,"END\n");
  
    if infile<>ACEinfo.infile then
      # we only wanted to write an input file
      return;
    fi;
  
    AppendTo(ACEinfo.infile,"AO:",ACEinfo.outfile);
    AppendTo(ACEinfo.infile,";\nPR;\n");
    Exec(Concatenation("cd ",Filename(ACEinfo.tmpdir,""),"; ",
            ACEinfo.binary," <ein ",redir));
  
    infile:=InputTextFile(ACEinfo.outfile);
    l:=ReadLine(infile);
  
    # skip some header until the ` coset ' line
    while l<>fail and l{[1..6]}<>" coset" do
      l:=ReadLine(infile);
    od;
  
    if l=fail then
      PopOptions();
      Error("no output from ACE?");
    fi;
  
    # get the indices
    ind:=[];
    p:=0;
    i:=9;
    while i<Length(l) do
      while i<Length(l) and l[i] in " \n" do
        i:=i+1;
  