From 4f4d5030f04d6c314660c00cfeb9aa13639943dc Mon Sep 17 00:00:00 2001 From: sof Date: Wed, 24 Mar 1999 08:46:04 +0000 Subject: [PATCH] [project @ 1999-03-24 08:46:04 by sof] Pragmas, Haskell (98) report style. --- ghc/compiler/parser/hslexer.flex | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/parser/hslexer.flex b/ghc/compiler/parser/hslexer.flex index 037bee4..c18335b 100644 --- a/ghc/compiler/parser/hslexer.flex +++ b/ghc/compiler/parser/hslexer.flex @@ -323,14 +323,26 @@ NL [\n\r] PUSH_STATE(UserPragma); RETURN(SPECIALISE_UPRAGMA); } +"{-#"{WS}*"speciali"[sz]e { + PUSH_STATE(UserPragma); + RETURN(SPECIALISE_UPRAGMA); + } "{-#"{WS}*"INLINE" { PUSH_STATE(UserPragma); RETURN(INLINE_UPRAGMA); } +"{-#"{WS}*"inline" { + PUSH_STATE(UserPragma); + RETURN(INLINE_UPRAGMA); + } "{-#"{WS}*"NOINLINE" { PUSH_STATE(UserPragma); RETURN(NOINLINE_UPRAGMA); } +"{-#"{WS}*"notInline" { + PUSH_STATE(UserPragma); + RETURN(NOINLINE_UPRAGMA); + } "{-#"{WS}*"MAGIC_UNFOLDING" { PUSH_STATE(UserPragma); RETURN(MAGIC_UNFOLDING_UPRAGMA); @@ -353,7 +365,7 @@ NL [\n\r] RETURN(SOURCE_UPRAGMA); } -"{-#"{WS}*[A-Z_]+ { +"{-#"{WS}*[a-zA-Z_]+ { fprintf(stderr, "%s:%d: Warning: Unrecognised pragma '", input_filename, hsplineno); format_string(stderr, (unsigned char *) yytext, yyleng); -- 1.7.10.4