[wg-camlp4] My uses of syntax extension
Alain Frisch
alain at frisch.fr
Mon Jan 28 15:03:28 GMT 2013
On 01/28/2013 03:47 PM, Hongbo Zhang wrote:
> Hi Alain,
> Is there any chance to see your current work to decide how hard it
> would be to adapt p4 to your new syntax?
Which current work are you referring to? The stuff about conditional
compilation implemented on top of -ppx is there:
https://www.lexifi.com/blog/syntax-extensions-without-camlp4-lets-do-it
(I've just adapted the code to the current version of Ast_mapper.)
> Btw: do you have a clear idea how to implement ast lifting in ppx(
> the meta filter in p4) which is an essential part in
> quasi-quotation?(the stream parsers have non-trivial optimizations
> which depends on it )
Unfortunately, I'm not sure to know what quasi-quotations are (compared
to just "quotations" in camlp4 parlance).
Can you elaborate on which kinds of non-trivial optimizations in stream
parser depend on ast lifting? Compilers have implemented optimizations
based on AST rewriting for decades without going meta, and I suspect
that can probably be done for stream parser optimizations as well, but I
might be proven wrong.
Alain
More information about the wg-camlp4
mailing list