summaryrefslogtreecommitdiff
path: root/src/GF/OldParsing/ParseMCFG.hs
blob: c845a76b321159f7610def579be3dc76e6bca11a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
----------------------------------------------------------------------
-- |
-- Module      : ParseMCFG
-- Maintainer  : PL
-- Stability   : (stable)
-- Portability : (portable)
--
-- > CVS $Date: 2005/04/21 16:22:52 $ 
-- > CVS $Author: bringert $
-- > CVS $Revision: 1.2 $
--
-- Main module for MCFG parsing
-----------------------------------------------------------------------------


module GF.OldParsing.ParseMCFG (parse) where

import Data.Char (toLower)
import GF.OldParsing.Utilities
import GF.OldParsing.MCFGrammar
import qualified GF.OldParsing.ParseMCFG.Basic as PBas
import GF.Printing.PrintParser
---- import qualified MCFParserBasic2 as PBas2 -- file not found AR


parse :: (Ord n, Ord c, Ord l, Ord t,
	  Print n, Print c, Print l, Print t) => 
	 String -> MCFParser n c l t
parse str = decodeParser (map toLower str)

decodeParser "b"  = PBas.parse
---- decodeParser "c"  = PBas2.parse
decodeParser _    = decodeParser "b"