Parse_AS.hs revision b87efd3db0d2dc41615ea28669faf80fc1b48d56
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal IyerModule : $Header$
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxDescription : Parser for COL
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxCopyright : (c) Till Mossakowski, Uni Bremen 2004
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxLicense : GPLv2 or higher
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxMaintainer : till@informatik.uni-bremen.de
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxStability : provisional
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxPortability : portable
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxparsing of COL extensions
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxcolSigItems :: AParser st COL_SIG_ITEM
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxcolSigItems =
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx do itemList col_reserved_words constructorS parseId Constructor_items
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx <|> itemList col_reserved_words observerS observerItem Observer_items
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxinstance AParsable COL_SIG_ITEM where
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx aparser = colSigItems
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxobserverItem :: [String] -> AParser st (Id, Maybe Int)
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hxobserverItem ks =
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx do oParenT
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx i <- parseId ks
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx n <- many1 digit
84f7a9b9dca4f23b5f50edef0e59d7eb44301114hx return (i, Just $ read n)