generate.py now takes a filename as a commandline argument; grammar_test is the test data