mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 10:49:33 -06:00
*** empty log message ***
This commit is contained in:
@@ -37,7 +37,7 @@ import GrammarToHaskell
|
||||
|
||||
-- the cf parsing algorithms
|
||||
import ChartParser -- or some other CF Parser
|
||||
import qualified ParseCFviaCFG as PCF
|
||||
import qualified ParseCF as PCF
|
||||
--import qualified ParseGFCviaCFG as PGFC
|
||||
--import NewChartParser
|
||||
--import NewerChartParser
|
||||
@@ -177,12 +177,12 @@ customGrammarPrinter =
|
||||
-- add your own grammar printers here
|
||||
-- grammar conversions, (peb)
|
||||
,(strCI "gfc_show", show . grammar2canon . stateGrammarST)
|
||||
-- ,(strCI "tnf", prCanon . Cnv.convertCanonToTNF . stateGrammarST)
|
||||
,(strCI "emcfg", Prt.prt . Cnv.convertCanonToEMCFG . stateGrammarST)
|
||||
,(strCI "emcfg_cf", Prt.prt . Cnv.convertCanonViaEMCFGtoCFG . stateGrammarST)
|
||||
,(strCI "mcfg", Prt.prt . Cnv.convertCanonToMCFG . stateGrammarST)
|
||||
,(strCI "mcfg_cf", Prt.prt . Cnv.convertCanonToCFG . stateGrammarST)
|
||||
,(strCI "mcfg_show", show . Cnv.convertCanonToMCFG . stateGrammarST)
|
||||
,(strCI "emcfg", Prt.prt . Cnv.emcfg . statePInfo)
|
||||
,(strCI "mcfg", Prt.prt . Cnv.mcfg . statePInfo)
|
||||
,(strCI "cfg", Prt.prt . Cnv.cfg . statePInfo)
|
||||
,(strCI "emcfg_show", show . Cnv.emcfg . statePInfo)
|
||||
,(strCI "mcfg_show", show . Cnv.mcfg . statePInfo)
|
||||
,(strCI "cfg_show", show . Cnv.cfg . statePInfo)
|
||||
--- also include printing via grammar2syntax!
|
||||
]
|
||||
++ moreCustomGrammarPrinter
|
||||
|
||||
@@ -20,7 +20,7 @@ import Option
|
||||
import Custom
|
||||
import ShellState
|
||||
|
||||
import qualified ParseGFCviaCFG as N
|
||||
import qualified ParseGFC as N
|
||||
|
||||
import Operations
|
||||
|
||||
@@ -71,7 +71,7 @@ trees2trms opts sg cn as ts0 info = do
|
||||
ts1 <- return (map cf2trm0 ts0) ----- should not need annot
|
||||
mapM (checkErr . (annotate gr) . trExp) ts1 ---- complicated; often fails
|
||||
_ -> do
|
||||
(ts1,ss) <- checkErr $ mapErr postParse ts0
|
||||
(ts1,ss) <- checkErr $ mapErrN 10 postParse ts0
|
||||
if null ts1 then raise ss else return ()
|
||||
ts2 <- mapM (checkErr . annotate gr . refreshMetas [] . trExp) ts1 ----
|
||||
if forgive then return ts2 else do
|
||||
|
||||
Reference in New Issue
Block a user