From a144d74a7fb416108f643daaa3a734e416683737 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 2 Jun 2009 19:28:25 -0400 Subject: Lexing some more string escape sequences; JS versions of number read; fix problem with signature unification; escape < more often in Jscomp --- src/urweb.lex | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/urweb.lex') diff --git a/src/urweb.lex b/src/urweb.lex index b2f715d5..c23dfe62 100644 --- a/src/urweb.lex +++ b/src/urweb.lex @@ -193,11 +193,15 @@ notags = [^<{\n]+; "*)" => (if exitComment () then YYBEGIN INITIAL else (); continue ()); - "#\"" => (YYBEGIN CHAR; strEnder := #"\""; strStart := pos yypos; str := []; continue()); - "\\\"" => (str := #"\"" :: !str; continue()); - "\\'" => (str := #"'" :: !str; continue()); - "\n" => (newline yypos; + "\\\"" => (str := #"\"" :: !str; continue()); + "\\'" => (str := #"'" :: !str; continue()); + "\\n" => (str := #"\n" :: !str; continue()); + "\\t" => (str := #"\t" :: !str; continue()); + "\n" => (newline yypos; str := #"\n" :: !str; continue()); + + "#\"" => (YYBEGIN CHAR; strEnder := #"\""; strStart := pos yypos; str := []; continue()); + . => (let val ch = String.sub (yytext, 0) in @@ -220,10 +224,7 @@ notags = [^<{\n]+; "\"" => (YYBEGIN STRING; strEnder := #"\""; strStart := pos yypos; str := []; continue()); "'" => (YYBEGIN STRING; strEnder := #"'"; strStart := pos yypos; str := []; continue()); - "\\\"" => (str := #"\"" :: !str; continue()); - "\\'" => (str := #"'" :: !str; continue()); - "\n" => (newline yypos; - str := #"\n" :: !str; continue()); + . => (let val ch = String.sub (yytext, 0) in -- cgit v1.2.3