[wg-camlp4] Meta Programming from the view of the implementaion

Leo White lpw25 at cam.ac.uk
Wed Jan 30 11:21:55 GMT 2013


>  - The closing delimiter is defined by the opening one, so you don't 
>need any escaping convention.  (Imagine you want to write HTML code 
>containing ">>".)

As I suggested in an earlier post, it is simple to allow this for <: ... >.

>  (@sedlex) match lexbuf with
>   | {{ xml_letter+ }} -> ...
>   | {{ "with" }} -> ...
>   | ...

I suppose that it is sometimes useful to have an unnamed quotation. For 
this I think that camlp4 has "<< ... >>", so we could just allow that.

>As a side note, whatever syntax we choose for quotations / non-parsed 
>strings, we should avoid the one currently used by Camlp4, because for 
>some time, people will continue to use both Camlp4 and -ppx rewriters.

I disagree with this. It is not at all difficult to tell camlp4 to pass 
through unrecognised quotations onto the main compiler (and so to the other 
preprocessors). It would then be simple for quotation extensions to 
seamlessly switch from -pp to -ppx.



More information about the wg-camlp4 mailing list