diff options
| author | peb <unknown> | 2005-04-12 09:49:44 +0000 |
|---|---|---|
| committer | peb <unknown> | 2005-04-12 09:49:44 +0000 |
| commit | fa6ba9a5318640778040e86268e9003216f3636e (patch) | |
| tree | fdbafb9713893bfb978d3c18f0fc7fc778bc763e /src/GF/UseGrammar/Custom.hs | |
| parent | 5f25c828178281ed8f8b77abc0b599d740c797b0 (diff) | |
"Committed_by_peb"
Diffstat (limited to 'src/GF/UseGrammar/Custom.hs')
| -rw-r--r-- | src/GF/UseGrammar/Custom.hs | 46 |
1 files changed, 12 insertions, 34 deletions
diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs index 7e8fe9162..519413af5 100644 --- a/src/GF/UseGrammar/Custom.hs +++ b/src/GF/UseGrammar/Custom.hs @@ -5,9 +5,9 @@ -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date: 2005/04/11 13:53:39 $ +-- > CVS $Date: 2005/04/12 10:49:45 $ -- > CVS $Author: peb $ --- > CVS $Revision: 1.51 $ +-- > CVS $Revision: 1.52 $ -- -- A database for customizable GF shell commands. -- @@ -84,6 +84,7 @@ import qualified GF.Printing.PrintParser as Prt --import qualified GF.Conversion.SimpleToMCFG as S2M --import GF.Conversion.FromGFC import qualified GF.Infra.Print as Prt2 +import qualified GF.Conversion.GFC as Cnv import GFC import qualified MkGFC as MC @@ -255,39 +256,16 @@ customGrammarPrinter = ,(strCI "gfc", GFC.showGFC . stateGrammarST) ,(strCI "canonOpt",showCanonOpt "Lang" . stateGrammarST) -} + -- add your own grammar printers here --- grammar conversions, (peb) --- ,(strCI "gfc_show", show . grammar2canon . stateGrammarST) - ,(strCI "mcfg-old", Prt.prt . CnvOld.mcfg . statePInfoOld) - ,(strCI "cfg-old", Prt.prt . CnvOld.cfg . statePInfoOld) --- ,(strCI "mcfg_show", show . CnvOld.mcfg . statePInfoOld) --- ,(strCI "cfg_show", show . CnvOld.cfg . statePInfoOld) --- hack for printing finiteness of grammar categories: --- ,(strCI "finiteness", Prt.prtAfter "\n" . Assoc.aAssocs . CnvOld.fintypes . statePInfoOld) --- ,(strCI "finite", prCanon . Fin.convertGrammar . stateGrammarST) --- ,(strCI "simpleMCF", (\sg -> Prt.prt $ MCFSimp.convertGrammar "nondet" $ --- Simp.convertGrammar (stateGrammarST sg, cncId sg))) --- ,(strCI "simpleGFC", (\sg -> Prt.prt $ Simp.convertGrammar (stateGrammarST sg, cncId sg))) --- ,(strCI "finiteSimple", (\sg -> Prt.prt $ FinSimp.convertGrammar $ --- Simp.convertGrammar (stateGrammarST sg, cncId sg))) ---- also include printing via grammar2syntax! --- ,(strCI "g2s", (\sg -> Prt2.prt $ G2S.convertGrammar (stateGrammarST sg, cncId sg))) --- ,(strCI "g2s2m", (\sg -> Prt2.prt $ S2M.convertGrammar "nondet" $ --- G2S.convertGrammar (stateGrammarST sg, cncId sg))) - ,(strCI "mcfg", Prt2.prt . stateMCFG) - ,(strCI "cfg", Prt2.prt . stateCFG) -{- - ,(strCI "simple", Prt2.prt . convertToSimple "" . stateGrammarLang) - ,(strCI "mcfg-nondet", Prt2.prt . convertToMCFG "" "nondet" . stateGrammarLang) - ,(strCI "mcfg-strict", Prt2.prt . convertToMCFG "" "strict" . stateGrammarLang) - ,(strCI "cfg-nondet", Prt2.prt . convertToCFG "" "nondet" . stateGrammarLang) - ,(strCI "cfg-strict", Prt2.prt . convertToCFG "" "strict" . stateGrammarLang) - ,(strCI "fin-simple", Prt2.prt . convertToSimple "fin" . stateGrammarLang) - ,(strCI "fin-mcfg-nondet", Prt2.prt . convertToMCFG "fin" "nondet" . stateGrammarLang) - ,(strCI "fin-mcfg-strict", Prt2.prt . convertToMCFG "fin" "strict" . stateGrammarLang) - ,(strCI "fin-cfg-nondet", Prt2.prt . convertToCFG "fin" "nondet" . stateGrammarLang) - ,(strCI "fin-cfg-strict", Prt2.prt . convertToCFG "fin" "strict" . stateGrammarLang) --} +-- grammar conversions: + ,(strCI "mcfg", Prt2.prt . stateMCFG) + ,(strCI "cfg", Prt2.prt . stateCFG) +-- obsolete, or only for testing: + ,(strCI "simple", Prt2.prt . Cnv.gfc2simple . stateGrammarLang) + ,(strCI "finite", Prt2.prt . Cnv.simple2finite . Cnv.gfc2simple . stateGrammarLang) + ,(strCI "mcfg-old", Prt.prt . CnvOld.mcfg . statePInfoOld) + ,(strCI "cfg-old", Prt.prt . CnvOld.cfg . statePInfoOld) ] customMultiGrammarPrinter = |
