summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-12 14:51:10 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-12 14:51:10 -0500
commit0a168e5f39165bd9e462813866c9a25dc2d6b688 (patch)
tree4c48413e12978d861257f204e8849034f2447c07
parent84e471e64566698a5489810836b6ec80824d3e46 (diff)
Fix lexing of string literals in XML; treat EError as impure in MonoReduce
-rw-r--r--src/mono_reduce.sml3
-rw-r--r--src/urweb.lex2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml
index a15ce34b..f29117cf 100644
--- a/src/mono_reduce.sml
+++ b/src/mono_reduce.sml
@@ -56,6 +56,7 @@ fun simpleImpure (tsyms, syms) =
| ERecv _ => true
| ESleep _ => true
| ENamed n => IS.member (syms, n)
+ | EError _ => true
| ERel n =>
let
val (_, t, _) = E.lookupERel env n
@@ -96,7 +97,7 @@ fun impure (e, _) =
| ECase (e, pes, _) => impure e orelse List.exists (fn (_, e) => impure e) pes
- | EError (e, _) => impure e
+ | EError _ => true
| EReturnBlob {blob = e1, mimeType = e2, ...} => impure e1 orelse impure e2
| ERedirect (e, _) => impure e
diff --git a/src/urweb.lex b/src/urweb.lex
index 4e572009..b6916cb9 100644
--- a/src/urweb.lex
+++ b/src/urweb.lex
@@ -290,7 +290,7 @@ notags = [^<{\n]+;
("Expected float, received: " ^ yytext);
continue ()));
<XMLTAG> "\"" => (YYBEGIN STRING;
- xmlString := true;
+ xmlString := true; strEnder := #"\"";
strStart := yypos; str := []; continue ());
<XMLTAG> "{" => (YYBEGIN INITIAL;