diff src/urweb.lex @ 1284:43ca083678f8

HTML comments
author Adam Chlipala <adam@chlipala.net>
date Tue, 10 Aug 2010 14:52:33 -0400
parents b04354e24d1b
children 514be09d5018
line wrap: on
line diff
--- a/src/urweb.lex	Tue Aug 10 14:44:26 2010 -0400
+++ b/src/urweb.lex	Tue Aug 10 14:52:33 2010 -0400
@@ -173,6 +173,7 @@
 intconst = [0-9]+;
 realconst = [0-9]+\.[0-9]*;
 notags = [^<{\n(]+;
+xcom = ([^-]|(-[^-]))+;
 oint = [0-9][0-9][0-9];
 xint = x[0-9a-fA-F][0-9a-fA-F];
 
@@ -207,6 +208,8 @@
 <COMMENT> "*)"        => (exitComment ();
 			  continue ());
 
+<XML> "<!--" {xcom} "-->" => (continue ());
+
 <STRING,CHAR> "\\\""  => (str := #"\"" :: !str; continue());
 <STRING,CHAR> "\\'"   => (str := #"'" :: !str; continue());
 <STRING,CHAR> "\\n"   => (str := #"\n" :: !str; continue());