[project @ 1996-01-18 16:33:17 by partain]
[ghc-hetmet.git] / ghc / compiler / yaccParser / hslexer.flex
index 902f3bd..0e3fb70 100644 (file)
@@ -387,6 +387,14 @@ NL                         [\n\r]
                              PUSH_STATE(UserPragma);
                              RETURN(ABSTRACT_UPRAGMA);
                            }
+<Code,GlaExt>"{-#"{WS}*[A-Z_]+ {
+                             fprintf(stderr, "Warning: \"%s\", line %d: Unrecognised pragma '",
+                               input_filename, hsplineno);
+                             format_string(stderr, (unsigned char *) yytext, yyleng);
+                             fputs("'\n", stderr);
+                             nested_comments = 1;
+                             PUSH_STATE(Comment);
+                           }
 <UserPragma>"#-}"          { POP_STATE; RETURN(END_UPRAGMA); }
 
 %{