Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!news.albasani.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: Kaz Kylheku Newsgroups: comp.programming Subject: Re: My answer about Ada and FreePascal and C++ Date: Sat, 2 Jan 2016 03:23:15 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 51 Message-ID: <20160101190553.82@kylheku.com> References: <20151231165420.592@kylheku.com> <8737uh4bd0.fsf@bsb.me.uk> <1cgmbawv5ehql$.1wjzek6ys3t2l$.dlg@40tude.net> 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:6161 On 2016-01-02, JJ wrote: > On Fri, 01 Jan 2016 14:34:35 +0000, Ben Bacarisse wrote: >> >> No, there's nothing wrong with BNF itself. It can describe a language where >> a semicolon is a statement separator: >> >> statement-list: >> statement >> statement-list ; statement >> >> and it can describe one in which the semicolon is a statement >> terminator: >> >> statement-list: >> statement ; >> statement-list statement ; >> >> although in the later case it's more normal to put the semicolon into >> the production for a statement: >> >> statement-list: >> statement >> statement-list statement >> >> statement: >> statement-content ; >> >> > > So, it's that page's author then? No, it's not the author either. It's the design of Pascal, whose grammar the author was just writing down in BNF. You may be tripped up by the fact that some Pacal dialects have a null statement, whose use looks like a terminating semicolon: begin a := a + 1; end In the above block, we have two statements: a = a + 1 and a null statement, separated by a semicolon! ISO 7185:1990 Pascal has such a thing in its grammar; see the "empty-statement" rule in , section 6.8.2.1. Perhaps some Pascal dialects have actual statement-terminating semicolons in their grammars.