From: sof Date: Sun, 17 Aug 1997 14:29:02 +0000 (+0000) Subject: [project @ 1997-08-17 14:29:02 by sof] X-Git-Tag: Approximately_1000_patches_recorded~150 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=1f8a9b3ff09249d061c9183688ddf8ffec224dd6 [project @ 1997-08-17 14:29:02 by sof] removed support for cpp #line directives (not needed anymore) --- diff --git a/ghc/compiler/parser/hslexer.flex b/ghc/compiler/parser/hslexer.flex index dac635e..3b0268c 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 + ^"# ".*{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; } +*/ +%} "{-# LINE ".*"-}"{NL} { /* partain: pragma-style line directive */