Extract `parser` for testing.

See #224.