update GrammarGenerator.java and remove res directory