Changeset 7866 for src/Pugs/CodeGen.hs

Show
Ignore:
Timestamp:
11/06/05 01:28:07 (3 years ago)
Author:
autrijus
Message:

* New compiler backend targets around PIL2:

./pugs -C PIL2-Perl5
./pugs -C PIL2-JSON
./pugs -C PIL2-Binary

The dash is optional (all nonalphanum is dropped), and
it's case insensitive. Eventually these will replace
the PIL1 variants when our p5/js codegens finishes the
migration.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/CodeGen.hs

    r7843 r7866  
    1414import Pugs.Internals 
    1515import Pugs.CodeGen.PIL1 (genPIL1) 
    16 import Pugs.CodeGen.PIL2 (genPIL2) 
     16import Pugs.CodeGen.PIL2 (genPIL2, genPIL2Perl5, genPIL2Binary, genPIL2JSON) 
    1717import Pugs.CodeGen.PIR (genPIR) 
    1818import Pugs.CodeGen.Perl5 (genPerl5) 
     
    3333    , ("PIL1",        genPIL1) 
    3434    , ("PIL2",        genPIL2) 
     35    , ("PIL2-Perl5",  genPIL2Perl5) 
     36    , ("PIL2-JSON",   genPIL2JSON) 
     37    , ("PIL2-Binary", genPIL2Binary) 
    3538    , ("Perl5",       genPerl5) 
    3639    , ("Pugs",        genPugs) 
     
    4447 
    4548norm :: String -> String 
    46 norm = norm' . map toLower 
     49norm = norm' . map toLower . filter isAlphaNum 
    4750    where 
    4851    norm' "ghc"    = "GHC" 
     
    5356    norm' "pil2"   = "PIL2" 
    5457    norm' "perl5"  = "Perl5" 
     58    norm' "pil2perl5"  = "PIL2-Perl5" 
     59    norm' "pil2json"   = "PIL2-JSON" 
     60    norm' "pil2binary" = "PIL2-Binary" 
    5561    norm' "pugs"   = "Pugs" 
    5662    norm' "binary" = "Binary"