Text this: Attribute grammar Inversion and Source-to-source Translation