# This script reduces the AceWiki DCG grammar in a way that it keeps all its
# complexity but loses some syntactic sugar. The reduced grammar is used for
# regression testing.
#
# Author: Tobias Kuhn

cat dcg.pl |
grep -v "\[who\]" |
grep -v "\['is not'\]" |
grep -v "\['are not'\]" |
grep -v "\['or that'\]" |
grep -v "\['and that'\]" |
grep -v "\['at least'\]" |
grep -v "\['at most'\]" |
grep -v "\['less than'\]" |
grep -v "\['more than'\]" |
grep -v "\[somebody\]" |
grep -v "\[everybody\]" |
grep -v "\[nobody\]" |
grep -v "\[an\]" > dcg_r.pl
