comparison src/urweb.lex @ 1128:e1cf925e2074

Allow escaped backslashes in literals; conversion betwixt int and char
author Adam Chlipala <adamc@hcoop.net>
date Tue, 12 Jan 2010 16:09:13 -0500
parents c023bc6ab914
children c316ca3c9ec6
comparison
equal deleted inserted replaced
1127:f93dc2ea30c1 1128:e1cf925e2074
196 continue ()); 196 continue ());
197 197
198 <STRING,CHAR> "\\\"" => (str := #"\"" :: !str; continue()); 198 <STRING,CHAR> "\\\"" => (str := #"\"" :: !str; continue());
199 <STRING,CHAR> "\\'" => (str := #"'" :: !str; continue()); 199 <STRING,CHAR> "\\'" => (str := #"'" :: !str; continue());
200 <STRING,CHAR> "\\n" => (str := #"\n" :: !str; continue()); 200 <STRING,CHAR> "\\n" => (str := #"\n" :: !str; continue());
201 <STRING,CHAR> "\\\\" => (str := #"\\" :: !str; continue());
201 <STRING,CHAR> "\\t" => (str := #"\t" :: !str; continue()); 202 <STRING,CHAR> "\\t" => (str := #"\t" :: !str; continue());
202 <STRING,CHAR> "\n" => (newline yypos; 203 <STRING,CHAR> "\n" => (newline yypos;
203 str := #"\n" :: !str; continue()); 204 str := #"\n" :: !str; continue());
204 <STRING,CHAR> "\\" {oint} => (case StringCvt.scanString (Int.scan StringCvt.OCT) 205 <STRING,CHAR> "\\" {oint} => (case StringCvt.scanString (Int.scan StringCvt.OCT)
205 (String.extract (yytext, 1, NONE)) of 206 (String.extract (yytext, 1, NONE)) of