[wg-camlp4] My uses of syntax extension
Gerd Stolpmann
info at gerd-stolpmann.de
Mon Jan 28 20:28:27 GMT 2013
Am 28.01.2013 18:07:02 schrieb(en) Leo White:
>> You would probably want to have "$$" => "$" to escape it, and
>> something similar for "<:" and ">>".
>>
>> I think you have two sets of alternative levels, i.e. "even" and
>> "odd" levels, $...$ can only appear in "even" levels, and
>> <:...<...>> in "odd" levels, so you only need to escape delimiters
>> in the levels where they can appear, no ?
>
> I think it would be better to leave parsing anti-quotations to the
> quotations themselves, rather than forcing everyone to use $...$. For
> many situations $...$ is much more heavyweight syntax than necessary.
Typographically, $ is a mistake.
Look for something lighter, and it is probably application-dependent
what the best alternative is. E.g. for my XML preprocessor
(http://projects.camlcity.org/projects/dl/pxp-1.2.3/doc/manual/html/ref/Intro_preprocessor.html)
I used (: ... :) for anti-quotations.
I second Leo's idea to leave it to the preprocessor.
Gerd
> _______________________________________________
> wg-camlp4 mailing list
> wg-camlp4 at lists.ocaml.org
> http://lists.ocaml.org/listinfo/wg-camlp4
>
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany gerd at gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
More information about the wg-camlp4
mailing list