summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar/Custom.hs
diff options
context:
space:
mode:
authorpeb <unknown>2004-04-28 09:37:10 +0000
committerpeb <unknown>2004-04-28 09:37:10 +0000
commit6993118eab6699182738ffcbddf03731ec41e1db (patch)
treeaf15a552881185002592cc9aa8fcbbf95cb7ed1d /src/GF/UseGrammar/Custom.hs
parent1bd3dc8433b433cae6937a246045f9e4cbb8bf73 (diff)
peb (28/4-04):
- added directory 'conversions' for grammar conversions - added some grammar printers in 'Custom.hs' - added option 'ghci' in 'Makefile'
Diffstat (limited to 'src/GF/UseGrammar/Custom.hs')
-rw-r--r--src/GF/UseGrammar/Custom.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs
index 8cde78c59..03e66837d 100644
--- a/src/GF/UseGrammar/Custom.hs
+++ b/src/GF/UseGrammar/Custom.hs
@@ -37,6 +37,10 @@ import Morphology
-- the cf parsing algorithms
import ChartParser -- or some other CF Parser
+-- grammar conversions -- peb 19/4-04
+-- see also customGrammarPrinter
+import ConvertGrammar
+
import MoreCustom -- either small/ or big/. The one in Small is empty.
import UseIO
@@ -162,6 +166,13 @@ customGrammarPrinter =
,(strCI "canonOpt",showCanonOpt "Lang" . stateGrammarST)
-}
-- add your own grammar printers here
+-- grammar conversions, (peb)
+ ,(strCI "gfc_show", show . grammar2canon . stateGrammarST)
+ ,(strCI "gfc_raw", prRaw . stateGrammarST)
+ ,(strCI "mcfg", prMCFG . convertCanonToMCFG . stateGrammarST)
+ ,(strCI "mcfg_cf", prCF . convertCanonToCF . stateGrammarST)
+ ,(strCI "mcfg_canon", prCanon . convertCanonToMCFG . stateGrammarST)
+ ,(strCI "mcfg_raw", prRaw . convertCanonToMCFG . stateGrammarST)
--- also include printing via grammar2syntax!
]
++ moreCustomGrammarPrinter