On 04/12/2016 06:45 AM, Craig Ringer wrote:
FWIW, I have previously sketched a "syntax rewriter" of sorts: a simple filter which is applied to input before the lexer even sees it.
Quite some "syntax magic" can be achieved by allowing an extension to *hook* into this functionality in order to do some rewriting; If turning one statement into several (multi-statement) is also allowed quite some serious emulation could be achieved.
I can certainly prepare a small patch for the first commitfest of 9.7 if this sounds viable.
Thanks,
/ J.L.