From 6993118eab6699182738ffcbddf03731ec41e1db Mon Sep 17 00:00:00 2001 From: peb Date: Wed, 28 Apr 2004 09:37:10 +0000 Subject: peb (28/4-04): - added directory 'conversions' for grammar conversions - added some grammar printers in 'Custom.hs' - added option 'ghci' in 'Makefile' --- src/GF/UseGrammar/Custom.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/GF') 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 -- cgit v1.2.3