Path: csiph.com!news.fcku.it!aioe.org!.POSTED!not-for-mail From: Kaz Kylheku Newsgroups: comp.programming Subject: Re: My answer about Ada and FreePascal and C++ Date: Fri, 1 Jan 2016 01:07:16 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 35 Message-ID: <20151231165420.592@kylheku.com> References: NNTP-Posting-Host: OGJi3KNpFOhM58UHZwXj0w.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org User-Agent: slrn/pre1.0.0-18 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.programming:6154 On 2016-01-01, JJ wrote: > On Thu, 31 Dec 2015 18:59:26 +0000, Richard Heathfield wrote: >> >> ... Pascal incorrectly uses the semicolon as a >> separator rather than as a terminator, ... > > What kind of separator is that? > I've used Pascal since Turbo Pascal 4 and up to Free Pascal Compiler and > Delphi, but I've never seen a semicolon used a separator. See this Pascal BNF grammar, for instance, which looks like some traditiona, old Pascal: http://www2.informatik.uni-halle.de/lehre/pascal/sprache/pas_bnf.html In every production where a semicolon terminal symbol appears, it is preceded and followed by something (a something which doesn't derive an empty string). Hence it is a separator. Never mind that, I'm looking now at a copy of what appears to be the ISO Pascal 1990 standard, ISO/IEC 7185:1990 (E). This document defines a grammar which has some terminating uses of the semicolon, notably in the area of declarations. To wit, 6.2.1 type-definition-part = [ 'type' type-definition ';' { type-definition ';' } . and various other examples. However: 6.8.3.1 statement-sequence = statement { ';' statement } . Likewise, various others. This inconsistency is arguably worse than making the semicolon always a separator or always a terminator.