Cross Reference: /hets/Modal/Parse_AS.hs
Parse_AS.hs revision 2b4130336e941b7d01c78a6da55449a4c6eca609
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski{-
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiModule : $Header$
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiCopyright : (c) Till Mossakowski, Wiebke Herding and Uni Bremen 2003
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiLicence : All rights reserved.
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiMaintainer : hets@tzi.de
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiStability : provisional
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiPortability : portable
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski Parser for modal logic extension of CASL
59d823de481014f68b8b024474bffac150b56e1eWiebke Herding-}
cc6df32dd55910aac7de12b30cc5049d96b8f770Wiebke Herding
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maedermodule Modal.Parse_AS where
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maederimport Common.AnnoState
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maederimport Common.Id
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maederimport Common.Token
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maederimport Common.Keywords
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maederimport Common.Lexer
e4e1509ff358e739fddf1483ad39467e0e1becc2Christian Maederimport Modal.AS_Modal
c36c47428b2f42fe09eab533acf6be19d6d9f259Wiebke Herdingimport Common.AS_Annotation
10e8873de4a89035222d077fe80b9fd7b9631473Wiebke Herdingimport Common.Lib.Parsec
cc6df32dd55910aac7de12b30cc5049d96b8f770Wiebke Herding
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
b1f52a36d45c5031c462291e263cec114975add1Wiebke HerdingboxKey, diamondKey :: AParser Token
b1f52a36d45c5031c462291e263cec114975add1Wiebke HerdingboxKey = asKey boxS
b1f52a36d45c5031c462291e263cec114975add1Wiebke HerdingdiamondKey = asKey diamondS
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskimodalFormula :: [String] -> AParser M_FORMULA
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskimodalFormula k =
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding do c <- boxKey
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding f <- primFormula k
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski return (Box None f [tokPos c])
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding <|>
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding do c <- diamondKey
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding f <- primFormula k
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski return (Diamond None f [tokPos c])
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowskiinstance Parsable M_FORMULA where
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski aparser = modalFormula
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding