diff src/lacweb.lex @ 104:b1e5398a7f30

Initial HTML attributes support
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 15:04:32 -0400
parents f0f59e918cac
children 813e5a52063d
line wrap: on
line diff
--- a/src/lacweb.lex	Thu Jul 10 14:14:23 2008 -0400
+++ b/src/lacweb.lex	Thu Jul 10 15:04:32 2008 -0400
@@ -143,7 +143,10 @@
 
 <INITIAL> "\""        => (YYBEGIN STRING; strStart := pos yypos; str := []; continue());
 <STRING> "\\\""       => (str := #"\"" :: !str; continue());
-<STRING> "\""         => (YYBEGIN INITIAL;
+<STRING> "\""         => (if !xmlString then
+			  (xmlString := false; YYBEGIN XMLTAG)
+			  else
+			  YYBEGIN INITIAL;
 			  Tokens.STRING (String.implode (List.rev (!str)), !strStart, pos yypos + 1));
 <STRING> "\n"         => (newline yypos;
 			  str := #"\n" :: !str; continue());
@@ -196,7 +199,7 @@
                                        continue ()));
 <XMLTAG> "\""         => (YYBEGIN STRING;
 			  xmlString := true;
-			  strStart := yypos; str := []; continue());
+			  strStart := yypos; str := []; continue ());
 
 <XMLTAG> "{"          => (YYBEGIN INITIAL;
 			  pushLevel (fn () => YYBEGIN XMLTAG);