Re: Simple(?) question on obscure comments detail

Sunil Mishra (smishra@cc.gatech.edu)
Thu, 19 Sep 1996 16:45:46 -0400 (EDT)


Date: Thu, 19 Sep 1996 16:45:46 -0400 (EDT)
Message-Id: <199609192045.QAA18195@cleon.cc.gatech.edu>
From: Sunil Mishra <smishra@cc.gatech.edu>
To: www-html@w3.org
In-reply-to: <R0aQy4uYOp3G089yn@htmlhelp.com> (galactus@htmlhelp.com)
Subject: Re: Simple(?) question on obscure comments detail


\\ -----BEGIN PGP SIGNED MESSAGE-----
\\ 
\\ First tried to ask on www-talk, but unfortunately no one could offer
\\ an authoritative answer yet there..
\\ 
\\ RFC 1866 defines an HTML comment tag as "<!" followed by 0 or more
\\ comments followed by ">". A comment is defined as "anything but
\\ the '--' sequence, enclosed in '--'". Now, is the following tag
\\ a valid comment?
\\ 
\\ <!-- hello--->
\\ 
\\ Should a parser accept the first '-' of the three as part of the
\\ contents, or should it barf on the "->" stuff outside the first
\\ comment?
\\ 
\\ Galactus

Intuition and the flex spec Dan Connoly had put together for the HTML
parser say the above is not a valid comment. There have to be an even
number of -- sequences within a <! and >, and the first -- has to
immediately follow the <!. There can be nothing but whitespace outside the
-- pairs.

Sunil