🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6353

Language Specification (was Re: Language Design)

#6353
From: Hank Dietz
Date: Fri, 24 Mar 1989 17:34
22 lines
1728 bytes
In article <89Mar23.094504est.4328@turing.toronto.edu> holt@turing.toronto.edu (Ric Holt) writes:
[stuff as to CFGs needing a finite set of terminals, and the K&R grammar having
 an infinite set of terminals.]
>
>This question (is C's grammar context free) is 
>important and we should get a clear answer to it rather than outbursts.
>Could someone please settle this definitely?
>		Ric Holt


Clever thought, but wrong.  The *grammar* in K&R only talks of terminals
which are taken from a finite set of lexical types, not of the inifinite set
of possible lexemes whose structure is defined within the surrounding text
but not in the grammar.

In as much as it is given, the grammar for C in K&R IS context free; some of
the stuff defined in the text around it might not be (e.g., lexical
analysis), but the whole issue isn't worth this network bandwidth.  C is
easily parsed using any of LL(1), LALR(1), etc., with only the usual lexical
trickery (AKA the usual symbol table mechanism).

						-hankd@ee.ecn.purdue.edu
Technical Details
Message-ID: <11104@pur-ee.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!j.cc.purdue.edu!pur-ee!hankd
References: <5200040@m.cs.uiuc.edu> <12443@watdragon.waterloo.edu> <9122@claris.com> <12606@watdragon.waterloo.edu> <9162@claris.com> <89Mar23.094504est.4328@turing.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!j.cc.purdue.edu!pur-ee!hankd
From: hankd@pur-ee.UUCP (Hank Dietz)
Newsgroups: comp.lang.misc
Subject: Language Specification (was Re: Language Design)
Summary: Context-free yes, but that's not everything
Keywords: context-free grammars (CFGs)
Message-ID: <11104@pur-ee.UUCP>
Date: 24 Mar 89 17:34:29 GMT
References: <5200040@m.cs.uiuc.edu> <12443@watdragon.waterloo.edu> <9122@claris.com> <12606@watdragon.waterloo.edu> <9162@claris.com> <89Mar23.094504est.4328@turing.toronto.edu>
Reply-To: hankd@pur-ee.UUCP (Hank Dietz)
Organization: Purdue University Engineering Computer Network
Lines: 22