Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/660568cac9b342aaeb4e7dcc694d730828671362 >--------------------------------------------------------------- commit 660568cac9b342aaeb4e7dcc694d730828671362 Author: Simon Marlow <[email protected]> Date: Mon Oct 10 10:40:00 2011 +0100 fix panic in string-gap lexing (#5425) >--------------------------------------------------------------- compiler/parser/Lexer.x | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index ea575fe..43be73f 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -1206,7 +1206,7 @@ lex_string s = do | Just ('&',i) <- next -> do setInput i; lex_string s | Just (c,i) <- next, c <= '\x7f' && is_space c -> do - -- is_space only works for <= '\x7f' (#3751) + -- is_space only works for <= '\x7f' (#3751, #5425) setInput i; lex_stringgap s where next = alexGetChar' i @@ -1222,7 +1222,8 @@ lex_stringgap s = do c <- getCharOrFail i case c of '\\' -> lex_string s - c | is_space c -> lex_stringgap s + c | c <= '\x7f' && is_space c -> lex_stringgap s + -- is_space only works for <= '\x7f' (#3751, #5425) _other -> lit_error i _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
