Parse_AS.hs revision 2b4130336e941b7d01c78a6da55449a4c6eca609
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiModule : $Header$
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiCopyright : (c) Till Mossakowski, Wiebke Herding and Uni Bremen 2003
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiLicence : All rights reserved.
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiMaintainer : hets@tzi.de
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiStability : provisional
2b4130336e941b7d01c78a6da55449a4c6eca609Till MossakowskiPortability : portable
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski Parser for modal logic extension of CASL
b1f52a36d45c5031c462291e263cec114975add1Wiebke HerdingboxKey, diamondKey :: AParser Token
b1f52a36d45c5031c462291e263cec114975add1Wiebke HerdingboxKey = asKey boxS
b1f52a36d45c5031c462291e263cec114975add1Wiebke HerdingdiamondKey = asKey diamondS
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 do c <- diamondKey
b1f52a36d45c5031c462291e263cec114975add1Wiebke Herding f <- primFormula k
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski return (Diamond None f [tokPos c])
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowskiinstance Parsable M_FORMULA where
2b4130336e941b7d01c78a6da55449a4c6eca609Till Mossakowski aparser = modalFormula