User friendly version of the CCSL grammar
The grammar is given in BNF with
- | denotes alternative
- [] denotes an optional occurence
- {} denotes repetition (including zero)
- UPPER-CASE symbols are terminals, they denote either
keywords or
symbolic tokens
Reserved words
The following words are keywords. Case is not
significant for keywords.
adt
always
and
as
assertion
attribute
begin
bool
carrier
cases
classspec
constant
constructor
creation
defining
else
end
endcases
eventually
exists
false
final
for
forall
from
groundsignature
groundterm
groundtype
if
iff
implies
importing
in
inherit
lambda
let
method
mixed
neg
not
of
or
pos
private
public
renaming
request
self
selfvar
then
theorem
true
type
var
with
The string "PROJ_" followed by a natural number denotes a
projection.
Identifiers
Identifiers are sequences out of letters, digits, underscores and
questionmarks. Identifiers are required to start with a letter.
For identifiers case is significant.
Infix operators
Infix operators are sequences out of
! $ & * +
- .
/ \ :
< = > ?
@ ^ | ~
#
starting with either
$ & * +
-
/ \
< = >
@ ^ | ~
#
Infix operators are grouped into precedence levels according to
their starting characters. Associativity is fixed and depends on
the precedence level. With decreasing precedence there are the
following levels:
- operators starting with ** : right associative
- starting with *, / , or \ : left associative
- starting with + or - : left associative
- starting with one of @, ^ or # : left associative
- starting with either =, ~, <, >, |, & or $ : non-associative
Two infix operators are predefined:
- = for equality
- ~ for behavioral equality
Symbols
The following table shows the defines symbolic tokens.
| ARROW | -> | |
EOF | <end of input> |
| ASSIGN | := | | EQUAL | = |
| CBRACE | } | | OBRACE | { |
| CBRACKET | ] | | OBRACKET | [ |
| COLON | : | | OPAREN | ( |
| COMMA | , | | QUESTIONMARK | ? |
| CPAREN | ) | | SEMICOLON | ; |
| DOT | . | | VALUE | <a sequence of digits> |
DOUBLECOLON | :: |
Last modified:
25 Jun 2002
by Hendrik