% mkdcg [Chapter 4] Unix shell script to convert '--->' grammars to DCGs echo "%" > atomic.dcg echo "% This file made by mkdcg from lexicon.pl and psgrules.pl" >> atomic.dcg echo "%" >> atomic.dcg echo "%" `date` >> atomic.dcg echo "%" >> atomic.dcg echo "% *** DO NOT EDIT THIS FILE ***" >> atomic.dcg echo "%" >> atomic.dcg sed s/---\>/--\>/ < psgrules.pl | fgrep -v " %" | fgrep -v "op(" | fgrep -v "initial(s)" >> atomic.dcg sed s/---\>/--\>/ < lexicon.pl | fgrep -v " %" | fgrep -v "op(" >> atomic.dcg echo "%" > features.dcg echo "% This file made by mkdcg from flexicon.pl and fsgrules.pl" >> features.dcg echo "%" >> features.dcg echo "%" `date` >> features.dcg echo "%" >> features.dcg echo "% *** DO NOT EDIT THIS FILE ***" >> features.dcg echo "%" >> features.dcg sed s/---\>/--\>/ < fsgrules.pl | fgrep -v " %" | fgrep -v "op(255" | fgrep -v "initial(s)" >> features.dcg sed s/---\>/--\>/ < flexicon.pl | fgrep -v " %" | fgrep -v "op(" >> features.dcg echo "test(String) :- s(String,[])." >> features.dcg cat fxamples.pl | fgrep -v " %" >> features.dcg