Parse_AS.hs revision 272db64633ed2edaf723e01574b0083431cff469
97a9a944b5887e91042b019776c41d5dd74557aferikabele{- Spickzettel f�r's Parsen
97a9a944b5887e91042b019776c41d5dd74557aferikabele-- Definition aus Logic.hs
a945f35eff8b6a88009ce73de6d4c862ce58de3cslivetype ParseFun a = FilePath -> Int -> Int -> String -> (a,String,Int,Int)
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive -- args: filename, line, column, input text
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive -- result: value, remaining text, line, column
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndtoParseFun :: GenParser Char st a -> st -> ParseFun a
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd-- Klassenfunktion, die meine Instanz implementiert
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndparse_basic_spec :: id -> Maybe(ParseFun basic_spec)
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd-- ^ R�ckgabetyp
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantzmodule Parse_AS where
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndimport AnnoState
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd--import Keywords
4b5981e276e93df97c34e4da05ca5cf8bbd937dandimport Lexer
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndimport AS_Modal
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndimport AS_Annotation
3b3b7fc78d1f5bfc2769903375050048ff41ff26ndimport Maybe
8529679ec1c2e3285d9a2b0e124d3af16154c406kessimport Parsec
8529679ec1c2e3285d9a2b0e124d3af16154c406kess--import Formula
cc8190433d13f5e9de618c5d7f10c824c0c1919cgryzor--import SortItem
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd--import OpItem
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung--import TypeItem
3b3b7fc78d1f5bfc2769903375050048ff41ff26ndimport ItemList
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd-- aus CASL, kann bleiben
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndbasicSpec :: GenParser Char st BASIC_SPEC
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4ndbasicSpec = (fmap Basic_spec $ many1 $ --
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd try $ bind addLeftAnno annos basicItems) --BasicItem
bdd978e5ecd8daa2542d4d4e1988c78a622cd7f4nd <|> try (oBraceT >> cBraceT >> return (Basic_spec [])) --Klammern
97a9a944b5887e91042b019776c41d5dd74557aferikabelebasicItems :: AParser BASIC_ITEMS
20189240503ef2c8f5dc6e2248b57faab4b23b5andbasicItems = fmap Sig_items sigItems
97a9a944b5887e91042b019776c41d5dd74557aferikabele -- <|> dotFormulae -- sp�ter!
06ba4a61654b3763ad65f52283832ebf058fdf1cslivesigItems :: AParser SIG_ITEMS
20189240503ef2c8f5dc6e2248b57faab4b23b5andsigItems = sortItems <|> opItems <|> predItems <|> typeItems