From b96b36f43de3e2f8b58d5f539daa6f6d47f25870 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 25 Jun 2008 16:43:48 +0000 Subject: removed src for 2.9 --- src/GF/Compile/PGrammar.hs | 77 ---------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 src/GF/Compile/PGrammar.hs (limited to 'src/GF/Compile/PGrammar.hs') diff --git a/src/GF/Compile/PGrammar.hs b/src/GF/Compile/PGrammar.hs deleted file mode 100644 index 521f616b5..000000000 --- a/src/GF/Compile/PGrammar.hs +++ /dev/null @@ -1,77 +0,0 @@ ----------------------------------------------------------------------- --- | --- Module : PGrammar --- Maintainer : AR --- Stability : (stable) --- Portability : (portable) --- --- > CVS $Date: 2005/05/25 10:27:12 $ --- > CVS $Author: bringert $ --- > CVS $Revision: 1.8 $ --- --- (Description of the module) ------------------------------------------------------------------------------ - -module GF.Compile.PGrammar (pTerm, pTrm, pTrms, - pMeta, pzIdent, - string2ident - ) where - ----import LexGF -import GF.Source.ParGF -import GF.Source.SourceToGrammar (transExp) -import GF.Grammar.Grammar -import GF.Infra.Ident -import qualified GF.Canon.AbsGFC as A -import qualified GF.Canon.GFC as G -import GF.Compile.GetGrammar -import GF.Grammar.Macros -import GF.Grammar.MMacros - -import GF.Data.Operations -import qualified Data.ByteString.Char8 as BS - -pTerm :: String -> Err Term -pTerm s = do - e <- pExp $ myLexer (BS.pack s) - transExp e - -pTrm :: String -> Term -pTrm = errVal (vr (zIdent "x")) . pTerm --- - -pTrms :: String -> [Term] -pTrms = map pTrm . sep [] where - sep t cs = case cs of - ',' : cs2 -> reverse t : sep [] cs2 - c : cs2 -> sep (c:t) cs2 - _ -> [reverse t] - -pTrm' :: String -> [Term] -pTrm' = err (const []) singleton . pTerm - -pMeta :: String -> Integer -pMeta _ = 0 --- - -pzIdent :: String -> Ident -pzIdent = zIdent - -{- -string2formsAndTerm :: String -> ([Term],Term) -string2formsAndTerm s = case s of - '[':_:_ -> case span (/=']') s of - (x,_:y) -> (pTrms (tail x), pTrm y) - _ -> ([],pTrm s) - _ -> ([], pTrm s) --} - -string2ident :: String -> Err Ident -string2ident s = return $ string2var s - -{- --- reads the Haskell datatype -readGrammar :: String -> Err GrammarST -readGrammar s = case [x | (x,t) <- reads s, ("","") <- lex t] of - [x] -> return x - [] -> Bad "no parse of Grammar" - _ -> Bad "ambiguous parse of Grammar" --} -- cgit v1.2.3