main function
Made some rule replacement strings
Replacement grammer seems to do the test input fine.