From 1f8a9b3ff09249d061c9183688ddf8ffec224dd6 Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Sun, 17 Aug 1997 14:29:02 +0000
Subject: [PATCH] [project @ 1997-08-17 14:29:02 by sof] removed support for
 cpp #line directives (not needed anymore)

---
 ghc/compiler/parser/hslexer.flex | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/ghc/compiler/parser/hslexer.flex b/ghc/compiler/parser/hslexer.flex
index dac635e40ca9..3b0268ca8c65 100644
--- a/ghc/compiler/parser/hslexer.flex
+++ b/ghc/compiler/parser/hslexer.flex
@@ -276,8 +276,19 @@ NL  	    	    	[\n\r]
      * Special GHC pragma rules.  Do we need a start state for interface files,
      * so these won't be matched in source files? --JSM
      */
+
 %}
 
+%{
+/* I believe the next rule is not ever matched.
+
+   The '#line ' rule is un-cool, recognising a cpp directive inside hs source.
+   Driver has now been modified to output `standard' {-# LINE ..-} pragmas
+   where possible, so the lexer should now never see cpp directives
+   like '# ' and '#line'.
+
+   -- SOF
+
 <Code,GlaExt>^"# ".*{NL}    {
     	    	    	  char tempf[FILENAME_SIZE];
 			  sscanf(yytext+1, "%d \"%[^\"]", &hslineno, tempf); 
@@ -291,6 +302,8 @@ NL  	    	    	[\n\r]
 			  new_filename(tempf); 
 			  hsplineno = hslineno; hscolno = 0; hspcolno = 0;
 			}
+*/
+%}
 
 <Code,GlaExt>"{-# LINE ".*"-}"{NL} { 
     	    	    	  /* partain: pragma-style line directive */
-- 
GitLab