#! /usr/bin/gawk -f
# Last edited on 1999-12-05 16:40:47 by stolfi

# Reads a stream of words, outputs their factorization into elements
# Must be called with "-f factor-text.gawk".

/^ *$/{next;}
/./{ $0 = factor_text($0); print; next; }

function error(msg)
{ 
  printf "line %d: %s\n", NR, msg >> "/dev/stderr";
  abort = 1;
  exit 1;
}
