diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-06-02 19:28:25 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-06-02 19:28:25 -0400 |
commit | a144d74a7fb416108f643daaa3a734e416683737 (patch) | |
tree | 426b37ee6b714afc0a597600850846d73c9d41a7 /src/urweb.lex | |
parent | 1fd04be40e1f4885753a269b898d1bd11d24672d (diff) |
Lexing some more string escape sequences; JS versions of number read; fix problem with signature unification; escape < more often in Jscomp
Diffstat (limited to 'src/urweb.lex')
-rw-r--r-- | src/urweb.lex | 17 |
1 files changed, 9 insertions, 8 deletions
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]+; <COMMENT> "*)" => (if exitComment () then YYBEGIN INITIAL else (); continue ()); -<INITIAL> "#\"" => (YYBEGIN CHAR; strEnder := #"\""; strStart := pos yypos; str := []; continue()); -<CHAR> "\\\"" => (str := #"\"" :: !str; continue()); -<CHAR> "\\'" => (str := #"'" :: !str; continue()); -<CHAR> "\n" => (newline yypos; +<STRING,CHAR> "\\\"" => (str := #"\"" :: !str; continue()); +<STRING,CHAR> "\\'" => (str := #"'" :: !str; continue()); +<STRING,CHAR> "\\n" => (str := #"\n" :: !str; continue()); +<STRING,CHAR> "\\t" => (str := #"\t" :: !str; continue()); +<STRING,CHAR> "\n" => (newline yypos; str := #"\n" :: !str; continue()); + +<INITIAL> "#\"" => (YYBEGIN CHAR; strEnder := #"\""; strStart := pos yypos; str := []; continue()); + <CHAR> . => (let val ch = String.sub (yytext, 0) in @@ -220,10 +224,7 @@ notags = [^<{\n]+; <INITIAL> "\"" => (YYBEGIN STRING; strEnder := #"\""; strStart := pos yypos; str := []; continue()); <INITIAL> "'" => (YYBEGIN STRING; strEnder := #"'"; strStart := pos yypos; str := []; continue()); -<STRING> "\\\"" => (str := #"\"" :: !str; continue()); -<STRING> "\\'" => (str := #"'" :: !str; continue()); -<STRING> "\n" => (newline yypos; - str := #"\n" :: !str; continue()); + <STRING> . => (let val ch = String.sub (yytext, 0) in |