forked from GitHub/gf-core
Fixed module names and imports after giant file move.
This commit is contained in:
@@ -5,14 +5,14 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/02/18 19:21:07 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.5 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:07 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.6 $
|
||||
--
|
||||
-- context-free grammars. AR 15\/12\/1999 -- 30\/3\/2000 -- 2\/6\/2001 -- 3\/12\/2001
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module CF (-- * Types
|
||||
module GF.CF.CF (-- * Types
|
||||
CF(..), CFRule, CFRuleGroup,
|
||||
CFItem(..), CFTree(..), CFPredef, CFParser,
|
||||
RegExp(..), CFWord,
|
||||
@@ -34,13 +34,13 @@ module CF (-- * Types
|
||||
isCircularCF, predefRules
|
||||
) where
|
||||
|
||||
import Operations
|
||||
import Str
|
||||
import AbsGFC
|
||||
import GFC
|
||||
import CFIdent
|
||||
import List (nub,nubBy)
|
||||
import Char (isUpper, isLower, toUpper, toLower)
|
||||
import GF.Data.Operations
|
||||
import GF.Data.Str
|
||||
import GF.Canon.AbsGFC
|
||||
import GF.Canon.GFC
|
||||
import GF.CF.CFIdent
|
||||
import Data.List (nub,nubBy)
|
||||
import Data.Char (isUpper, isLower, toUpper, toLower)
|
||||
|
||||
-- CF grammar data types
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/04/20 12:49:45 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.11 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:08 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.12 $
|
||||
--
|
||||
-- symbols (categories, functions) for context-free grammars.
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module CFIdent (-- * Tokens and categories
|
||||
module GF.CF.CFIdent (-- * Tokens and categories
|
||||
CFTok(..), CFCat(..),
|
||||
tS, tC, tL, tI, tV, tM, tInt,
|
||||
prCFTok,
|
||||
@@ -31,15 +31,15 @@ module CFIdent (-- * Tokens and categories
|
||||
compatToks, compatTok, compatCFFun, compatCF
|
||||
) where
|
||||
|
||||
import Operations
|
||||
import GFC
|
||||
import Ident
|
||||
import Values (cPredefAbs)
|
||||
import AbsGFC
|
||||
import Macros (ident2label)
|
||||
import PrGrammar
|
||||
import Str
|
||||
import Char (toLower, toUpper)
|
||||
import GF.Data.Operations
|
||||
import GF.Canon.GFC
|
||||
import GF.Infra.Ident
|
||||
import GF.Grammar.Values (cPredefAbs)
|
||||
import GF.Canon.AbsGFC
|
||||
import GF.Grammar.Macros (ident2label)
|
||||
import GF.Grammar.PrGrammar
|
||||
import GF.Data.Str
|
||||
import Data.Char (toLower, toUpper)
|
||||
|
||||
-- | this type should be abstract
|
||||
data CFTok =
|
||||
|
||||
@@ -5,29 +5,29 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/04/17 19:48:34 $
|
||||
-- > CVS $Author: aarne $
|
||||
-- > CVS $Revision: 1.6 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:09 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.7 $
|
||||
--
|
||||
-- 26\/1\/2000 -- 18\/4 -- 24\/3\/2004
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module CFtoGrammar (cf2grammar) where
|
||||
module GF.CF.CFtoGrammar (cf2grammar) where
|
||||
|
||||
import Ident
|
||||
import Grammar
|
||||
import qualified AbsGF as A
|
||||
import qualified GrammarToSource as S
|
||||
import Macros
|
||||
import GF.Infra.Ident
|
||||
import GF.Grammar.Grammar
|
||||
import qualified GF.Source.AbsGF as A
|
||||
import qualified GF.Source.GrammarToSource as S
|
||||
import GF.Grammar.Macros
|
||||
|
||||
import CF
|
||||
import CFIdent
|
||||
import PPrCF
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.CF.PPrCF
|
||||
|
||||
import Operations
|
||||
import GF.Data.Operations
|
||||
|
||||
import List (nub)
|
||||
import Char (isSpace)
|
||||
import Data.List (nub)
|
||||
import Data.Char (isSpace)
|
||||
|
||||
cf2grammar :: CF -> [A.TopDef]
|
||||
cf2grammar cf = concatMap S.trAnyDef (abs ++ conc) where
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/02/18 19:21:07 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.5 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:10 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.6 $
|
||||
--
|
||||
-- This module prints a CF as a SRG (Speech Recognition Grammar).
|
||||
-- Created : 21 January, 2001.
|
||||
-- Modified : 16 April, 2004 by Aarne Ranta for GF 2.
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module CFtoSRG (prSRG) where
|
||||
module GF.CF.CFtoSRG (prSRG) where
|
||||
|
||||
import Operations
|
||||
import CF
|
||||
import CFIdent
|
||||
import GF.Data.Operations
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
---import UseGrammar
|
||||
import PPrCF
|
||||
import List (intersperse,nub)
|
||||
import GF.CF.PPrCF
|
||||
import Data.List (intersperse,nub)
|
||||
|
||||
header :: String
|
||||
header = unlines ["#ABNF 1.0 ISO-8859-1;\n",
|
||||
|
||||
@@ -5,33 +5,33 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/03/29 11:17:56 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.12 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:11 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.13 $
|
||||
--
|
||||
-- AR 27\/1\/2000 -- 3\/12\/2001 -- 8\/6\/2003
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module CanonToCF (canon2cf) where
|
||||
module GF.CF.CanonToCF (canon2cf) where
|
||||
|
||||
import GF.System.Tracing -- peb 8/6-04
|
||||
|
||||
import Operations
|
||||
import Option
|
||||
import Ident
|
||||
import AbsGFC
|
||||
import LookAbs (allBindCatsOf)
|
||||
import GFC
|
||||
import Values (isPredefCat,cPredefAbs)
|
||||
import PrGrammar
|
||||
import CMacros
|
||||
import qualified Modules as M
|
||||
import CF
|
||||
import CFIdent
|
||||
import Morphology
|
||||
import Trie2
|
||||
import List (nub,partition)
|
||||
import Monad
|
||||
import GF.Data.Operations
|
||||
import GF.Infra.Option
|
||||
import GF.Infra.Ident
|
||||
import GF.Canon.AbsGFC
|
||||
import GF.Grammar.LookAbs (allBindCatsOf)
|
||||
import GF.Canon.GFC
|
||||
import GF.Grammar.Values (isPredefCat,cPredefAbs)
|
||||
import GF.Grammar.PrGrammar
|
||||
import GF.Canon.CMacros
|
||||
import qualified GF.Infra.Modules as M
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.UseGrammar.Morphology
|
||||
import GF.Data.Trie2
|
||||
import Data.List (nub,partition)
|
||||
import Control.Monad
|
||||
|
||||
-- | The main function: for a given cnc module 'm', build the CF grammar with all the
|
||||
-- rules coming from modules that 'm' extends. The categories are qualified by
|
||||
|
||||
@@ -5,29 +5,29 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/04/16 05:40:50 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.9 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:12 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.10 $
|
||||
--
|
||||
-- Bottom-up Kilbury chart parser from "Pure Functional Parsing", chapter 5.
|
||||
-- OBSOLETE -- should use new MCFG parsers instead
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module ChartParser (chartParser) where
|
||||
module GF.CF.ChartParser (chartParser) where
|
||||
|
||||
-- import Tracing
|
||||
-- import PrintParser
|
||||
-- import PrintSimplifiedTerm
|
||||
|
||||
import Operations
|
||||
import CF
|
||||
import CFIdent
|
||||
import PPrCF (prCFItem)
|
||||
import GF.Data.Operations
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.CF.PPrCF (prCFItem)
|
||||
|
||||
import OrdSet
|
||||
import OrdMap2
|
||||
import GF.Data.OrdSet
|
||||
import GF.Data.OrdMap2
|
||||
|
||||
import List (groupBy)
|
||||
import Data.List (groupBy)
|
||||
|
||||
type Token = CFTok
|
||||
type Name = CFFun
|
||||
|
||||
@@ -5,26 +5,26 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/02/18 19:21:07 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.4 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:13 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.5 $
|
||||
--
|
||||
-- (Description of the module)
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module EBNF (pEBNFasGrammar) where
|
||||
module GF.CF.EBNF (pEBNFasGrammar) where
|
||||
|
||||
import Operations
|
||||
import Parsers
|
||||
import Comments
|
||||
import CF
|
||||
import CFIdent
|
||||
import Grammar
|
||||
import PrGrammar
|
||||
import CFtoGrammar
|
||||
import qualified AbsGF as A
|
||||
import GF.Data.Operations
|
||||
import GF.Data.Parsers
|
||||
import GF.Infra.Comments
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.Grammar.Grammar
|
||||
import GF.Grammar.PrGrammar
|
||||
import GF.CF.CFtoGrammar
|
||||
import qualified GF.Source.AbsGF as A
|
||||
|
||||
import List (nub, partition)
|
||||
import Data.List (nub, partition)
|
||||
|
||||
-- AR 18/4/2000 - 31/3/2004
|
||||
|
||||
|
||||
@@ -5,24 +5,24 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/04/17 19:48:34 $
|
||||
-- > CVS $Author: aarne $
|
||||
-- > CVS $Revision: 1.10 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:13 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.11 $
|
||||
--
|
||||
-- printing and parsing CF grammars, rules, and trees AR 26/1/2000 -- 9/6/2003
|
||||
--
|
||||
-- use the Print class instead!
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module PPrCF (prCF, prCFTree, prCFRule, prCFFun, prCFCat, prCFItem, prRegExp, pCF) where
|
||||
module GF.CF.PPrCF (prCF, prCFTree, prCFRule, prCFFun, prCFCat, prCFItem, prRegExp, pCF) where
|
||||
|
||||
import Operations
|
||||
import CF
|
||||
import CFIdent
|
||||
import AbsGFC
|
||||
import PrGrammar
|
||||
import GF.Data.Operations
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.Canon.AbsGFC
|
||||
import GF.Grammar.PrGrammar
|
||||
|
||||
import Char
|
||||
import Data.Char
|
||||
|
||||
prCF :: CF -> String
|
||||
prCF = unlines . (map prCFRule) . rulesOfCF -- hiding the literal recogn function
|
||||
|
||||
@@ -5,31 +5,31 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/03/12 13:01:48 $
|
||||
-- > CVS $Author: aarne $
|
||||
-- > CVS $Revision: 1.9 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:14 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.10 $
|
||||
--
|
||||
-- Printing CF grammars generated from GF as LBNF grammar for BNFC.
|
||||
-- AR 26/1/2000 -- 9/6/2003 (PPrCF) -- 8/11/2003 -- 27/9/2004.
|
||||
-- With primitive error messaging, by rules and rule tails commented out
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module PrLBNF (prLBNF,prBNF) where
|
||||
module GF.CF.PrLBNF (prLBNF,prBNF) where
|
||||
|
||||
import CF
|
||||
import CFIdent
|
||||
import AbsGFC
|
||||
import Ident
|
||||
import PrGrammar
|
||||
import ShellState
|
||||
import GFC
|
||||
import Look
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.Canon.AbsGFC
|
||||
import GF.Infra.Ident
|
||||
import GF.Grammar.PrGrammar
|
||||
import GF.Compile.ShellState
|
||||
import GF.Canon.GFC
|
||||
import GF.Canon.Look
|
||||
|
||||
import Operations
|
||||
import Modules
|
||||
import GF.Data.Operations
|
||||
import GF.Infra.Modules
|
||||
|
||||
import Char
|
||||
import List (nub)
|
||||
import Data.Char
|
||||
import Data.List (nub)
|
||||
|
||||
prLBNF :: Bool -> StateGrammar -> String
|
||||
prLBNF new gr = unlines $ pragmas ++ (map (prCFRule cs) rules')
|
||||
|
||||
@@ -5,30 +5,30 @@
|
||||
-- Stability : (stable)
|
||||
-- Portability : (portable)
|
||||
--
|
||||
-- > CVS $Date: 2005/02/18 19:21:08 $
|
||||
-- > CVS $Author: peb $
|
||||
-- > CVS $Revision: 1.7 $
|
||||
-- > CVS $Date: 2005/04/21 16:21:14 $
|
||||
-- > CVS $Author: bringert $
|
||||
-- > CVS $Revision: 1.8 $
|
||||
--
|
||||
-- restoring parse trees for discontinuous constituents, bindings, etc. AR 25/1/2001
|
||||
-- revised 8/4/2002 for the new profile structure
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
module Profile (postParse) where
|
||||
module GF.CF.Profile (postParse) where
|
||||
|
||||
import AbsGFC
|
||||
import GFC
|
||||
import qualified Ident as I
|
||||
import CMacros
|
||||
import GF.Canon.AbsGFC
|
||||
import GF.Canon.GFC
|
||||
import qualified GF.Infra.Ident as I
|
||||
import GF.Canon.CMacros
|
||||
---import MMacros
|
||||
import CF
|
||||
import CFIdent
|
||||
import PPrCF -- for error msg
|
||||
import PrGrammar
|
||||
import GF.CF.CF
|
||||
import GF.CF.CFIdent
|
||||
import GF.CF.PPrCF -- for error msg
|
||||
import GF.Grammar.PrGrammar
|
||||
|
||||
import Operations
|
||||
import GF.Data.Operations
|
||||
|
||||
import Monad
|
||||
import List (nub)
|
||||
import Control.Monad
|
||||
import Data.List (nub)
|
||||
|
||||
-- | the job is done in two passes:
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user