Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #6158

Re: My answer about Ada and FreePascal and C++

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.programming
Subject Re: My answer about Ada and FreePascal and C++
Date 2016-01-01 14:34 +0000
Organization A noiseless patient Spider
Message-ID <8737uh4bd0.fsf@bsb.me.uk> (permalink)
References <n63t38$p9g$1@dont-email.me> <n63tpi$rli$1@dont-email.me> <zvygk11xgjjj.1qafdhx96mz38$.dlg@40tude.net> <20151231165420.592@kylheku.com> <nhjg07949sqg$.1f2w63mp1tynq$.dlg@40tude.net>

Show all headers | View raw


JJ <jj4public@vfemail.net> writes:

> On Fri, 1 Jan 2016 01:07:16 +0000 (UTC), Kaz Kylheku wrote:
>> 
>> 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.
>
> As far as I can see, it's a flaw in the Backus–Naur Form itself. Backus–Naur
> Form doesn't require a terminator character at the end of each rule.

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 ;

<snip>
-- 
Ben.

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: My answer about Ada and FreePascal and C++ Richard Heathfield <rjh@cpax.org.uk> - 2015-12-31 18:59 +0000
  Re: My answer about Ada and FreePascal and C++ JJ <jj4public@vfemail.net> - 2016-01-01 07:23 +0700
    Re: My answer about Ada and FreePascal and C++ Kaz Kylheku <kaz@kylheku.com> - 2016-01-01 01:07 +0000
      Re: My answer about Ada and FreePascal and C++ JJ <jj4public@vfemail.net> - 2016-01-01 18:16 +0700
        Re: My answer about Ada and FreePascal and C++ Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-01-01 14:34 +0000
          Re: My answer about Ada and FreePascal and C++ JJ <jj4public@vfemail.net> - 2016-01-02 09:58 +0700
            Re: My answer about Ada and FreePascal and C++ Kaz Kylheku <kaz@kylheku.com> - 2016-01-02 03:23 +0000
              Re: My answer about Ada and FreePascal and C++ JJ <jj4public@vfemail.net> - 2016-01-02 21:35 +0700
        Re: My answer about Ada and FreePascal and C++ Kaz Kylheku <kaz@kylheku.com> - 2016-01-01 16:08 +0000

csiph-web