Grammar: an exercise in lifelong learning