From 1d9d47312a7fd44b0ed003b2b24b6a2170473ccb Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 1 Feb 2008 14:45:02 +0000 Subject: [PATCH] Implemented handling of replicators inside PARs in the control flow-graph building --- common/FlowGraph.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/FlowGraph.hs b/common/FlowGraph.hs index 035dc6f..7d90ed4 100644 --- a/common/FlowGraph.hs +++ b/common/FlowGraph.hs @@ -361,6 +361,17 @@ buildFlowGraph funcs s Left False -> addEdge ESeq n n Left True -> throwError $ show m ++ " SEQ replicator had non-joined up body when building flow-graph" return $ Right (n,n) + OPar pId _ -> + do s <- addNode' (findMeta rep) labelReplicator rep alter + e <- addDummyNode m + pId <- getNextParEdgeId + nodes <- buildStructured (OPar pId (s,e)) str (route33 route A.Rep) + case nodes of + Left False -> addEdge ESeq s e + Left True -> return () + Right (s',e') -> do addEdge (EStartPar pId) s s' + addEdge (EEndPar pId) e' e + return $ Right (s,e) _ -> throwError $ "Cannot have replicators inside context: " ++ show outer buildStructured _ s _ = return $ Left False