From 4a0732629d03e73478e6b28cd744de1f21e96fb9 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 27 Sep 2007 10:05:31 +0000 Subject: [PATCH] Added support for the new AlternativeWait guard to the C++ backend --- backends/GenerateCPPCSP.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backends/GenerateCPPCSP.hs b/backends/GenerateCPPCSP.hs index ac2ac05..f4546e8 100644 --- a/backends/GenerateCPPCSP.hs +++ b/backends/GenerateCPPCSP.hs @@ -591,6 +591,10 @@ cppgenAlt ops _ s A.Alternative _ c im _ -> doIn c im A.AlternativeCond _ e c im _ -> withIf ops e $ doIn c im A.AlternativeSkip _ e _ -> withIf ops e $ tell [guardList, " . push_back( new csp::SkipGuard() );\n"] + A.AlternativeWait _ wm e _ -> + do tell [guardList, " . push_back( new ", if wm == A.WaitUntil then "csp::TimeoutGuard (" else "csp::RelTimeoutGuard("] + call genExpression ops e + tell ["));"] doIn c im = do case im of @@ -613,6 +617,7 @@ cppgenAlt ops _ s A.Alternative _ c im p -> doIn c im p A.AlternativeCond _ e c im p -> withIf ops e $ doIn c im p A.AlternativeSkip _ e p -> withIf ops e $ doCheck (call genProcess ops p) + A.AlternativeWait _ _ _ p -> doCheck (call genProcess ops p) doIn c im p = do case im of