Re: Use of punctuation in a language?

Martin Ward <Martin.Ward@durham.ac.uk>
11 Nov 2003 14:40:25 -0500

          From comp.compilers

Related articles
[3 earlier articles]
Re: Use of punctuation in a language? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2003-11-02)
Re: Use of punctuation in a language? joachim.durchholz@web.de (Joachim Durchholz) (2003-11-08)
Re: Use of punctuation in a language? bobduff@shell01.TheWorld.com (Robert A Duff) (2003-11-08)
Re: Use of punctuation in a language? bear@sonic.net (Ray Dillinger) (2003-11-11)
Re: Use of punctuation in a language? jcownie@etnus.com (James Cownie) (2003-11-11)
Re: Use of punctuation in a language? landauer@got.net (Doug Landauer) (2003-11-11)
Re: Use of punctuation in a language? Martin.Ward@durham.ac.uk (Martin Ward) (2003-11-11)
Re: Use of punctuation in a language? jvorbrueggen@mediasec.de (Jan C. =?iso-8859-1?Q?Vorbr=FCggen?=) (2003-11-21)
Re: Use of punctuation in a language? vbdis@aol.com (2003-11-21)
Re: Use of punctuation in a language? rkrayhawk@aol.com (2003-12-03)
Re: Use of punctuation in a language? house@usq.edu.au (Ron House) (2003-12-03)
| List of all articles for this month |
From: Martin Ward <Martin.Ward@durham.ac.uk>
Newsgroups: comp.compilers
Date: 11 Nov 2003 14:40:25 -0500
Organization: Compilers Central
References: 03-10-129 03-11-016 03-11-034
Keywords: syntax, design
Posted-Date: 11 Nov 2003 14:40:25 EST

On Saturday 08 Nov 2003 6:40 am, you wrote:
> there are many languages where "X := X + 1;" means something very
> different from "X := X - 1;", and there's only one character
> difference.


But both are assignment statements, both use the old value of X
to compute a new value, and both assign the new value to X.
They are not so VERY different.
The only difference is the operator used to compute the new value,
and the "+" or "-" is precisely what denotes the operator.


On the other hand, changing the comma to a full stop
on the right hand side of "DO 1 I=1,2" changes
the lexical analysis of the LEFT hand side from
"<keyword> <number> <identifier>" to "<identifier>"
and changes the statement from a loop to an assignment.


Another example is COBOL, where the addition or removal
of a full stop can change the structure of the whole program.


--
Martin


Martin.Ward@durham.ac.uk http://www.cse.dmu.ac.uk/~mward/


Post a followup to this message

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