From 1e92333778deda27eea8978baea414bbadfe09ec Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 28 Feb 2008 16:55:11 +0000 Subject: [PATCH] Added a try to fix the parsing of BYTESIN with a not obviously constant array dimension --- frontends/ParseOccam.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontends/ParseOccam.hs b/frontends/ParseOccam.hs index 9a7e118..3775e27 100644 --- a/frontends/ParseOccam.hs +++ b/frontends/ParseOccam.hs @@ -1113,7 +1113,7 @@ operand' <|> do m <- md sBYTESIN sLeftR - do { o <- noTypeContext operand; sRightR; return $ A.BytesInExpr m o } + (try (do { o <- noTypeContext operand; sRightR; return $ A.BytesInExpr m o })) <|> do { t <- dataType; sRightR; return $ A.BytesInType m t } <|> do { m <- md; sOFFSETOF; sLeftR; t <- dataType; sComma; f <- fieldName; sRightR; return $ A.OffsetOf m t f } <|> do { m <- md; sTRUE; return $ A.True m }