[wg-camlp4] Meta Programming from the view of the implementaion
Török Edwin
edwin at etorok.net
Thu Jan 31 13:45:06 GMT 2013
On 01/31/2013 03:43 PM, Török Edwin wrote:
> On 01/31/2013 03:27 PM, Hongbo Zhang wrote:
>>
>>
>> > In Fan,
>> > {:json| ... |}
>> > if "|}" is used inside,*the user (optionally) can introduce a new separator following "|" immediately*
>> > {:json|/ ... /|}
>>
>> So this would be similar to Leo's proposal but with the optional symbol on the inside, a mandatory whitespace
>> after the symbol, and no whitespace after the : right?
>> {:lid|x␣string x|}
>>
>> no whitespace, we need the *precise location*, whitespace will introduce trouble here
>> The optional *character set is limited to [/+-] (serveral more)*, only those optional characters will be recgonized.
>> so you can still write {:json|{a;b}|}
>> but {:json|/{a;b|}}/|} also works
>
> Without a whitespace how do you know if the '/' is your optional character or part of the quoted syntax?
> (unless you restrict the quoted syntax's first character to be something else than the optional characters)
>
> What do you think of this syntax:
> {:lid|...|lid:}
>
> Its still quite easy to find where quotation's bounds are, it is symmetric, and the end marker should be long enough
> to not cause false matches inside the quotation.
Forgot to add: the ending 'lid' would be optional, so one could write either:
{:lid|...|:}
{:lid|...|lid:}
--Edwin
More information about the wg-camlp4
mailing list