parsec: Also use parsers (like trifecta)

This saves a lot of duplication and also makes it easier
to keep the parsec and trifecta versions of the parser in sync.