From 4803fb8052caba0421949c9d7768d44ec28d109d Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Thu, 5 Jun 2008 07:33:42 +0000 Subject: use parser combinators to parse the shell commands. simplified CommandLine type --- src-3.0/GF/Command/PPrTree.hs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 src-3.0/GF/Command/PPrTree.hs (limited to 'src-3.0/GF/Command/PPrTree.hs') diff --git a/src-3.0/GF/Command/PPrTree.hs b/src-3.0/GF/Command/PPrTree.hs deleted file mode 100644 index 7562d6fab..000000000 --- a/src-3.0/GF/Command/PPrTree.hs +++ /dev/null @@ -1,26 +0,0 @@ -module GF.Command.PPrTree (tree2exp, exp2tree) where - -import PGF.CId -import PGF.Data -import GF.Command.AbsGFShell - -tree2exp t = case t of - TApp f ts -> EApp (i2i f) (map tree2exp ts) - TAbs xs t -> EAbs (map i2i xs) (tree2exp t) - TId c -> EApp (i2i c) [] - TInt i -> EInt i - TStr s -> EStr s - TFloat d -> EFloat d - where - i2i (Ident s) = mkCId s - -exp2tree t = case t of - (EAbs xs e) -> TAbs (map i4i xs) (exp2tree e) - (EApp f []) -> TId (i4i f) - (EApp f es) -> TApp (i4i f) (map exp2tree es) - (EInt i) -> TInt i - (EStr i) -> TStr i - (EFloat i) -> TFloat i - (EMeta i) -> TId (Ident "?") ---- - where - i4i s = Ident (prCId s) -- cgit v1.2.3