Hacker News new | ask | show | jobs
by JoeAltmaier 1778 days ago
These kind of translators are fun. Long ago I wrote a PL/M (Intel proprietary compiler)- to - C convertor. It used context to translate the simple looping constructs of PL/M to the most congenial C loop (for, do, while). It translated the single macro mechanism into either 'const foo=x', simple #define or #define with arguments. It moved declarations into context. What it produced looked like C, not 'C/LM'.

It can be a blast to tinker with these, iterating until the output looks pretty sweet. One of my favorite projects. I can imagine the docx - to - css translation allowed for lots of neat tricks.