[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[CASL] Re: Position of Comments and Annotations



Bernd wrote:

> Based on the exchange I wrote a kind of Study Note which I am
> including below. As I agree with most of Peter's remarks, you can
> consider this as a joint proposal by me and him

Right - although I hadn't seen the following section before it was
sent:

> ------  Summary of proposed changes ------------------------------------
>
> present					future
> 
> - end-of-line comment	%%...eol		%%...eol
>
> - bracketed comment	<none>			%{...maybe 
>						  several lines}%

The above it a bit misleading, I think.  Here's what we have now:
<http://www.brics.dk/Projects/CoFI/Documents/CASL/Summary/index_135.html>

  C.5.1 Comments

  A comment starts with `%%'. It is terminated either by another `%%' on
  the same line, or by a subsequent line that starts with some symbol
  other than `%%' (ignoring spaces). Thus the usual pattern is:

	CASL symbols...%% first comment line...
	%% maybe more comment lines...
	%% last comment line... %% CASL symbols...

  allowing also a short comment to occur in the middle of a line: 

	CASL symbols...%% short comment... %% CASL symbols...

Thus the present concrete syntax gives the same effect as a bracketed
comment (and moreover reflects that only one comment per node is
allowed).

> - commented-out text	<none>			%[text, not displayed]%

loc. cit.:

  Text that is `commented-out' in a CASL specification is indicated by a
  comment of the form `%(...%)'; it is not shown at all in the display
  format. Note that comments introduced by `%%' may occur within
  `%(...%)', and vice versa; but further nesting of comments is not
  possible.

The above was added in July 1999, following discussion of an earlier
proposal by Till.

> - general annotation	<non-uniform>		%annoId ...eol
> - bracketed annotation<none>			%annoId(...)%
> 
> - label annotation	%[labelId] text eol	text %(labelId)% eol

[BKB: sorry, I had overlooked this version; but the proposal nevertheless holds]

I think that the eols in label annotations (present and future) are
not required.

[BKB: of course not; this was just meant to indicate the end-of-line]

> - display annotation old	
> 		op div: Int * Int -> Int %!<latex>$\div$<html>&divide;%!
> 
> - display annotation new [independent of declaration, as for %prec etc.
> 		%display(div %latex \div 
> 					 %html &divide;)%

-- Peter
____________________________________________________________

Peter D. Mosses *                   mailto:pdmosses@brics.dk
Centre of Informatics               [forward:pdm@di.ufpe.br]
Federal University of Pernambuco    http://www.brics.dk/~pdm
CP 7851                             Tel:+55 81 271.8430x3057
Recife, PE, Brazil, CEP 50732-970   Fax:+55 81 271.8438
____________________________________________________________

* I'm visiting Recife until August 2000, while on leave from 
  BRICS & Dept of Computer Science, Univ of Aarhus,  Denmark