Re: problems with identifiers and keywords...

glen herrmannsfeldt <gah@ugcs.caltech.edu>
17 Nov 2004 11:30:10 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-06)
Re: problems with identifiers and keywords... wclodius@lanl.gov (2004-11-06)
Re: problems with identifiers and keywords... wyrmwif@tsoft.org (SM Ryan) (2004-11-07)
Re: problems with identifiers and keywords... vbdis@aol.com (2004-11-07)
Re: problems with identifiers and keywords... cfc@shell01.TheWorld.com (Chris F Clark) (2004-11-14)
Re: problems with identifiers and keywords... genew@mail.ocis.net (Gene Wirchenko) (2004-11-14)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-17)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-17)
Re: problems with identifiers and keywords... lkrupp@pssw.NOSPAM.com.INVALID (Louis Krupp) (2004-11-17)
Re: problems with identifiers and keywords... cfc@shell01.TheWorld.com (Chris F Clark) (2004-11-17)
Re: problems with identifiers and keywords... nmm1@cus.cam.ac.uk (2004-11-19)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-19)
Re: problems with identifiers and keywords... gracjan@acchsh.nospam.com (Gracjan Polak) (2004-11-19)
[9 later articles]
| List of all articles for this month |

From: glen herrmannsfeldt <gah@ugcs.caltech.edu>
Newsgroups: comp.compilers
Date: 17 Nov 2004 11:30:10 -0500
Organization: Comcast Online
References: 04-10-148 04-10-170 04-10-174 04-11-008 04-11-011 04-11-032
Keywords: syntax, design, errors
Posted-Date: 17 Nov 2004 11:30:10 EST

Gene Wirchenko wrote:
(snip)


> My contributions to the world of compilers:


> Keyword "KW" is not legal in this context.


> You can not use the keyword "KW" here.


> An identifier was expected, but the keyword "KW" was
> encountered. Change the keyword to a valid identifier.


(snip of joke)
(snip)


I just tried the following in gcc 2.7.2.3:


main() {
int int;
float return;
char for,while,else;
for(for=0;do<else;while++) return return;
}




which came up with:


thing.c: In function `main':
thing.c:2: warning: useless keyword or type name in empty declaration
thing.c:2: warning: empty declaration
thing.c:3: parse error before `return'
thing.c:5: parse error before `for'


not quite as funny as your (snipped) joke, but it would
take a while to figure out what it meant.


-- glen


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.