added filetest and output the grammar to a file, also added the empty symbol