Next in thread → Next in month →

[relax-ng] Re: [relax-ng-comment] Compact Syntax: Annotation elementwith both attributes and text content

From
James Clark <>
Date
2002-11-06T06:00:23+00:00
ID
008001c28550$631120e0$
Thread
[relax-ng] Re: [relax-ng-comment] Compact Syntax: Annotation elementwith both attributes and text content
> Though there are some problems (which may not
> be real world problems):
>
> Both
>
> x:meta [ id="1" ]
> [x:desc [ "the start pattern" ]]
> start = ...
>
> and
>
> x:meta [ id="1" ][]
> [x:desc [ "the start pattern" ]]
> start = ...
>
> would be allowed but would render quite different annotations.

I think that's a serious problem.  The annotation syntax is very delicate.
Perhaps a better solution is simply to introduce an explicit string
concatenation operator in place of the current implicit concatenation of
adjacent string literals.  Confusion would be minimized by choosing an
operator character that is not currently used at all. I believe Perl 6 is
currently using ~ as a string concatenation operator, and I think this would
work fine for us.  Another possibility would be ^.  I think this can be done
with little likelihood of introducing any unforeseen problems, which is an
important factor at this late stage.

James
Next in thread → Next in month →