Re: ALGOL - lexical analyzer

henry@spsystems.net (Henry Spencer)
7 May 2005 16:57:14 -0400

          From comp.compilers

Related articles
ALGOL - lexical analyzer edimodric@makni.inet.hr (Eddie) (2005-05-05)
Re: ALGOL - lexical analyzer nmm1@cus.cam.ac.uk (2005-05-06)
Re: ALGOL - lexical analyzer henry@spsystems.net (2005-05-07)
Re: ALGOL - lexical analyzer nmm1@cus.cam.ac.uk (2005-05-07)
Re: ALGOL - lexical analyzer Trevor.Jenkins@suneidesis.com (2005-05-07)
Re: ALGOL - lexical analyzer haberg@math.su.se (2005-05-07)
Re: ALGOL - lexical analyzer nmm1@cus.cam.ac.uk (2005-05-08)
Re: ALGOL - lexical analyzer gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-08)
Re: ALGOL - lexical analyzer gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-08)
| List of all articles for this month |

From: henry@spsystems.net (Henry Spencer)
Newsgroups: comp.compilers
Date: 7 May 2005 16:57:14 -0400
Organization: SP Systems, Toronto, Canada
References: 05-05-027 05-05-029
Keywords: lex, algol68
Posted-Date: 07 May 2005 16:57:14 EDT

  our moderator wrote:
>...Some implementations
>reserved the keywords, e.g. BEGIN and END which was wrong since you
>were allowed to have variables called begin and end, others did gross
>things like quoting them all, e.g., 'BEGIN' and 'END' which was
>unusable. I can't lay my hands on my Algol68 report but as I recall
>they avoided that mistake and defined it in a single ASCII-ish
>character set.


No, not so. Algol 68 had the same problem; an implementation was
supposed to provide *some way* of distinguishing keywords from
identifiers, but at least in the beginning, there was no consensus on
what it should be. I was on the fringes of the Algol 68 community for
a little while in the mid-1970s, and I remember considerable
discussion about whether specific convention(s) should be
standardized, and if so, which one(s). Quoting ("stropping") was
discussed, and if memory serves, a British group reported favorable
experience with using periods rather than quotes as keyword markers,
e.g. .begin and .end -- still a nuisance but easier to type.
--
"Think outside the box -- the box isn't our friend." | Henry Spencer
                                                                -- George Herbert | henry@spsystems.net



Post a followup to this message

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