summaryrefslogtreecommitdiff
path: root/src/GF/CF/CFIdent.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-11-14 15:03:40 +0000
committeraarne <unknown>2005-11-14 15:03:40 +0000
commitf339b8839bcb25a57cb22baa3342032892f9be63 (patch)
tree59b15d37579d5b5630d9ae5ac7a9d701cf3e09a4 /src/GF/CF/CFIdent.hs
parent505eb2ec5794e741d343e52be4f75da7b4980a62 (diff)
arbitrary lincat records; noparse pragmas
Diffstat (limited to 'src/GF/CF/CFIdent.hs')
-rw-r--r--src/GF/CF/CFIdent.hs13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/GF/CF/CFIdent.hs b/src/GF/CF/CFIdent.hs
index 30b9f857d..fe1f1b663 100644
--- a/src/GF/CF/CFIdent.hs
+++ b/src/GF/CF/CFIdent.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/21 16:21:08 $
--- > CVS $Author: bringert $
--- > CVS $Revision: 1.12 $
+-- > CVS $Date: 2005/11/14 16:03:40 $
+-- > CVS $Author: aarne $
+-- > CVS $Revision: 1.13 $
--
-- symbols (categories, functions) for context-free grammars.
-----------------------------------------------------------------------------
@@ -23,7 +23,8 @@ module GF.CF.CFIdent (-- * Tokens and categories
mkCFFun, varCFFun, consCFFun, string2CFFun, stringCFFun, intCFFun, dummyCFFun,
cfFun2String, cfFun2Ident, cfFun2Profile, metaCFFun,
-- * CF Categories
- mkCIdent, ident2CFCat, string2CFCat, catVarCF, cat2CFCat, cfCatString, cfCatInt,
+ mkCIdent, ident2CFCat, labels2CFCat, string2CFCat,
+ catVarCF, cat2CFCat, cfCatString, cfCatInt,
moduleOfCFCat, cfCat2Cat, cfCat2Ident, lexCFCat,
-- * CF Tokens
string2CFTok, str2cftoks,
@@ -40,6 +41,7 @@ import GF.Grammar.Macros (ident2label)
import GF.Grammar.PrGrammar
import GF.Data.Str
import Data.Char (toLower, toUpper)
+import Data.List (intersperse)
-- | this type should be abstract
data CFTok =
@@ -144,6 +146,9 @@ mkCIdent m c = CIQ (identC m) (identC c)
ident2CFCat :: CIdent -> Ident -> CFCat
ident2CFCat mc d = CFCat (mc, L d)
+labels2CFCat :: CIdent -> [Label] -> CFCat
+labels2CFCat mc d = CFCat (mc, L (identC (concat (intersperse "." (map prt d))))) ----
+
-- | standard way of making cf cat: label s
string2CFCat :: String -> String -> CFCat
string2CFCat m c = ident2CFCat (mkCIdent m c) (identC "s")