RE: problems with identifiers and keywords...

"Tom Linden" <tom@kednos.com>
19 Nov 2004 00:49:30 -0500

          From comp.compilers

Related articles
problems with identifiers and keywords... micha-1@fantasymail.de (Micha) (2004-10-21)
Re: problems with identifiers and keywords... cfc@shell01.TheWorld.com (Chris F Clark) (2004-10-23)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-10-24)
Re: problems with identifiers and keywords... cfc@shell01.TheWorld.com (Chris F Clark) (2004-11-02)
Re: problems with identifiers and keywords... gah@ugcs.caltech.edu (glen herrmannsfeldt) (2004-11-06)
Re: problems with identifiers and keywords... genew@mail.ocis.net (Gene Wirchenko) (2004-11-14)
RE: problems with identifiers and keywords... tom@kednos.com (Tom Linden) (2004-11-19)
| List of all articles for this month |

From: "Tom Linden" <tom@kednos.com>
Newsgroups: comp.compilers
Date: 19 Nov 2004 00:49:30 -0500
Organization: Compilers Central
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: 19 Nov 2004 00:49:30 EST

I thought you might find amusing how PL/I deals with identifiers.
Notice I purposely did not declare the variables, so by the time
the parser has gotten to the else clause, then and else have been
implicitly declared.


FREJA> create id.pli
test: proc;
if if=then then then=else; else else=then;
end test;
*EXIT*
FREJA> pli/lis id


if if=then then then=else; else else=then;
...^
%PLIG-W-DEFDATATYP, The undeclared name "IF" has
                                been declared as a FIXED BINARY variable in the containing
                                procedure.
at line number 2 in file SYS$SYSDEVICE:[TOM]ID.PLI;1


if if=then then then=else; else else=then;
......^
%PLIG-W-DEFDATATYP, The undeclared name "THEN" has
                                been declared as a FIXED BINARY variable in the containing
                                procedure.
at line number 2 in file SYS$SYSDEVICE:[TOM]ID.PLI;1


if if=then then then=else; else else=then;
.....................^
%PLIG-W-DEFDATATYP, The undeclared name "ELSE" has
                                been declared as a FIXED BINARY variable in the containing
                                procedure.
at line number 2 in file SYS$SYSDEVICE:[TOM]ID.PLI;1


if if=then then then=else; else else=then;
^
%PLIG-I-UNINIT, variable IF is fetched, not initialized
at line number 2 in file SYS$SYSDEVICE:[TOM]ID.PLI;1


if if=then then then=else; else else=then;
^
%PLIG-I-UNINIT, variable THEN is fetched, not initialized
at line number 2 in file SYS$SYSDEVICE:[TOM]ID.PLI;1


if if=then then then=else; else else=then;
^
%PLIG-I-UNINIT, variable ELSE is fetched, not initialized
at line number 2 in file SYS$SYSDEVICE:[TOM]ID.PLI;1


%PLIG-I-SUMMARY, Completed with 0 errors, 3 warnings, and
                                3 informational messages.



Post a followup to this message

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