Nesting and grammar