Add cosntructor for grammar from file.