diff options
| author | peb <unknown> | 2005-02-18 18:21:06 +0000 |
|---|---|---|
| committer | peb <unknown> | 2005-02-18 18:21:06 +0000 |
| commit | 9568d7a844ba6a1872a8e8f6ef002860057e62ab (patch) | |
| tree | 9e25c6ed62e48101a2782d5fb8dcba68462dc613 /src/GF/CF/CF.hs | |
| parent | 1c4f025320900897ae3acdab6982f7d595b98dd1 (diff) | |
"Committed_by_peb"
Diffstat (limited to 'src/GF/CF/CF.hs')
| -rw-r--r-- | src/GF/CF/CF.hs | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/src/GF/CF/CF.hs b/src/GF/CF/CF.hs index 962a7d8c7..5c126ef35 100644 --- a/src/GF/CF/CF.hs +++ b/src/GF/CF/CF.hs @@ -1,18 +1,38 @@ ---------------------------------------------------------------------- -- | --- Module : (Module) --- Maintainer : (Maintainer) +-- Module : CF +-- Maintainer : AR -- Stability : (stable) -- Portability : (portable) -- --- > CVS $Date $ --- > CVS $Author $ --- > CVS $Revision $ +-- > CVS $Date: 2005/02/18 19:21:07 $ +-- > CVS $Author: peb $ +-- > CVS $Revision: 1.5 $ -- --- context-free grammars. AR 15/12/1999 -- 30/3/2000 -- 2/6/2001 -- 3/12/2001 +-- context-free grammars. AR 15\/12\/1999 -- 30\/3\/2000 -- 2\/6\/2001 -- 3\/12\/2001 ----------------------------------------------------------------------------- -module CF where +module CF (-- * Types + CF(..), CFRule, CFRuleGroup, + CFItem(..), CFTree(..), CFPredef, CFParser, + RegExp(..), CFWord, + -- * Functions + cfParseResults, + -- ** to construct CF grammars + emptyCF, emptyCFPredef, rules2CF, groupCFRules, + -- ** to construct rules + atomCFRule, atomCFTerm, atomRegExp, altsCFTerm, + -- ** to construct trees + atomCFTree, buildCFTree, + -- ** to decide whether a token matches a terminal item + matchCFTerm, satRegExp, + -- ** to analyse a CF grammar + catsOfCF, rulesOfCF, ruleGroupsOfCF, rulesForCFCat, + valCatCF, valItemsCF, valFunCF, + startCat, predefOfCF, appCFPredef, valCFItem, + cfTokens, wordsOfRegExp, forCFItem, + isCircularCF, predefRules + ) where import Operations import Str @@ -182,10 +202,10 @@ forCFItem :: CFTok -> CFRule -> Bool forCFItem a (_,(_, CFTerm r : _)) = satRegExp r a forCFItem _ _ = False +-- | we should make a test of circular chains, too isCircularCF :: CFRule -> Bool isCircularCF (_,(c', CFNonterm c:[])) = compatCF c' c isCircularCF _ = False ---- we should make a test of circular chains, too -- | coercion to the older predef cf type predefRules :: CFPredef -> CFTok -> [CFRule] |
