Grammar ideal