From: sof Date: Wed, 24 Mar 1999 08:46:04 +0000 (+0000) Subject: [project @ 1999-03-24 08:46:04 by sof] X-Git-Tag: Approximately_9120_patches~6359 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4f4d5030f04d6c314660c00cfeb9aa13639943dc;p=ghc-hetmet.git [project @ 1999-03-24 08:46:04 by sof] Pragmas, Haskell (98) report style. --- 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);