Keywords.hs revision 743178d5294deadc2ed15e56b5e58ca0e7101fe4
55cf6e01272ec475edea32aa9b7923de2d36cb42Christian Maeder{- |
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasModule : $Header$
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens ElknerDescription : String constants for CASL keywords to be used for parsing
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias and printing
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasCopyright : (c) Christian Maeder and Uni Bremen 2002-2003
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederLicense : GPLv2 or higher, see LICENSE.txt
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasMaintainer : Christian.Maeder@dfki.de
ad1df93673cf323534cdfe18981ad5daae4c90c0Jonathan von SchroederStability : provisional
1e622ddf5a057555db1924ddc88475c695c6f7f2Alexis TsogiasPortability : portable
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasString constants for keywords to be used for parsing and printing
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias- all identifiers are mixed case (i.e. the keyword followed by a capital S)
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias- see <http://www.cofi.info/Documents/CASL/Summary/> from 25 March 2001,
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias C.4 Lexical Syntax
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias-}
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
f88f637f3c7ff472142b07dcc12230375a5f1c28Christian Maedermodule Common.Keywords where
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias-- * context dependend keywords
e16b3696b2c173aac14200321868ed81b8f7dc69Christian Maeder
87d946b3c13ffd7f6391aa796e786c2b31b122b1Jonathan von Schroeder-- | sub sort indicator
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaederlessS :: String
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaederlessS = "<"
e16b3696b2c173aac14200321868ed81b8f7dc69Christian Maeder
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias-- | modifier for 'existsS'
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasexMark :: String
87d946b3c13ffd7f6391aa796e786c2b31b122b1Jonathan von SchroederexMark = "!"
4e95ffc23b9c5f0b5980ab6f1cacbe7bd9789851Alexis Tsogias
4e95ffc23b9c5f0b5980ab6f1cacbe7bd9789851Alexis Tsogias-- | modifier for 'funS' or 'colonS'
421def3c7b0b9ca7762f809a2c57c6ee74495ffaJonathan von SchroederquMark :: String
4b9f1c9f95296f3292b2e53dbc3d196751b862dbJonathan von SchroederquMark = "?"
7dc37844730a8b23973139e9720574382de109e7Alexis Tsogias
93c8c4a8ce75cc2e02e03468a97b896f149d26ceAlexis Tsogias-- * type constructors
9d05f30775dd499da9e262b5c199b63c86cc239bJonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | total function arrow
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von SchroederfunS :: String
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von SchroederfunS = "->"
9503f59b8e16c517ba75df2512b80b354759ad1aJonathan von Schroeder
9503f59b8e16c517ba75df2512b80b354759ad1aJonathan von Schroeder-- | partial function arrow
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiaspFun :: String
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaederpFun = funS ++ quMark
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis Tsogias
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias-- | ascii product type sign
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasprodS :: String
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasprodS = "*"
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis Tsogias
beb399aad2f2d329dea36508625352fddee3c302Christian Maeder-- | alternative latin1 product type sign
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis TsogiastimesS :: String
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis TsogiastimesS = "\215"
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
e16b3696b2c173aac14200321868ed81b8f7dc69Christian Maeder-- * symbol keywords
9d05f30775dd499da9e262b5c199b63c86cc239bJonathan von Schroeder
9d05f30775dd499da9e262b5c199b63c86cc239bJonathan von Schroeder-- | the colon sign
9d05f30775dd499da9e262b5c199b63c86cc239bJonathan von SchroedercolonS :: String
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaedercolonS = ":"
a65c6747c9acbbebc93baba7bae94d2e3d8cdafbTill Mossakowski
87d946b3c13ffd7f6391aa796e786c2b31b122b1Jonathan von SchroederequiS :: String
1e622ddf5a057555db1924ddc88475c695c6f7f2Alexis TsogiasequiS = "<->"
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
8394b397aadaf0c2bfc19c0628f17f83f031a759Jonathan von Schroeder-- | the dot sign (ascii)
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiasdotS :: String
8394b397aadaf0c2bfc19c0628f17f83f031a759Jonathan von SchroederdotS = "."
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von Schroeder
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von Schroeder-- | the alternative latin1 centered dot sign
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von SchroedercDot :: String
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von SchroedercDot = "\183"
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von Schroeder
9503f59b8e16c517ba75df2512b80b354759ad1aJonathan von Schroeder-- | the vertical bar
91673dab8e4e249ffb3efe5edab8351dfaf4977dJonathan von SchroederbarS :: String
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaederbarS = "|"
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis Tsogias
8394b397aadaf0c2bfc19c0628f17f83f031a759Jonathan von Schroeder-- | arrow started with a bar
1e622ddf5a057555db1924ddc88475c695c6f7f2Alexis TsogiasmapsTo :: String
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis TsogiasmapsTo = "|->"
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis Tsogias
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis Tsogias-- | two colons and an equal sign
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis TsogiasdefnS :: String
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis TsogiasdefnS = "::="
1566df29333319b713031b86c7d18171e5a009bdJonathan von Schroeder
1566df29333319b713031b86c7d18171e5a009bdJonathan von Schroeder-- | a colon with a question mark
f88f637f3c7ff472142b07dcc12230375a5f1c28Christian MaedercolonQuMark :: String
e21e5f0fa66bf80e14cfd3f571e09b3952e46ad9Alexis TsogiascolonQuMark = colonS ++ quMark
e16b3696b2c173aac14200321868ed81b8f7dc69Christian Maeder
e16b3696b2c173aac14200321868ed81b8f7dc69Christian Maeder-- | the exists keyword with an exclamation mark
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaederexistsUnique :: String
e16b3696b2c173aac14200321868ed81b8f7dc69Christian MaederexistsUnique = existsS ++ exMark
8394b397aadaf0c2bfc19c0628f17f83f031a759Jonathan von Schroeder
1e622ddf5a057555db1924ddc88475c695c6f7f2Alexis Tsogias-- * comment keywords
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
409eb8adf8c7ee0609aef256b67f5dfad2fb6386Alexis Tsogias-- | one percent sign
e24ad3f655daa60ddabe690e4b11de3187996c16cmaederpercentS :: String
e24ad3f655daa60ddabe690e4b11de3187996c16cmaederpercentS = "%"
e24ad3f655daa60ddabe690e4b11de3187996c16cmaeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | two percent signs (for line comments)
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroederpercents :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroederpercents = percentS ++ percentS
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
8c7aa750542dcadb94b971be712564a9a8f1d189Christian Maeder-- * formula symbols
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | implication arrow (equal and greater)
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederimplS :: String
8c7aa750542dcadb94b971be712564a9a8f1d189Christian MaederimplS = "=>"
87d946b3c13ffd7f6391aa796e786c2b31b122b1Jonathan von Schroeder
8c030738bc90ffb417074a9502c0bac2ed414e2eJonathan von Schroeder-- | equivalent sign
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von SchroederequivS :: String
87d946b3c13ffd7f6391aa796e786c2b31b122b1Jonathan von SchroederequivS = "<=>"
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | the alternative latin1 negation sign for not
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroedernegS :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroedernegS = "\172"
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
87d946b3c13ffd7f6391aa796e786c2b31b122b1Jonathan von Schroeder-- | logical and using slashes
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederlAnd :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederlAnd = "/\\"
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | logical or using slashes
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederlOr :: String
8c7aa750542dcadb94b971be712564a9a8f1d189Christian MaederlOr = "\\/"
8c7aa750542dcadb94b971be712564a9a8f1d189Christian Maeder
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von Schroeder-- * further HasCASL key signs
0f1637f1e645957ce9e29926d3d2607ea8498961Jonathan von Schroeder
8c7aa750542dcadb94b971be712564a9a8f1d189Christian Maeder-- | assign sign (colon and equal)
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von SchroederassignS :: String
0f1637f1e645957ce9e29926d3d2607ea8498961Jonathan von SchroederassignS = ":="
0f1637f1e645957ce9e29926d3d2607ea8498961Jonathan von Schroeder
8c7aa750542dcadb94b971be712564a9a8f1d189Christian Maeder-- | minus sign (for variance)
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von SchroederminusS :: String
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von SchroederminusS = "-"
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von Schroeder
8c7aa750542dcadb94b971be712564a9a8f1d189Christian Maeder-- | plus sign (for variance)
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von SchroederplusS :: String
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von SchroederplusS = "+"
bf453a6867cca0aa530bc8cac9eed9c3f70594b4Jonathan von Schroeder
0f1637f1e645957ce9e29926d3d2607ea8498961Jonathan von Schroeder-- | total continuous function arrow
0f1637f1e645957ce9e29926d3d2607ea8498961Jonathan von SchroedercontFun :: String
0f1637f1e645957ce9e29926d3d2607ea8498961Jonathan von SchroedercontFun = minusS ++ funS
55dfa79a16e5f0ddb60bceab3717c07e62e65846Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | partial continuous function arrow
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederpContFun :: String
8c7aa750542dcadb94b971be712564a9a8f1d189Christian MaederpContFun = minusS ++ pFun
9d05f30775dd499da9e262b5c199b63c86cc239bJonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | lambda sign (backslash)
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederlamS :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederlamS = "\\"
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | at sign (for as pattern)
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederasP :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederasP = "@"
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | Here sign
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederhereP :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederhereP = "Here"
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von Schroeder-- | Bind sign
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederbindP :: String
3a9fce5398f4621558ca220c66c87cee59adc258Jonathan von SchroederbindP = "Bind"
-- | assign sign in monad notation
rightArrow :: String
rightArrow = "<-"
-- * further HasCASL keywords
-- | the new keyword fun ('funS' is already defined differently)
functS :: String
functS = "fun"
-- * CoCasl key signs
-- | the diamond sign (less and greater)
diamondS :: String
diamondS = "<>"
-- | the greater sign
greaterS :: String
greaterS = ">"
-- * OWL key signs
lessEq :: String
lessEq = "<="
greaterEq :: String
greaterEq = ">="
-- * CspCasl key signs
-- | Prefix processes
prefix_procS :: String
prefix_procS = "->"
-- | sequential process operator
sequentialS :: String
sequentialS = ";"
-- | interleaving parallel operator
interleavingS :: String
interleavingS = "|||"
-- | synchronous parallel operator
synchronousS :: String
synchronousS = "||"
-- | Open generalised parallel
genpar_openS :: String
genpar_openS = "[|"
-- | Close generalised parallel
genpar_closeS :: String
genpar_closeS = "|]"
-- | Open alpabetised parallel
alpar_openS :: String
alpar_openS = "["
-- | Separator in alpabetised parallel
alpar_sepS :: String
alpar_sepS = "||"
-- | Close alpabetised parallel
alpar_closeS :: String
alpar_closeS = "]"
-- | External choice
external_choiceS :: String
external_choiceS = "[]"
-- | Internal choice
internal_choiceS :: String
internal_choiceS = "|~|"
-- | Hiding (process)
hiding_procS :: String
hiding_procS = "\\"
-- | Open a renaming (process)
ren_proc_openS :: String
ren_proc_openS = "[["
-- | Close a renaming (process)
ren_proc_closeS :: String
ren_proc_closeS = "]]"
-- * logic definition symbols
newlogicS :: String
newlogicS = "newlogic"
metaS :: String
metaS = "meta"
foundationS :: String
foundationS = "foundation"
syntaxS :: String
syntaxS = "syntax"
patternsS :: String
patternsS = "patterns"
modelsS :: String
modelsS = "models"
proofsS :: String
proofsS = "proofs"
newcomorphismS :: String
newcomorphismS = "newcomorphism"
sourceS :: String
sourceS = "source"
targetS :: String
targetS = "target"
-- * DOL keywords
alignArityBackwardS :: String
alignArityBackwardS = "align-arity-backward"
alignArityForwardS :: String
alignArityForwardS = "align-arity-forward"
alignmentS :: String
alignmentS = "alignment"
combineS :: String
combineS = "combine"
distributedOntologyS :: String
distributedOntologyS = "distributed-ontology"
excludingS :: String
excludingS = "excluding"
forS :: String
forS = "for"
interpretationS :: String
interpretationS = "interpretation"
moduleS :: String
moduleS = "module"
ontologyS :: String
ontologyS = "ontology"
diagramS :: String
diagramS = "diagram"
relationS :: String
relationS = "relation"
serializationS :: String
serializationS = "serialization"
-- * frameworks
lfS :: String
lfS = "LF"
isabelleS :: String
isabelleS = "Isabelle"
maudeS :: String
maudeS = "Maude"
-- * MMT symbols
sigDelimS :: String
sigDelimS = ".."
structDelimS :: String
structDelimS = "/"
-- * Twelf conventions
-- non breaking space
whiteChars :: String
whiteChars = "\n\r\t\v\f \160"
-- special characters permitted in a Twelf symbol name
twelfSymChars :: String
twelfSymChars = "_-+*/<=>@^"
-- special characters permitted in a Twelf declaration
twelfDeclChars :: String
twelfDeclChars = twelfSymChars ++ ":{}[]()"
-- special characters permitted in a Twelf declaration of multiple symbols
twelfMultDeclChars :: String
twelfMultDeclChars = twelfDeclChars ++ ","
-- * letter keywords taken from Keywords.txt
andS :: String
andS = "and"
archS :: String
archS = "arch"
asS :: String
asS = "as"
assocS :: String
assocS = "assoc"
axiomS :: String
axiomS = "axiom"
behaviourallyS :: String
behaviourallyS = "behaviourally"
caseS :: String
caseS = "case"
classS :: String
classS = "class"
closedS :: String
closedS = "closed"
closedworldS :: String
closedworldS = "closed-world"
cofreeS :: String
cofreeS = "cofree"
cogeneratedS :: String
cogeneratedS = "cogenerated"
commS :: String
commS = "comm"
cotypeS :: String
cotypeS = "cotype"
dataS :: String
dataS = "data"
defS :: String
defS = "def"
derivingS :: String
derivingS = "deriving"
displayS :: String
displayS = "display"
doS :: String
doS = "do"
elseS :: String
elseS = "else"
emptyS :: String
emptyS = "empty"
endS :: String
endS = "end"
equivalenceS :: String
equivalenceS = "equivalence"
esortS :: String
esortS = "esort"
etypeS :: String
etypeS = "etype"
existsS :: String
existsS = "exists"
falseS :: String
falseS = "false"
fitS :: String
fitS = "fit"
flexibleS :: String
flexibleS = "flexible"
floatingS :: String
floatingS = "floating"
forallS :: String
forallS = "forall"
freeS :: String
freeS = "free"
fromS :: String
fromS = "from"
generatedS :: String
generatedS = "generated"
getS :: String
getS = "get"
givenS :: String
givenS = "given"
hideS :: String
hideS = "hide"
approximateS :: String
approximateS = "approximate"
idemS :: String
idemS = "idem"
ifS :: String
ifS = "if"
inS :: String
inS = "in"
instanceS :: String
instanceS = "instance"
internalS :: String
internalS = "internal"
lambdaS :: String
lambdaS = "lambda"
left_assocS :: String
left_assocS = "left_assoc"
letS :: String
letS = "let"
libraryS :: String
libraryS = "library"
listS :: String
listS = "list"
localS :: String
localS = "local"
logicS :: String
logicS = "logic"
minimizeS :: String
minimizeS = "minimize"
modalitiesS :: String
modalitiesS = "modalities"
modalityS :: String
modalityS = "modality"
notS :: String
notS = "not"
numberS :: String
numberS = "number"
ofS :: String
ofS = "of"
opS :: String
opS = "op"
precS :: String
precS = "prec"
predS :: String
predS = "pred"
prefixS :: String
prefixS = "prefix"
programS :: String
programS = "program"
propS :: String
propS = "prop"
refinedS :: String
refinedS = "refined"
refinementS :: String
refinementS = "refinement"
resultS :: String
resultS = "result"
revealS :: String
revealS = "reveal"
right_assocS :: String
right_assocS = "right_assoc"
rigidS :: String
rigidS = "rigid"
sS :: String
sS = "s"
sortS :: String
sortS = "sort"
specS :: String
specS = "spec"
stringS :: String
stringS = "string"
structS :: String
structS = "struct"
termS :: String
termS = "term"
thenS :: String
thenS = "then"
toS :: String
toS = "to"
trueS :: String
trueS = "true"
typeS :: String
typeS = "type"
unitS :: String
unitS = "unit"
varS :: String
varS = "var"
varsS :: String
varsS = "vars"
versionS :: String
versionS = "version"
viaS :: String
viaS = "via"
viewS :: String
viewS = "view"
whenS :: String
whenS = "when"
whereS :: String
whereS = "where"
withS :: String
withS = "with"
withinS :: String
withinS = "within"