Implement filtering grammar

Waiting for an API for getting tasks matching a predicate and sorting.