🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6384

Re: Language Design, or: is C's Grammar Context Free

#6384
From: David Gudeman
Date: Sun, 09 Apr 1989 15:06
15 lines
1254 bytes
In article  <16807@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes:
]In article <920@m10ux.ATT.COM> mnc@m10ux.ATT.COM (Michael Condict) writes:
]>What you are ignoring is that very few parsers stand alone by themselves.
]
]We are not ignoring this.  The topic was `context free grammars', not
]`compilers and parsers'.  If you want to argue that one cannot build
]a useful compiler using a CFG approximation for C, that is fine (since
]we have seen that this is true).  Just do not do it by saying that
]there is no context free grammar that recognises all valid C programs.

There is no context free grammar that recognises all valid C programs.
Several people have pointed out that your artificial definition of
syntax (anything that can be described with a context free grammar)
begs the issue.  By my definition of syntax, and aparently that of
most other posters, C's syntax is not context free.
Technical Details
Message-ID: <10148@megaron.arizona.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ig!arizona!gudeman

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ig!arizona!gudeman
From: gudeman@arizona.edu (David Gudeman)
Newsgroups: comp.lang.misc
Subject: Re: Language Design, or: is C's Grammar Context Free
Message-ID: <10148@megaron.arizona.edu>
Date: 9 Apr 89 15:06:42 GMT
Organization: U of Arizona CS Dept, Tucson
Lines: 15