Allow users of the API to specify a parser

This gives some greater freedom to projects like flake8.