Add missing functions in the grammar2 API.