Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "...the value becomes,indeterminate each time the declaration is reached" Date: Thu, 14 Feb 2019 02:41:38 -0800 Organization: None to speak of Lines: 58 Message-ID: References: <87ftsva8o7.fsf@bsb.me.uk> <62e2da0a-0d2d-49d5-8535-8ebf922eb014@googlegroups.com> <87a7j39ho4.fsf@bsb.me.uk> <75fe55ac-a651-454a-a1c4-5d63a290b1cb@googlegroups.com> <87sgwumf7m.fsf@bsb.me.uk> <87mun1n5s4.fsf@bsb.me.uk> <3a070eb4-bc4f-4e8f-bcc6-2ac10ff9dd93@googlegroups.com> <87bm3hm1k0.fsf@bsb.me.uk> <87k1i4l2rq.fsf@bsb.me.uk> <8d0f14e9-5fa9-4eba-ae9e-f7c7c6adbd00@googlegroups.com> <9fde77b9-146e-469b-acca-4ca8fa6ca7a3@googlegroups.com> <59d99fab-ec13-4a0c-8314-e019c1c7f98e@googlegroups.com> <87va1nidkp.fsf@bsb.me.uk> <21dbf236-b562-4918-b474-09e96500ca2b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="7abae82b86b742dc3dc12a67ad2e28f4"; logging-data="7629"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kP2e4gb2ZEydhpjYnyH72" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:hd4OmxGxKe9nKSig9v/UirR2RYw= sha1:RuX+CkC2E3WfBsDJ4KyZIM6pz9k= Xref: csiph.com comp.lang.c:140989 Malcolm McLean writes: > On Wednesday, 13 February 2019 21:27:47 UTC, Ben Bacarisse wrote: >> Malcolm McLean writes: >> > On Wednesday, 13 February 2019 15:10:35 UTC, David Brown wrote: >> >> Show a link of a reputable source agreeing with your idea of "grammar", >> >> and I will be happy. You showed a link with no backing (some random >> >> guys off the internet /might/ be right, but it is hardly persuasive) >> >> that gives different opinions which /disagree/ with you. >> > >> > https://tomassetti.me/ebnf/ >> >> That page uses the very limited meaning that you reject. Why are you >> linking to it? >> >> > A grammar can be used to define two opposite things: >> > >> > how to recognize the different portions in a piece of code written >> > in the formal language >> > >> > the possible ways to build a valid piece of code in the formal language >> >> You must see that he means the very most limited meaning for grammar. >> The opposites being parsing strings in the language of the grammar and >> generating strings in the language of the grammar. >> >> If it is not immediately clear that he means only syntax, he gives an >> example staring where your quote ends -- it gives valid documents as >> those with the correct syntax. >> >> Your quoting this page worries me. >> > He defines grammar broadly, using a definition compatible with mine. > He then goes on to talk about restricted grammars that don't actually > achieve the goals he has set out. That's inevitable in a technical > programming paper. No, he doesn't. The author uses the word "grammar" *only* in the sense that can be defined by EBNF and by Annex A of the C standard (which I think uses BNF, not EBNF). I guess that you misunderstood his statement that an EBNF grammar can be (but rarely is) used to generate valid documents in the specified language. The article is titled "EBNF: How to Describe the Grammar of a Language", and the content of the article is entirely consistent with that title. > The challenge was to find a source adopting the definition, not > someone who doesn't talk about Backus Naur grammars. And you've failed that challenge. Of course you'll never admit that. I mention this mostly so that others don't misunderstand that web page. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */