Prev Up
Go backward to C.4 Lexical Syntax
Go up to C Concrete Syntax

C.5 Comments and Annotations

Both comments and annotations can be used to provide auxiliary information that gets attached to the abstract syntax trees of CASL specifications. The start of comments and annotations is always indicated by a percent character `%' followed immediately by a non-space character.

Comments may be inserted anywhere (between other lexical symbols) in CASL specifications. Their only significance is for the human reader; they are completely ignored by the semantics, and by tools, in general. Formatters are, of course, expected to display comments.

In contrast, annotations may only be inserted at particular places in CASL specifications, and they may be significant for particular tools (including parsers and formatters). Currently, the only annotations whose syntax has been decided are for tagging constructs with labels, and for changing the display of declared symbols. Formatters are expected to display the former, whereas the latter are only shown indirectly, by the effect that they have.

The further annotations to be provided concern parsing (precedence information that allows omission of grouping parentheses when using mixfix notation in terms) and the semantic relationship between parts of specifications.

  • C.5.1 Comments
  • C.5.2 Annotations
  • C.5.2.1 Label Annotations
  • C.5.2.2 Display Annotations
  • C.5.2.3 Parsing Annotations
  • C.5.2.4 Semantic Annotations

  • CoFI Document: CASL/Summary-v1.0 -- Version: 1.0 -- 22 October 1998.
    Comments to cofi-language@brics.dk

    Prev Up