#! /bin/csh -f

set usage = "$0 < INFILE.grx > OUTFILE.grx"

# Reads a grammar file, that must contain a "# Data-File:" directive.
# Applies parse-and-tally to that grammar, outputs the 
# grammar with adjusted counts, preceded by the error messages if any.

cat | parse-and-tally -v maxderivs=1 -v countprec=2 -v ignorecounts=1 > /tmp/$$
cat /tmp/$$
/bin/rm -f /tmp/$$