[project @ 2004-02-02 10:49:20 by simonmar]
[ghc-hetmet.git] / ghc / compiler / parser / Lexer.x
index 05537a9..e83bf94 100644 (file)
@@ -159,7 +159,9 @@ $white_no_nl+                               ;
 --    {-# LINE <line> "<file>" #-}
 <line_prag2> $digit+                   { set_line line_prag2a }
 <line_prag2a> \" [$graphic \ ]* \"     { set_file line_prag2b }
-<line_prag2b> "#-}"                    { pop }
+<line_prag2b> "#-}"|"-}"               { 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)