summaryrefslogtreecommitdiff
path: root/src/lacweb.lex
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-10 15:04:32 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-10 15:04:32 -0400
commit81a4a8171274586428288bd7e75ea6721ca56e27 (patch)
tree7f4e2dbcd67a12d31a44d95d39c31ebe92328033 /src/lacweb.lex
parent4a72cb276ab63dc4d00222f191160eda6b342ec5 (diff)
Initial HTML attributes support
Diffstat (limited to 'src/lacweb.lex')
-rw-r--r--src/lacweb.lex7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lacweb.lex b/src/lacweb.lex
index 8a57dba9..4856bdf2 100644
--- a/src/lacweb.lex
+++ b/src/lacweb.lex
@@ -143,7 +143,10 @@ notags = [^<{\n]+;
<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 @@ notags = [^<{\n]+;
continue ()));
<XMLTAG> "\"" => (YYBEGIN STRING;
xmlString := true;
- strStart := yypos; str := []; continue());
+ strStart := yypos; str := []; continue ());
<XMLTAG> "{" => (YYBEGIN INITIAL;
pushLevel (fn () => YYBEGIN XMLTAG);