What is the meaning of an expression?

Roger L Costello <costello@mitre.org>
Fri, 14 Jan 2022 12:15:06 +0000

          From comp.compilers

Related articles
What is the meaning of an expression? costello@mitre.org (Roger L Costello) (2022-01-14)
Re: What is the meaning of an expression? anton@mips.complang.tuwien.ac.at (2022-01-14)
What is the meaning of an expression? christopher.f.clark@compiler-resources.com (Christopher F Clark) (2022-01-14)
Re: What is the meaning of an expression? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-01-15)
Re: What is the meaning of an expression? gah4@u.washington.edu (gah4) (2022-01-14)
Re: What is the meaning of an expression? gneuner2@comcast.net (George Neuner) (2022-01-15)
Re: What is the meaning of an expression? matt.timmermans@gmail.com (matt.ti...@gmail.com) (2022-01-15)
[13 later articles]
| List of all articles for this month |

From: Roger L Costello <costello@mitre.org>
Newsgroups: comp.compilers
Date: Fri, 14 Jan 2022 12:15:06 +0000
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="8996"; mail-complaints-to="abuse@iecc.com"
Keywords: semantics, comment
Posted-Date: 14 Jan 2022 12:40:22 EST
Thread-Topic: What is the meaning of an expression?
Thread-Index: AdgJPKhi/NiNfECvRNaA6+4Wq/M8OQ==
Accept-Language: en-US
Content-Language: en-US

Hello Compiler Experts!


In some book I read this statement:


The meaning of an expression is
   the value of the expression.


For example, the meaning of this expression:


1 + 1


is 2.


Originally I thought I read the statement in some math book, but after
searching through my books and after talking to some mathematicians, I believe
that I did not read it in any math book.


Today while reading the Bison manual, I noticed in it a sentence that said:


... the meaning of a variable ...


Aha! Perhaps it was in a Bison book or a compiler book that I read the
statement. Is the statement something that you would say? If yes, why do you
say it? The mathematicians and linguists that I spoke to thought the statement
was crazy. Perhaps the statement is appropriate in the context of compilers,
but not elsewhere? Also, from your perspective are these two statements
equivalent:


The meaning of an expression is
   the value of the expression.


The semantics of an expression is
   the value of the expression.


Do you always use the word "meaning" or do you sometimes use the word
"semantics"? Do the two words mean (no pun intended) the same thing to you,
from a compiler perspective?


/Roger
[I think the meaning here is not to believe everything you read. -John]


Post a followup to this message

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