Changeset 7867 for src/Pugs/CodeGen.hs
- Timestamp:
- 11/06/05 01:46:36 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/CodeGen.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/CodeGen.hs
r7866 r7867 29 29 generators = Map.fromList $ 30 30 [ ("GHC", genGHC) 31 , ("Parrot", genPIR)32 31 , ("PIR", genPIR) 33 32 , ("PIL1", genPIL1) 33 , ("PIL1-Perl5", genPerl5) 34 , ("PIL1-Binary", genBinary) 35 , ("PIL1-JSON", genJSON) 34 36 , ("PIL2", genPIL2) 35 37 , ("PIL2-Perl5", genPIL2Perl5) 36 38 , ("PIL2-JSON", genPIL2JSON) 37 39 , ("PIL2-Binary", genPIL2Binary) 38 , ("Perl5", genPerl5)39 40 , ("Pugs", genPugs) 40 , ("Binary", genBinary)41 , ("JSON", genJSON)42 41 -- , ("XML", genXML) 43 42 ] … … 50 49 where 51 50 norm' "ghc" = "GHC" 52 norm' "parrot" = " Parrot"51 norm' "parrot" = "!PIR" 53 52 norm' "pir" = "PIR" 54 norm' "pil" = " PIL1" -- XXX - this will change53 norm' "pil" = "!PIL1" 55 54 norm' "pil1" = "PIL1" 56 55 norm' "pil2" = "PIL2" 57 norm' "perl5" = "Perl5" 56 norm' "perl5" = "!PIL1-Perl5" 57 norm' "binary" = "!PIL1-Binary" 58 norm' "json" = "!PIL1-JSON" 59 norm' "pil1perl5" = "PIL1-Perl5" 60 norm' "pil1json" = "PIL1-JSON" 61 norm' "pil1binary" = "PIL1-Binary" 58 62 norm' "pil2perl5" = "PIL2-Perl5" 59 63 norm' "pil2json" = "PIL2-JSON" 60 64 norm' "pil2binary" = "PIL2-Binary" 61 65 norm' "pugs" = "Pugs" 62 norm' "binary" = "Binary"63 norm' "json" = "JSON"64 66 -- norm' "xml" = "XML" 65 67 norm' x = x 66 68 67 69 doLookup :: String -> IO Generator 68 doLookup s = Map.lookup (norm s) generators 70 doLookup s = do 71 case norm s of 72 ('!':key) -> do 73 putStrLn $ "*** The backend '" ++ s ++ "' is deprecated." 74 putStrLn $ " Please use '" ++ key ++ "' instead." 75 Map.lookup key generators 76 key -> Map.lookup key generators 69 77 70 78 codeGen :: String -> Env -> IO String
