From 6baca4b641bdd2e2085a607e7d5974f3c3ec5e2a Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Thu, 7 Sep 2006 14:50:52 +0000 Subject: [PATCH] Remove "unsure" comments It's because I didn't understand properly how Parsec works -- when you say a <|> b, everything in a runs (and fails) even if it didn't match... --- fco/Parse.hs | 3 --- 1 file changed, 3 deletions(-) diff --git a/fco/Parse.hs b/fco/Parse.hs index 3ba3ea5..6528d5e 100644 --- a/fco/Parse.hs +++ b/fco/Parse.hs @@ -351,7 +351,6 @@ definition do { sIS ; p <- sequentialProtocol ; sColon ; eol ; return $ OcProtocol n p } <|> do { eol ; indent ; sCASE ; eol ; indent ; ps <- many1 taggedProtocol ; outdent ; outdent ; sColon ; eol ; return $ OcTaggedProtocol n ps } } <|> do { sPROC ; n <- name ; fs <- formalList ; eol ; indent ; p <- process ; outdent ; sColon ; eol ; return $ OcProc n fs p } --- Again, don't know why this has to be entirely try ()... <|> try (do { rs <- sepBy1 dataType sComma ; (n, fs) <- functionHeader ; do { sIS ; el <- expressionList ; sColon ; eol ; return $ OcFuncIs n rs fs el } <|> do { eol ; indent ; vp <- valueProcess ; outdent ; sColon ; eol ; return $ OcFunc n rs fs vp } }) @@ -363,7 +362,6 @@ definition <|> do { sRESHAPES ; v <- variable ; sColon ; eol ; return $ OcValReshapes s n v } } "definition" --- NB does not return an SExp digits = many1 digit "digits" @@ -626,7 +624,6 @@ sequentialProtocol "sequentialProtocol" simpleProtocol --- FIXME I don't know why this needs to all be in a try, but I couldn't get it to work otherwise... = try (do { l <- dataType ; sColons ; sLeft ; sRight ; r <- dataType ; return $ OcCounted l r }) <|> dataType <|> do { sANY ; return $ OcAny }