From e3e0da73ac68efd2748c321bf0796dc8faa3aba9 Mon Sep 17 00:00:00 2001 From: peb Date: Wed, 26 May 2004 18:44:40 +0000 Subject: *** empty log message *** --- src/GF/UseGrammar/Custom.hs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/GF/UseGrammar/Custom.hs') diff --git a/src/GF/UseGrammar/Custom.hs b/src/GF/UseGrammar/Custom.hs index d7cf99fa0..e5e59fc05 100644 --- a/src/GF/UseGrammar/Custom.hs +++ b/src/GF/UseGrammar/Custom.hs @@ -37,11 +37,12 @@ import GrammarToHaskell -- the cf parsing algorithms import ChartParser -- or some other CF Parser +import NewChartParser +import NewerChartParser -- grammar conversions -- peb 19/4-04 -- see also customGrammarPrinter -import qualified ConvertGrammar as CG -import TestConversions (prRaw) +import qualified ConvertGrammar as Cnv import MoreCustom -- either small/ or big/. The one in Small is empty. @@ -170,15 +171,11 @@ customGrammarPrinter = -} -- add your own grammar printers here -- grammar conversions, (peb) -{- ,(strCI "gfc_show", show . grammar2canon . stateGrammarST) - ,(strCI "gfc_raw", prRaw . stateGrammarST) - ,(strCI "tnf", prCanon . CG.convertCanonToTNF . stateGrammarST) - ,(strCI "mcfg", CG.prMCFG . CG.convertCanonToMCFG . stateGrammarST) - ,(strCI "mcfg_cf", prCF . CG.convertCanonToCFG . stateGrammarST) - ,(strCI "mcfg_canon", prCanon . CG.convertCanonToMCFG . stateGrammarST) - ,(strCI "mcfg_raw", prRaw . CG.convertCanonToMCFG . stateGrammarST) --} + ,(strCI "tnf", prCanon . Cnv.convertCanonToTNF . stateGrammarST) + ,(strCI "mcfg", Cnv.prMCFG . Cnv.convertCanonToMCFG . stateGrammarST) + ,(strCI "mcfg_cf", Cnv.prCFG . Cnv.convertCanonToCFG . stateGrammarST) + ,(strCI "mcfg_show", show . Cnv.convertCanonToMCFG . stateGrammarST) --- also include printing via grammar2syntax! ] ++ moreCustomGrammarPrinter @@ -262,6 +259,11 @@ customParser = (strCI "chart", chartParser . stateCF) -- add your own parsers here ] + -- 21/5-04, peb: + ++ [ (strCI ("new"++name), newChartParser descr . stateCF) | + (descr, names) <- newChartParserAlternatives, name <- names ] + ++ [ (strCI ("newer"++name), newerChartParser descr . stateParserInfo) | + (descr, names) <- newerChartParserAlternatives, name <- names ] ++ moreCustomParser customTokenizer = -- cgit v1.2.3