|language design tradeoffs firstname.lastname@example.org (1992-09-07)|
|Re: language design tradeoffs email@example.com (1992-09-08)|
|Re: language design tradeoffs nr@dynastar.Princeton.EDU (1992-09-09)|
|Re: language design tradeoffs raveling@Unify.com (1992-09-11)|
|Re: language design tradeoffs firstname.lastname@example.org (1992-09-13)|
|Re: language design tradeoffs email@example.com (1992-09-14)|
|Re: language design tradeoffs firstname.lastname@example.org (1992-09-14)|
|Re: language design tradeoffs email@example.com (1992-09-15)|
|[33 later articles]|
|From:||firstname.lastname@example.org (Torben AEgidius Mogensen)|
|Organization:||Department of Computer Science, U of Copenhagen|
|Date:||Tue, 8 Sep 1992 11:07:58 GMT|
email@example.com asks about languages with EOL as command separator
contra using a visible character (like ;).
Several languages (e.g. Miranda) use EOL as separator. It gives an
uncluttered syntax, but requires special structure if command or
expressions can't fit on a line. Some languages (Haskell and some versions
of BASIC) allow both EOL and e.g. ; as separators, thus allowing mixed
It is even possible to make grouping dependent on indentation: if the next
line is indented more than the present, it is considered an extension of
the present line. This approach is used in Haskell and something similar
applies in Miranda (though the indentation is dependent on the position of
keywords on the previous line).
An example of this (in no particular language) is the following
which is equivalent to
As for specifying a grammar for this, I believe it is better to handle the
problem during the lexical analysis, making each new line generate one or
more separators: "," if the indentation is the same, "(" if it is greater,
and one or more ")" if it is smaller.
Torben Mogensen (firstname.lastname@example.org)
Return to the
Search the comp.compilers archives again.