Machinery for building unified parsers and unparsers on top of Prisms