diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-07-10 15:04:32 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-07-10 15:04:32 -0400 |
commit | 81a4a8171274586428288bd7e75ea6721ca56e27 (patch) | |
tree | 7f4e2dbcd67a12d31a44d95d39c31ebe92328033 /src/lacweb.lex | |
parent | 4a72cb276ab63dc4d00222f191160eda6b342ec5 (diff) |
Initial HTML attributes support
Diffstat (limited to 'src/lacweb.lex')
-rw-r--r-- | src/lacweb.lex | 7 |
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); |