[wg-camlp4] Pending issues

Romain Bardou romain.bardou at inria.fr
Tue Feb 12 11:42:39 GMT 2013


Hello,

> 3. Quotations
>
> The more I think about it, the more I believe this concept is orthogonal
> to "extensions". Leo disagrees and would like to have a combined syntax
> for the case where the argument of an extension is a quotation. What do
> other people think? (For me, a quotation is only a way to introduce a
> string literal without "suffering" from the lexical conventions of OCaml.)
>
> For the concrete syntax of quotations, it was suggested to use a form
> where the closing delimiter would be defined by the opening one. This
> makes it possible to "quote" an arbitrary string without having to
> define a way to escape a potential occurrence of the closing delimiter
> (just pick a different one). Example: {xxx{blablabla}xxx}
>
> Do people familiar with implementation of editor modes believe it will
> be easy to support such syntax in emacs or vim modes?

I agree it is orthogonal and about the "string literal" aspect, *if* you 
do not want antiquotations.

Melt has a rather complex variation on quotations. There is an emacs 
mode and a vim mode. I think the emacs mode handles quotations. I don't 
know if the vim mode does. But the emacs mode can be very slow on big files.

However without antiquotations I think it should not be too hard, 
because it can be written as a regexp (using a group to repeat the "xxx").

I didn't follow the list close enough to know whether the consensus is 
to have antiquotations or not…

Cheers,

-- 
Romain Bardou


More information about the wg-camlp4 mailing list