From 81d2f8a9de4b6f17ca5ee00d984c07fecc98f67f Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 2 Feb 2004 10:49:20 +0000 Subject: [PATCH] [project @ 2004-02-02 10:49:20 by simonmar] Accept '-}' at the end of a LINE pragma, in addition to '#-}', for compatibility with GHC <= 4.08(!). --- ghc/compiler/parser/Lexer.x | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/parser/Lexer.x b/ghc/compiler/parser/Lexer.x index 05537a9..e83bf94 100644 --- a/ghc/compiler/parser/Lexer.x +++ b/ghc/compiler/parser/Lexer.x @@ -159,7 +159,9 @@ $white_no_nl+ ; -- {-# LINE "" #-} $digit+ { set_line line_prag2a } \" [$graphic \ ]* \" { set_file line_prag2b } - "#-}" { pop } + "#-}"|"-}" { pop } + -- NOTE: accept -} at the end of a LINE pragma, for compatibility + -- with older versions of GHC which generated these. <0,glaexts> { "{-#" $whitechar* (SPECIALI[SZ]E|speciali[sz]e) -- 1.7.10.4