Re: Production 21 (and others)

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