CspCASL_Keywords.hs revision a09bfcbcb0fba5663fca1968aa82daebf2e092c4
c797f343be2f3619bb1f5569753166ec49d27bdbChristian Maeder{- |
c797f343be2f3619bb1f5569753166ec49d27bdbChristian MaederModule : $Id$
81d182b21020b815887e9057959228546cf61b6bChristian MaederDescription : CspCASL keywords to be used for parsing and printing
10397bcc134edbcfbe3ae2c7ea4c6080036aae22Christian MaederCopyright : (c) Andy Gimblett and Swansea University 2006
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian MaederLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
c797f343be2f3619bb1f5569753166ec49d27bdbChristian Maeder
3f69b6948966979163bdfe8331c38833d5d90ecdChristian MaederMaintainer : a.m.gimblett@swan.ac.uk
c797f343be2f3619bb1f5569753166ec49d27bdbChristian MaederStability : provisional
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian MaederPortability : portable
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder
f3a94a197960e548ecd6520bb768cb0d547457bbChristian MaederString constants for CspCASL keywords to be used for parsing and
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maederprinting.
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maeder
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder-}
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
9659c509ce5e78adc51d7b02a76274eddcba9338Christian Maedermodule CspCASL.CspCASL_Keywords where
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
0a320bc4cdbf38f480b75ac15a54db1c4885b497Christian Maederimport Common.Token (casl_reserved_words)
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder-- | Keywords identifying beginning of channel declaration part.
59c301c268f79cfde0a4c30a2c572a368db98da5Christian MaederchannelS, channelsS :: String
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian MaederchannelS = "channel"
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian MaederchannelsS = "channels"
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maeder
23a00c966f2aa8da525d7a7c51933c99964426c0Christian Maeder-- | Keyword identifying beginning of process equation part.
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian MaederprocessS :: String
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian MaederprocessS = "process"
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maeder
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maeder-- | interleaving parallel operator
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian MaederinterleavingS :: String
59c301c268f79cfde0a4c30a2c572a368db98da5Christian MaederinterleavingS = "|||"
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
10397bcc134edbcfbe3ae2c7ea4c6080036aae22Christian Maeder-- | synchronous parallel operator
04dada28736b4a237745e92063d8bdd49a362debChristian MaedersynchronousS :: String
b984ff0ba75221f64451c1e69b3977967d4e99a1Christian MaedersynchronousS = "||"
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian Maeder
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder-- | Open generalised parallel
ad270004874ce1d0697fb30d7309f180553bb315Christian Maedergeneral_parallel_openS :: String
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian Maedergeneral_parallel_openS = "[|"
89054b2b95a3f92e78324dc852f3d34704e2ca49Christian Maeder
b984ff0ba75221f64451c1e69b3977967d4e99a1Christian Maeder-- | Close generalised parallel
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian Maedergeneral_parallel_closeS :: String
5a13581acc5a76d392c1dec01657bb3efd4dcf2dChristian Maedergeneral_parallel_closeS = "|]"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Open alpabetised parallel
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederalpha_parallel_openS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederalpha_parallel_openS = "["
b190f5c7cf3ddda73724efe5ce82b9585ed76be1Christian Maeder
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder-- | Separator in alpabetised parallel
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maederalpha_parallel_sepS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederalpha_parallel_sepS = "||"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Close alpabetised parallel
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederalpha_parallel_closeS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederalpha_parallel_closeS = "]"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | External choice
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maederexternal_choiceS :: String
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maederexternal_choiceS = "[]"
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Internal choice
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maederinternal_choiceS :: String
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maederinternal_choiceS = "|~|"
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Prefix processes
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederprefixS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederprefixS = "->"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | External prefix opener
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederexternal_prefixS :: String
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maederexternal_prefixS = "[]"
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Internal prefix opener
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederinternal_prefixS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederinternal_prefixS = "|~|"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Hiding
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederhidingS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederhidingS = "\\"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Open a renaming
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederrenaming_openS :: String
462ec4b2fa3e0e788eb60dcb4aebc518298f342cChristian Maederrenaming_openS = "[["
27912d626bf179b82fcb337077e5cd9653bb71cfChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | Close a renaming
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederrenaming_closeS :: String
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian Maederrenaming_closeS = "]]"
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder-- | "RUN" primitive process
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederrunS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederrunS = "RUN"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | "CHAOS" primitive process
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederchaosS :: String
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian MaederchaosS = "CHAOS"
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maeder-- | "div" primitive process
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian MaederdivS :: String
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian MaederdivS = "div"
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder-- | "SKIP" primitive process
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian MaederskipS :: String
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian MaederskipS = "SKIP"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian Maeder-- | "STOP" primitive process
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian MaederstopS :: String
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian MaederstopS = "STOP"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maederchan_event_openS :: String
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian Maederchan_event_openS = "{|"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
f454c20b6c126bea7d31d400cc8824b9ee8cc6eaChristian Maederchan_event_closeS :: String
e95bbf384f5cbcb7eb23286d5f15dffbd471db17Christian Maederchan_event_closeS = "|}"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederchan_sendS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederchan_sendS = "!"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederchan_receiveS :: String
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maederchan_receiveS = "?"
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maedersvar_sortS :: String
4fb19f237193a3bd6778f8aee3b6dd8da5856665Christian Maedersvar_sortS = "@"
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder-- | Reserved keywords specific to CSP-CASL.
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maedercsp_casl_keywords :: [String]
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maedercsp_casl_keywords = casl_reserved_words ++
ad187062b0009820118c1b773a232e29b879a2faChristian Maeder [ channelS,
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder channelsS,
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder processS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder interleavingS,
ad187062b0009820118c1b773a232e29b879a2faChristian Maeder synchronousS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder general_parallel_openS,
ad187062b0009820118c1b773a232e29b879a2faChristian Maeder general_parallel_closeS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder alpha_parallel_openS,
ad187062b0009820118c1b773a232e29b879a2faChristian Maeder alpha_parallel_sepS,
ad187062b0009820118c1b773a232e29b879a2faChristian Maeder alpha_parallel_closeS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder external_choiceS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder internal_choiceS,
ad187062b0009820118c1b773a232e29b879a2faChristian Maeder prefixS,
b984ff0ba75221f64451c1e69b3977967d4e99a1Christian Maeder external_prefixS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder internal_prefixS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder hidingS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder renaming_openS,
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder renaming_closeS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder runS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder chaosS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder divS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder skipS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder stopS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder chan_event_openS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder chan_event_closeS,
32a7cc7177ecf70e35ec831ff86887b9acc40dcaChristian Maeder chan_sendS,
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder chan_receiveS,
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder svar_sortS
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder ]
59c301c268f79cfde0a4c30a2c572a368db98da5Christian Maeder