home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / plbin.zip / pl / src / defatom.awk < prev    next >
Text File  |  1993-02-18  |  412b  |  15 lines

  1. BEGIN    { atom = functor = 0;
  2.     }
  3. /^#/    { next;
  4.     }
  5. /^A/    { printf "#define ATOM_%-12s (&atoms[%d])\n",$2,atom  > "pl-atom.ih"
  6.       printf "{ (Atom)NULL, ATOM_TYPE, %s },\n",$3  > "pl-atom.ic"
  7.       atom++;
  8.       next;
  9.     }
  10. /^F/    { name = $2 $3;
  11.       printf "#define FUNCTOR_%-12s (&functors[%d])\n",name,functor > "pl-funct.ih"
  12.       printf "{ (FunctorDef)NULL, FUNCTOR_TYPE, ATOM_%s, %d },\n",$2,$3 > "pl-funct.ic"
  13.       functor++;
  14.     }
  15.