Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!eecae!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.misc Subject: Re: Language Design, or: is C's Grammar Context Free Keywords: BNF, Grammars, Silliness Message-ID: <16559@mimsy.UUCP> Date: 27 Mar 89 17:09:54 GMT References: <5200040@m.cs.uiuc.edu> <12443@watdragon.waterloo.edu> <16557@mimsy.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 12 Incidentally, now that I have said all that (some might say `too much' :-) ), the only real difference between a C grammar that accepts undeclared typedef names and a Pascal grammar that accepts undeclared variable names is that, for some reason, people like to think of type declarators as keywords and variables as identifiers. At least, this is the only explanation I can see that we never argue whether Pascal's grammar is context free. (If you require the parser to catch undeclared variables, it is not, just as C's is not if you require the parser to catch undeclared typedef names.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris