summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Command/PPrTree.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@chalmers.se>2008-06-05 07:33:42 +0000
committerkr.angelov <kr.angelov@chalmers.se>2008-06-05 07:33:42 +0000
commit4803fb8052caba0421949c9d7768d44ec28d109d (patch)
tree669ab3dcc40cca9a91cd9220c366677ce1db8bdb /src-3.0/GF/Command/PPrTree.hs
parent0b1a157222e0f96b9c9d6f8cea98caf547c4bdf9 (diff)
use parser combinators to parse the shell commands. simplified CommandLine type
Diffstat (limited to 'src-3.0/GF/Command/PPrTree.hs')
-rw-r--r--src-3.0/GF/Command/PPrTree.hs26
1 files changed, 0 insertions, 26 deletions
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)