Keywords.hs revision 20ed727452613e36c0a95ddabf7ecc81cf941ed2
1f0b5989221c9f985c461d18e10067e38d55c470Luke SmithModule : $Header$
1f0b5989221c9f985c461d18e10067e38d55c470Luke SmithDescription : String constants for CASL keywords to be used for parsing and printing
1f0b5989221c9f985c461d18e10067e38d55c470Luke SmithCopyright : (c) Christian Maeder and Uni Bremen 2002-2003
1f0b5989221c9f985c461d18e10067e38d55c470Luke SmithLicense : similar to LGPL, see HetCATS/LICENSE.txt or LIZENZ.txt
1f0b5989221c9f985c461d18e10067e38d55c470Luke SmithMaintainer : Christian.Maeder@dfki.de
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithStability : provisional
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithPortability : portable
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithString constants for keywords to be used for parsing and printing
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith- all identifiers are mixed case (i.e. the keyword followed by a capital S)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith- see <http://www.cofi.info/Documents/CASL/Summary/> from 25 March 2001,
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith C.4 Lexical Syntax
1f0b5989221c9f985c461d18e10067e38d55c470Luke Smith-- * context dependend keywords
1f0b5989221c9f985c461d18e10067e38d55c470Luke Smith-- | sub sort indicator
1f0b5989221c9f985c461d18e10067e38d55c470Luke SmithlessS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | modifier for 'existsS'
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithexMark :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | modifier for 'funS' or 'colonS'
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithquMark :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- * type constructors
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | total function arrow
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithfunS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | partial function arrow
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithpFun :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithpFun = funS ++ quMark
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | ascii product type sign
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithprodS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | alternative latin1 product type sign
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithtimesS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithtimesS = "\215"
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke Smith-- * symbol keywords
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke Smith-- | the colon sign
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke SmithcolonS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | the dot sign (ascii)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithdotS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | the alternative latin1 centered dot sign
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithcDot :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithcDot = "\183"
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke Smith-- | the vertical bar
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke SmithbarS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | arrow started with a bar
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithmapsTo :: String
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke SmithmapsTo = "|->"
e8d16592842bdb884e0e4d938f334b6ac5b7cad0Luke Smith-- | two colons and an equal sign
9563d8a01a40e508f7697d9c674c164512940371Luke SmithdefnS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithdefnS = "::="
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | a colon with a question mark
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithcolonQuMark :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithcolonQuMark = colonS ++ quMark
acf1a78b9c946fbd3560053c3390089b37ce6072Luke Smith-- | the exists keyword with an exclamation mark
acf1a78b9c946fbd3560053c3390089b37ce6072Luke SmithexistsUnique :: String
acf1a78b9c946fbd3560053c3390089b37ce6072Luke SmithexistsUnique = existsS ++ exMark
acf1a78b9c946fbd3560053c3390089b37ce6072Luke Smith-- * comment keywords
acf1a78b9c946fbd3560053c3390089b37ce6072Luke Smith-- | one percent sign
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithpercentS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithpercentS = "%"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | two percent signs (for line comments)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithpercents :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithpercents = percentS ++ percentS
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithleft_assocS, right_assocS, precS, displayS, numberS, stringS, listS,
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith floatingS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithleft_assocS = "left_assoc"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithright_assocS = "right_assoc"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithprecS = "prec"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithdisplayS = "display"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithnumberS = "number"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithstringS = "string"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithlistS = "list"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithfloatingS = "floating"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- * formula symbols
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | implication arrow (equal and greater)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithimplS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | equivalent sign
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithequivS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithequivS = "<=>"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | the alternative latin1 negation sign for not
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithnegS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithnegS = "\172"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | logical and using slashes
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithlAnd :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | logical or using slashes
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithlOr :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- * further HasCASL key signs
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | assign sign (colon and equal)
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithassignS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithassignS = ":="
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | minus sign (for variance)
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithminusS :: String
ef820a2b98579b004dc187276f739fd5774a791fLuke Smith-- | plus sign (for variance)
9563d8a01a40e508f7697d9c674c164512940371Luke SmithplusS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | total continuous function arrow
9563d8a01a40e508f7697d9c674c164512940371Luke SmithcontFun :: String
ef820a2b98579b004dc187276f739fd5774a791fLuke SmithcontFun = minusS ++ funS
ef820a2b98579b004dc187276f739fd5774a791fLuke Smith-- | partial continuous function arrow
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithpContFun :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithpContFun = minusS ++ pFun
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | lambda sign (backslash)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithlamS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | at sign (for as pattern)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithasP :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | assign sign in monad notation
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithrightArrow :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithrightArrow = "<-"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- * further HasCASL keywords
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithinternalS, classS, programS, instanceS, caseS, ofS, letS, derivingS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithclassS = "class"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithprogramS = "program"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithinstanceS = "instance"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithcaseS = "case"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithderivingS = "deriving"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithinternalS = "internal"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithwhereS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithwhereS = "where"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | for monad notation
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithdoS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | the new keyword fun ('funS' is already defined differently)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithfunctS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithfunctS = "fun"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- * CoCasl key signs
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | the diamond sign (less and greater)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithdiamondS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithdiamondS = "<>"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | the greater sign
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithgreaterS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithgreaterS = ">"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- * Modal CASL keywords
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithmodalityS, modalitiesS, flexibleS, rigidS, termS, emptyS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithmodalityS = "modality"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithmodalitiesS = init modalityS ++ "ies"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithflexibleS = "flexible"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithrigidS = "rigid"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithtermS = "term"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithemptyS = "empty"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- * CspCasl key signs
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | Prefix processes
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithprefix_procS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithprefix_procS = "->"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | sequential process operator
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithsequentialS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithsequentialS = ";"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smith-- | interleaving parallel operator
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithinterleavingS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithinterleavingS = "|||"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | synchronous parallel operator
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithsynchronousS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithsynchronousS = "||"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | Open generalised parallel
9563d8a01a40e508f7697d9c674c164512940371Luke Smithgenpar_openS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithgenpar_openS = "[|"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | Close generalised parallel
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithgenpar_closeS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithgenpar_closeS = "|]"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | Open alpabetised parallel
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithalpar_openS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithalpar_openS = "["
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | Separator in alpabetised parallel
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithalpar_sepS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithalpar_sepS = "||"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | Close alpabetised parallel
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithalpar_closeS :: String
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithalpar_closeS = "]"
9563d8a01a40e508f7697d9c674c164512940371Luke Smith-- | External choice
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithexternal_choiceS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithexternal_choiceS = "[]"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | Internal choice
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithinternal_choiceS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithinternal_choiceS = "|~|"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- | Hiding (process)
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithhiding_procS :: String
9533104fb7447a0765dc2aafec105c729d2c1be7Luke Smithhiding_procS = "\\"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | Open a renaming (process)
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithren_proc_openS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smithren_proc_openS = "[["
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smith-- | Close a renaming (process)
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke Smithren_proc_closeS :: String
9563d8a01a40e508f7697d9c674c164512940371Luke Smithren_proc_closeS = "]]"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith-- * standard lower case letter keywords
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith cogeneratedS,
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke Smith propS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithelseS = "else"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithfalseS = "false"
9563d8a01a40e508f7697d9c674c164512940371Luke SmithtrueS = "true"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithwhenS = "when"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmitharchS = "arch"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithassocS = "assoc"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithaxiomS = "axiom"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithpredS = "pred"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithclosedS = "closed"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithcommS = "comm"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithesortS = "esort"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithetypeS = "etype"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithexistsS = "exists"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithforallS = "forall"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithfreeS = "free"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithcofreeS = "cofree"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithfromS = "from"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithgeneratedS = "generated"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithcogeneratedS = "cogenerated"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithgivenS = "given"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithhideS = "hide"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithidemS = "idem"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithlambdaS = "lambda"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithlibraryS = "library"
9563d8a01a40e508f7697d9c674c164512940371Luke SmithlocalS = "local"
9533104fb7447a0765dc2aafec105c729d2c1be7Luke SmithlogicS = "logic" -- new keyword
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithresultS = "result"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithrevealS = "reveal"
9563d8a01a40e508f7697d9c674c164512940371Luke SmithsortS = "sort"
daa301d2a0f17b5c1b04d777de3acf969b9b63d2Luke SmithspecS = "spec"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmiththenS = "then"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithtypeS = "type"
4e67a495f88a68220462c5e1149e16824b566cc1Luke SmithcotypeS = "cotype"
4e67a495f88a68220462c5e1149e16824b566cc1Luke SmithunitS = "unit"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithversionS = "version"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithviewS = "view"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithwithS = "with"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithwithinS = "within"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithpropS = "prop"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithrefinementS, refinedS, behaviourallyS :: String
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithrefinementS = "refinement"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithrefinedS = "refined"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithbehaviourallyS = "behaviourally"
5f99c9b24c89427b620c7379c7e2febe9ad5491fLuke SmithviaS, dataS :: String
4e67a495f88a68220462c5e1149e16824b566cc1Luke SmithdataS = "data"