Mercurial > urweb
comparison src/urweb.lex @ 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 | 10114d7b7477 |
children | 26197c957ad6 |
comparison
equal
deleted
inserted
replaced
1068:757dbac0454d | 1069:757397bb9609 |
---|---|
288 SOME x => Tokens.FLOAT (x, yypos, yypos + size yytext) | 288 SOME x => Tokens.FLOAT (x, yypos, yypos + size yytext) |
289 | NONE => (ErrorMsg.errorAt' (yypos, yypos) | 289 | NONE => (ErrorMsg.errorAt' (yypos, yypos) |
290 ("Expected float, received: " ^ yytext); | 290 ("Expected float, received: " ^ yytext); |
291 continue ())); | 291 continue ())); |
292 <XMLTAG> "\"" => (YYBEGIN STRING; | 292 <XMLTAG> "\"" => (YYBEGIN STRING; |
293 xmlString := true; | 293 xmlString := true; strEnder := #"\""; |
294 strStart := yypos; str := []; continue ()); | 294 strStart := yypos; str := []; continue ()); |
295 | 295 |
296 <XMLTAG> "{" => (YYBEGIN INITIAL; | 296 <XMLTAG> "{" => (YYBEGIN INITIAL; |
297 pushLevel (fn () => YYBEGIN XMLTAG); | 297 pushLevel (fn () => YYBEGIN XMLTAG); |
298 Tokens.LBRACE (yypos, yypos + 1)); | 298 Tokens.LBRACE (yypos, yypos + 1)); |