summaryrefslogtreecommitdiff
path: root/src/GF/Devel/PrintGFCC.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Devel/PrintGFCC.hs')
-rw-r--r--src/GF/Devel/PrintGFCC.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/GF/Devel/PrintGFCC.hs b/src/GF/Devel/PrintGFCC.hs
new file mode 100644
index 000000000..462c175c7
--- /dev/null
+++ b/src/GF/Devel/PrintGFCC.hs
@@ -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