X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fparser%2FLexer.x;h=952196af7560716ed9ea300e02d86b05b45eb5b6;hb=fb8bf8536a4b72b59cb7a3fc26c5787f3b80348d;hp=c813e3614546de7bf3589944dc5d5e5509a66a8b;hpb=230db59e57cb21a80f727b139bd619ef26eb020b;p=ghc-hetmet.git diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index c813e36..952196a 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -70,11 +70,9 @@ import Util ( maybePrefixMatch, readRational ) import Control.Monad import Data.Bits -import Data.Char ( chr, ord, isSpace ) +import Data.Char import Data.Ratio import Debug.Trace - -import Unicode ( GeneralCategory(..), generalCategory, isPrint, isUpper ) } $unispace = \x05 -- Trick Alex into handling Unicode. See alexGetChar. @@ -261,6 +259,7 @@ $tab+ { warn Opt_WarnTabs (text "Tab character") } { token ITgenerated_prag } "{-#" $whitechar* (CORE|core) { token ITcore_prag } "{-#" $whitechar* (UNPACK|unpack) { token ITunpack_prag } + "{-#" $whitechar* (ANN|ann) { token ITann_prag } -- We ignore all these pragmas, but don't generate a warning for them -- CFILES is a hugs-only thing. @@ -490,6 +489,7 @@ data Token | ITgenerated_prag | ITcore_prag -- hdaume: core annotations | ITunpack_prag + | ITann_prag | ITclose_prag | IToptions_prag String | ITinclude_prag String