Title: A grammar of endings