[project @ 2001-04-10 13:52:31 by sewardj]
[ghc-hetmet.git] / ghc / compiler / parser / Lex.lhs
index 3ff951a..130eef8 100644 (file)
@@ -110,7 +110,7 @@ data Token
   | ITthen
   | ITtype
   | ITwhere
-  | ITscc
+  | ITscc                      -- ToDo: remove (we use {-# SCC "..." #-} now)
 
   | ITforall                   -- GHC extension keywords
   | ITforeign
@@ -123,7 +123,6 @@ data Token
   | ITccallconv
 
   | ITinterface                        -- interface keywords
-  | ITexpr
   | IT__export
   | ITdepends
   | IT__forall
@@ -165,6 +164,7 @@ data Token
   | ITrules_prag
   | ITdeprecated_prag
   | ITline_prag
+  | ITscc_prag
   | ITclose_prag
 
   | ITdotdot                   -- reserved symbols
@@ -244,6 +244,7 @@ pragmaKeywordsFM = listToUFM $
        ( "LINE",       ITline_prag ),
        ( "RULES",      ITrules_prag ),
        ( "RULEZ",      ITrules_prag ), -- american spelling :-)
+       ( "SCC",        ITscc_prag ),
        ( "DEPRECATED", ITdeprecated_prag )
        ]
 
@@ -274,7 +275,7 @@ haskellKeywordsFM = listToUFM $
        ( "then",       ITthen ),     
        ( "type",       ITtype ),     
        ( "where",      ITwhere ),
-       ( "_scc_",      ITscc )
+       ( "_scc_",      ITscc )         -- ToDo: remove
      ]
 
 isSpecial :: Token -> Bool
@@ -313,7 +314,6 @@ ghcExtensionKeywordsFM = listToUFM $
 
        -- interface keywords
         ("__interface",                ITinterface),
-        ("__expr",             ITexpr),
        ("__export",            IT__export),
        ("__depends",           ITdepends),
        ("__forall",            IT__forall),
@@ -742,7 +742,7 @@ lex_escape cont buf
                            [] -> charError buf'
 
 after_charnum cont i buf
-  = if i >= 0 && i <= 0x7FFFFFFF
+  = if i >= 0 && i <= 0x10FFFF
        then cont (fromInteger i) buf
        else charError buf