Parse_AS.hs revision 2eeec5240b424984e3ee26296da1eeab6c6d739e
{- |
Module : $Header$
Copyright : (c) Till Mossakowski, Uni Bremen 2004
License : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
Maintainer : till@informatik.uni-bremen.de
Stability : provisional
Portability : portable
parsing of extensions
-}
module COL.Parse_AS where
import Common.AnnoState
import Common.Id
import Common.Lexer
import Common.Token
import COL.AS_COL
colSigItems :: AParser st COL_SIG_ITEM
colSigItems =
do itemList col_reserved_words constructorS parseId Constructor_items
<|> itemList col_reserved_words observerS observerItem Observer_items
instance AParsable COL_SIG_ITEM where
aparser = colSigItems
observerItem :: [String] -> AParser st (Id, Maybe Int)
observerItem ks =
do oParenT
i <- parseId ks
anComma
n <- many1 digit
cParenT
return (i, Just $ read n)