#!/bin/sh
#
# Compare regressions: run it before and after a change in your grammar
# to see the differences in effect.
#

args="--all --diff --parser dupira --parser-args=-P1,q5,t1"
output=aaa

if [ -f lead.std ]
then
    # Lead.std already exists, compare new run with it.
    dtcompare.pl --lead lead.new.std $args < lead.std > $output
    mv lead.old.std lead.old2.std 
    mv lead.std lead.old.std 
    mv lead.new.std lead.std 
    tail -15 $output
else
    # Lead.std doesn't exist, do an initial run to create it.
    dtcompare.pl --lead lead.std $args < regression.std > $output
    tail -15 $output
fi
