comparison 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
comparison
equal deleted inserted replaced
1283:b04354e24d1b 1284:43ca083678f8
171 cid = [A-Z][A-Za-z0-9_]*; 171 cid = [A-Z][A-Za-z0-9_]*;
172 ws = [\ \t\012]; 172 ws = [\ \t\012];
173 intconst = [0-9]+; 173 intconst = [0-9]+;
174 realconst = [0-9]+\.[0-9]*; 174 realconst = [0-9]+\.[0-9]*;
175 notags = [^<{\n(]+; 175 notags = [^<{\n(]+;
176 xcom = ([^-]|(-[^-]))+;
176 oint = [0-9][0-9][0-9]; 177 oint = [0-9][0-9][0-9];
177 xint = x[0-9a-fA-F][0-9a-fA-F]; 178 xint = x[0-9a-fA-F][0-9a-fA-F];
178 179
179 %% 180 %%
180 181
204 205
205 <COMMENT> "(*" => (enterComment (pos yypos); 206 <COMMENT> "(*" => (enterComment (pos yypos);
206 continue ()); 207 continue ());
207 <COMMENT> "*)" => (exitComment (); 208 <COMMENT> "*)" => (exitComment ();
208 continue ()); 209 continue ());
210
211 <XML> "<!--" {xcom} "-->" => (continue ());
209 212
210 <STRING,CHAR> "\\\"" => (str := #"\"" :: !str; continue()); 213 <STRING,CHAR> "\\\"" => (str := #"\"" :: !str; continue());
211 <STRING,CHAR> "\\'" => (str := #"'" :: !str; continue()); 214 <STRING,CHAR> "\\'" => (str := #"'" :: !str; continue());
212 <STRING,CHAR> "\\n" => (str := #"\n" :: !str; continue()); 215 <STRING,CHAR> "\\n" => (str := #"\n" :: !str; continue());
213 <STRING,CHAR> "\\\\" => (str := #"\\" :: !str; continue()); 216 <STRING,CHAR> "\\\\" => (str := #"\\" :: !str; continue());