From 39ec48c1e35fd93344f99e00ebc786d118c5892c Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 30 Apr 2007 04:25:13 +0000 Subject: [PATCH] Fix known-dimension arrays in specifiers --- fco2/Parse.hs | 2 ++ fco2/testcases/array-arg.occ | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 fco2/testcases/array-arg.occ diff --git a/fco2/Parse.hs b/fco2/Parse.hs index 99c8760..89ad84f 100644 --- a/fco2/Parse.hs +++ b/fco2/Parse.hs @@ -1275,6 +1275,7 @@ dataSpecifier = dataType <|> do s <- tryXXV sLeft sRight dataSpecifier return $ makeArrayType A.UnknownDimension s + <|> arrayType dataSpecifier "data specifier" specifier :: OccParser A.Type @@ -1285,6 +1286,7 @@ specifier <|> portType <|> do s <- tryXXV sLeft sRight specifier return $ makeArrayType A.UnknownDimension s + <|> arrayType specifier "specifier" --{{{ PROCs and FUNCTIONs diff --git a/fco2/testcases/array-arg.occ b/fco2/testcases/array-arg.occ new file mode 100644 index 0000000..0306c5c --- /dev/null +++ b/fco2/testcases/array-arg.occ @@ -0,0 +1,8 @@ +-- from cgtest07 +PROC bug.308() + PROC bug.308a([10][][5]INT a) + a[3] := a[2] + : + [10][3][5]INT a : + bug.308a(a) +: