W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > January 1997

Re: Production 21 (and others)

From: Gavin Nicol <gtn@ebt.com>
Date: Wed, 29 Jan 1997 10:24:26 -0500
Message-Id: <199701291524.KAA00565@nathaniel.ebt>
To: U35395@UICVM.UIC.EDU
CC: w3c-sgml-wg@www10.w3.org
Michael has the rule for comments:

   "<!--*"([-*]|("-"("*""-"?)*[-*])|(("*""-"?)+[-*]))*("*"|"-*")+"-->"

using flex as a test lexer, I tried the following successfully.

   "<!--*"([^*]|("*"[^-])|("*-"[^-])|("*--"[^>]))*"*-->" 

I used the following as test data:

  <!--**-->
  <!--* I am a comment *-->
  <!--* * *- *-- *-->
  <!--* * -* --* --*> *-->
  <!--*
     -- This is a big ugly comment -- 
     *-- This is a big ugly comment --*
     --* This is a big ugly comment *--
     <--* This is a big ugly comment *--->
     <--* This is a big ugly comment *->
  *-->
Received on Wednesday, 29 January 1997 10:26:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:07 UTC