Newsgroups: | comp.compilers |
From: | everettm@walters.East.Sun.COM (Mark Everett - Sun Parallel Open Systems) |
Keywords: | syntax, design |
Organization: | Sun Microsystems Inc. - BDC |
References: | 95-05-031 |
Date: | Thu, 11 May 1995 14:10:05 GMT |
"Dr A. N. Walker" <anw@maths.nottingham.ac.uk> writes:
> ludemann@netcom.com (Peter Ludemann) writes about semicolon-free syntaxes:
> >Indeed: I can think of 3 examples.
>
> Here is a fourth: throw away the semicolons in Pascal, and the
> only ambiguity is that you can't always see where the empty statements are.
> This can easily be cured by adding a visible representation [such as ";"]
> of such statements.
>
> Whether this is a Good Thing from the point of view of the poor
> programmer trying to make sense of the error messages coming from the
> compiler is quite another matter.
I was always under the impression that garbage characters like ';' were
there to enable error recovery to provide meaningful error messages. Statement
delimiters are a place where the compiler can "sync up" with what it is
expecting. They are not needed in correct programs, but rather incorrect
ones.
-everettm
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.