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... clint@0lsen.net (Clint Olsen) (2004-10-25) |
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... 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) |
[13 later articles] |
From: | SM Ryan <wyrmwif@tsoft.org> |
Newsgroups: | comp.compilers |
Date: | 7 Nov 2004 12:08:27 -0500 |
Organization: | Quick STOP Groceries |
References: | 04-11-011 |
Keywords: | PL/I, syntax |
Posted-Date: | 07 Nov 2004 12:08:27 EST |
# > PL/I's keywords are probably not parseable by any reasonable
# > grammatic method, which is why I started with *may not* be. Sadly,
# > it is not just "old" languages like Fortran and PL/I that have the
# > problem.
Depends on the definition of 'reasonable'. Typically there is a single
lexical scanner which has to recognize what's coming in any parser context.
It's not that difficult at each parse state to decide what terminals can
be expected by that state and write a specific lexer for that state
and all other states which only expect exactly those symbols. As long as
lookahead will examine the same input characters with the same lexer,
there is no problem.
# I am not quite sure about Fortran, but it seems no reserved words was
Fortran has a problem that you cannot distinguish an assignment do 1 i
= (expr,expr) from a do-statement do 1 i = (expr) , (expr) until you
hit the comma which is after an embedding-(-) production; this means
an RE is not sufficient to distinguish these. In other statements, you
have something other '=' following the closing ')', so you can use an
RE.
--
SM Ryan http://www.rawbw.com/~wyrmwif/
The whole world's against us.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.