Prev Up Next
Go backward to 3 Disambiguation
Go up to Top
Go forward to 5 Display Format

4 Lexical Syntax

The lexical syntax for identifiers used for sorts, operation symbols, and variables is as follows, using conventional notation for character classes in the productions for WORD and SIGNS.

  ID               ::= MIX-ID  |  MIX-ID [ ID,...,ID ]
  MIX-ID           ::= TOKEN  |  TOKEN __  |  __  
                     | TOKEN __ MIX-ID  |  __ MIX-ID
  TOKEN-ID         ::= TOKEN  |  TOKEN [ ID,...,ID ]
  SIMPLE-ID        ::= WORDS

  TOKEN            ::= WORDS  |  SIGNS  |  .WORDS
  WORDS            ::= WORD_..._WORD 
  WORD             ::= [A-Za-z0-9'À-ÖØ-öø-ÿ]+ 
  SIGNS            ::= [+-*/&^#$~>=<@?!|\\:.{}\[\]!`-?`×÷]+ 

! VERSION           ::= ... (not yet decided)

The following characters are not allowed to occur at all in a TOKEN:

                        (  )  ;  ,  `  "  %

The following restrictions are not captured by the grammar above:

See Section 6 for the proposed lexical syntax of comments and annotations.


CoFI Document: CASL/SyntaxIssues --Version 0.99-- 17 February 1998.
Comments to cofi-language@brics.dk

Prev Up Next