From 4f4d5030f04d6c314660c00cfeb9aa13639943dc Mon Sep 17 00:00:00 2001 From: sof <unknown> 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 037bee49c31d..c18335b64541 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); } +<Code,GlaExt>"{-#"{WS}*"speciali"[sz]e { + PUSH_STATE(UserPragma); + RETURN(SPECIALISE_UPRAGMA); + } <Code,GlaExt>"{-#"{WS}*"INLINE" { PUSH_STATE(UserPragma); RETURN(INLINE_UPRAGMA); } +<Code,GlaExt>"{-#"{WS}*"inline" { + PUSH_STATE(UserPragma); + RETURN(INLINE_UPRAGMA); + } <Code,GlaExt>"{-#"{WS}*"NOINLINE" { PUSH_STATE(UserPragma); RETURN(NOINLINE_UPRAGMA); } +<Code,GlaExt>"{-#"{WS}*"notInline" { + PUSH_STATE(UserPragma); + RETURN(NOINLINE_UPRAGMA); + } <Code,GlaExt>"{-#"{WS}*"MAGIC_UNFOLDING" { PUSH_STATE(UserPragma); RETURN(MAGIC_UNFOLDING_UPRAGMA); @@ -353,7 +365,7 @@ NL [\n\r] RETURN(SOURCE_UPRAGMA); } -<Code,GlaExt>"{-#"{WS}*[A-Z_]+ { +<Code,GlaExt>"{-#"{WS}*[a-zA-Z_]+ { fprintf(stderr, "%s:%d: Warning: Unrecognised pragma '", input_filename, hsplineno); format_string(stderr, (unsigned char *) yytext, yyleng); -- GitLab