Changeset 7127 for src/Pugs/CodeGen.hs

Show
Ignore:
Timestamp:
09/24/05 15:28:50 (3 years ago)
Author:
iblech
Message:

* Usual svn props.
* PIL2JS: runjs.pl: Added --compile-only option, needed for new -CJS.
* Main: Added support for -CJS and unbroke -CPIR.
* Pugs.CodeGen?: Better normalization so -h looks prettier (it's "PIL", not

"Pil", for example).

* Pugs.Help: Add JS to the list of backends supported.
* pugs::hack: Accomodate for the above changes.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/CodeGen.hs

    r6250 r7127  
    2828generators :: Map String Generator 
    2929generators = Map.fromList $ 
    30     [ ("Ghc",         genGHC) 
     30    [ ("GHC",         genGHC) 
    3131    , ("Parrot",      genPIR) 
    32     , ("Pir",         genPIR) 
    33     , ("Pil",         genPIL) 
    34 --  , ("Pil2",        genPIL2) 
     32    , ("PIR",         genPIR) 
     33    , ("PIL",         genPIL) 
     34--  , ("PIL2",        genPIL2) 
    3535    , ("Perl5",       genPerl5) 
    3636    , ("Pugs",        genPugs) 
    3737    , ("Binary",      genBinary) 
    38     , ("Json",        genJSON) 
    39 --  , ("Xml",         genXML) 
     38    , ("JSON",        genJSON) 
     39--  , ("XML",         genXML) 
    4040    ] 
    4141 
     
    4444 
    4545norm :: String -> String 
    46 norm "" = "" 
    47 norm (x:xs) = toUpper x : map toLower xs 
     46norm = norm' . map toLower 
     47    where 
     48    norm' "ghc"    = "GHC" 
     49    norm' "parrot" = "Parrot" 
     50    norm' "pir"    = "PIR" 
     51    norm' "pil"    = "PIL" 
     52    -- norm' "pil2"   = "PIL2" 
     53    norm' "perl5"  = "Perl5" 
     54    norm' "pugs"   = "Pugs" 
     55    norm' "binary" = "Binary" 
     56    norm' "json"   = "JSON" 
     57    -- norm' "xml"    = "XML" 
     58    norm' x        = x 
    4859 
    4960doLookup :: String -> IO Generator