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