From 06ff5ccda65268c4a257752b9fddfb5ab6b469d9 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 17 Mar 2008 18:47:54 +0000 Subject: [PATCH] Implement short-form PLACE, and fix PLACE IN WORKSPACE/VECSPACE. --- LANGUAGE | 2 ++ frontends/ParseOccam.hs | 3 +-- testcases/place.occ | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/LANGUAGE b/LANGUAGE index 3603ea1..20d6968 100644 --- a/LANGUAGE +++ b/LANGUAGE @@ -16,6 +16,8 @@ Intrinsics: - SQRT - DSQRT +CHAN for CHAN OF, and PLACE for PLACE AT. + PLACE IN WORKSPACE and PLACE IN VECSPACE, both currently ignored. INITIAL variables. diff --git a/frontends/ParseOccam.hs b/frontends/ParseOccam.hs index 96f2436..5b30a08 100644 --- a/frontends/ParseOccam.hs +++ b/frontends/ParseOccam.hs @@ -1258,8 +1258,7 @@ allocation placement :: OccParser A.Placement placement - = do sAT - e <- intExpr + = do e <- tryXV (optional sAT) intExpr return $ A.PlaceAt e <|> do tryXX sIN sWORKSPACE return $ A.PlaceInWorkspace diff --git a/testcases/place.occ b/testcases/place.occ index c853e16..ea27163 100644 --- a/testcases/place.occ +++ b/testcases/place.occ @@ -7,5 +7,7 @@ PROC P () PLACE w IN WORKSPACE: INT v: PLACE v IN VECSPACE: + INT new: + PLACE new #123456: SKIP :