From e0dc9c80a6cbb45254f7e20d50894267aa2a3532 Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 19 May 2010 13:32:39 +0000 Subject: now every BracketedString also has reference to the source expression(s) --- src/runtime/haskell/PGF/Parse.hs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/runtime/haskell/PGF/Parse.hs') diff --git a/src/runtime/haskell/PGF/Parse.hs b/src/runtime/haskell/PGF/Parse.hs index ce195f752..f48fab097 100644 --- a/src/runtime/haskell/PGF/Parse.hs +++ b/src/runtime/haskell/PGF/Parse.hs @@ -27,7 +27,7 @@ import PGF.Data import PGF.Expr(Tree) import PGF.Macros import PGF.TypeCheck -import PGF.Forest(Forest(Forest), linearizeWithBrackets) +import PGF.Forest(Forest(Forest), linearizeWithBrackets, foldForest) -- | This data type encodes the different outcomes which you could get from the parser. data ParseResult @@ -379,21 +379,6 @@ insertPC :: PassiveKey -> FId -> PassiveChart -> PassiveChart insertPC key fcat chart = Map.insert key fcat chart ----------------------------------------------------------------- --- Forest ----------------------------------------------------------------- - -foldForest :: (FunId -> [FId] -> b -> b) -> (Expr -> [String] -> b -> b) -> b -> FId -> IntMap.IntMap (Set.Set Production) -> b -foldForest f g b fcat forest = - case IntMap.lookup fcat forest of - Nothing -> b - Just set -> Set.fold foldProd b set - where - foldProd (PCoerce fcat) b = foldForest f g b fcat forest - foldProd (PApply funid args) b = f funid args b - foldProd (PConst _ const toks) b = g const toks b - - ---------------------------------------------------------------- -- Parse State ---------------------------------------------------------------- -- cgit v1.2.3