1
0
forked from GitHub/gf-core

grammar printing options in gf3 and gfc

This commit is contained in:
aarne
2007-11-09 00:21:57 +00:00
parent 5e0e82250e
commit 91415f7ad0
4 changed files with 45 additions and 10 deletions

14
src/GF/Devel/PrintGFCC.hs Normal file
View File

@@ -0,0 +1,14 @@
module GF.Devel.PrintGFCC where
import GF.GFCC.DataGFCC (GFCC,printGFCC)
import GF.Devel.GFCCtoHaskell
import GF.Devel.GFCCtoJS
-- top-level access to code generation
prGFCC :: String -> GFCC -> String
prGFCC printer gr = case printer of
"haskell" -> grammar2haskell gr
"haskell_gadt" -> grammar2haskellGADT gr
"js" -> gfcc2js gr
_ -> printGFCC gr