changeset 1069:757397bb9609

Fix lexing of string literals in XML; treat EError as impure in MonoReduce
author Adam Chlipala <adamc@hcoop.net>
date Sat, 12 Dec 2009 14:51:10 -0500
parents 757dbac0454d
children e933297c4e24
files src/mono_reduce.sml src/urweb.lex
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/mono_reduce.sml	Sat Dec 12 11:02:20 2009 -0500
+++ b/src/mono_reduce.sml	Sat Dec 12 14:51:10 2009 -0500
@@ -56,6 +56,7 @@
                               | 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 @@
 
       | 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
 
--- a/src/urweb.lex	Sat Dec 12 11:02:20 2009 -0500
+++ b/src/urweb.lex	Sat Dec 12 14:51:10 2009 -0500
@@ -290,7 +290,7 @@
                                        ("Expected float, received: " ^ yytext);
                                        continue ()));
 <XMLTAG> "\""         => (YYBEGIN STRING;
-			  xmlString := true;
+			  xmlString := true; strEnder := #"\"";
 			  strStart := yypos; str := []; continue ());
 
 <XMLTAG> "{"          => (YYBEGIN INITIAL;