Re: Comment delimiters

Murray Maloney (murray@sco.COM)
Tue, 15 Nov 94 14:58:32 EST

Frankly, now that several people have confirmed
that the current text is correct, and speaking
as a writer, I'd leave it alone rather than
trying to explain what Dan describes below.

For that matter, I don't know that it is even
important to note that space is allowed between
the terminal -- and >. But hey, I'm sure somebody
will think it is important.

Murray

>
> In message <9411151159.aa02626@dali.scocan.sco.COM>, Murray Maloney writes:
> >>From my reading of the SGML Handbook, white space
> >would not be allowed between the -- (com) and the > (mdc).
> >See section 10.3 on pages 390-391 of the Handbook.
> >
> >However, I think that Dan wrote this sentence
> >and I trust that he has verified that it is correct.
>
> Yeah, I wrote it, and I have since found out that it
> is sort of incomplete. It describes a subset of the
> full SGML comment syntax. The relevant productions, from
> ISO8879 are:
>
> [91] comment declaration = mdo,(comment,(s|comment)*)?,mdc
> [92] comment = com,SGML character*,com
>
> In the reference concrete syntax, that's
>
> comment declaration = "<!",(comment,(s|comment)*)?,">"
> comment = "--",SGML character*,"--"
>
> so some examples are:
>
> <!>
> <! >
> <!---->
> <!---- >
> <!-- -->
> <!--<xxx>-->
> <!--<xxx>-- -- a-bc -->
> <!--<xxx>-- -- abc -- -- def -- >
>
> you get the idea?
>
> I don't know what's the best way to describe that in prose. I'll leave
> that to the writers ;-)
>
> In perl, I'd write:
>
> /<!(--([^-]|(-[^-]))*--\s*)*>/
>
>
> Dan