[wg-camlp4] Meta Programming from the view of the implementaion
Török Edwin
edwin+ml-ocaml at etorok.net
Thu Jan 31 14:27:50 GMT 2013
On 01/31/2013 04:02 PM, Leo White wrote:
> On Jan 31 2013, Török Edwin wrote:
>
>> On 01/31/2013 03:56 PM, Leo White wrote:
>>>> What do you think of this syntax:
>>>> {:lid|...|lid:}
>>>
>>> What about nested uses of the same quotation?
>>>
>>
>> Handled like nested comments, assuming the lexer knows where the anti-quotations are.
>
> An assumption that I really don't think we should make. It involves forcing a particular style of anti-quotation on all extensions. Besides it is easier to simply use a syntax that supports unique
> delimiters.
>
Even without a defined syntax for anti-quotations you could detect both {:lid| and |lid:} inside quotations:
{:foo| something $
{:foo| something-else |foo:}
...$ ...
|foo:}
But I agree that this might be confusing for users, and introduce unnnecesary limitation on what you can use inside a quotation, so
your user-defined delimiter is probably a better idea.
Best regards,
--Edwin
More information about the wg-camlp4
mailing list