Text this: An algebraic approach to compiler design