Related articles |
---|
What is the semantics of a language? costello@mitre.org (Roger L Costello) (2022-01-22) |
Re: What is the semantics of a language? luser.droog@gmail.com (luser droog) (2022-01-24) |
Re: What is the semantics of a language? gah4@u.washington.edu (gah4) (2022-01-25) |
Re: What is the semantics of a language? gneuner2@comcast.net (George Neuner) (2022-01-26) |
Re: What is the semantics of a language? gah4@u.washington.edu (gah4) (2022-01-26) |
Re: What is the semantics of a language? lkrupp@invalid.pssw.com.invalid (Louis Krupp) (2022-02-18) |
From: | Louis Krupp <lkrupp@invalid.pssw.com.invalid> |
Newsgroups: | comp.compilers |
Date: | Fri, 18 Feb 2022 04:16:35 -0700 |
Organization: | Newshosting.com - Highest quality at a great price! www.newshosting.com |
References: | 22-01-081 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="83506"; mail-complaints-to="abuse@iecc.com" |
Keywords: | history, semantics |
Posted-Date: | 18 Feb 2022 12:15:55 EST |
Content-Language: | en-US |
In-Reply-To: | 22-01-081 |
On 1/21/2022 5:08 PM, Roger L Costello wrote:
> Hello Compiler Experts!
>
> Ah! I found the answer to the question:
>
> What is the semantics of a language?
>
> Section 3.4 of the Bison specification [1] has the answer:
>
> 3.4 Defining Language Semantics
>
> The grammar rules for a language determine only the syntax. The
> semantics are determined by the semantic values associated with
> various tokens and groupings, and by the actions taken when various
> groupings are recognized.
>
> Niklaus Wirth agrees with the Bison specification. In the introduction of his book, Compiler Construction, he says [2]:
>
> The translation process is now guided by the structure of the analysed
> text. The text is decomposed, parsed into its components according to
> the given syntax. For the most elementary components, their semantics
> is recognized, and the meaning (semantics) of the composite parts is
> the result of the semantics of their components. Naturally, the
> meaning of the source text must be preserved by the translation.
>
> Do you agree that that is the definition of the semantics of a language?
>
> /Roger
>
> [1] Section 3.4 of the Bison specification: https://www.gnu.org/software/bison/manual/bison.html#Semantics
>
> [2] See page 6, fourth paragraph in Compiler Construction by Niklaus Wirth: https://people.inf.ethz.ch/wirth/CompilerConstruction/CompilerConstruction1.pdf
> [That's one definition. But I suspect we will hear it's far from the only one. -John]
For what it's worth, the 1969 Burroughs B5500 Extended ALGOL Reference
Manual had sections like this:
===
EXPRESSIONS
GENERAL.
SYNTAX.
The syntax for <expression> is as follows:
<expression> ::=
<arithmetic expression> |
<Boolean expression> |
<designational expression> |
<concatenate expression>
SEMANTICS
Expressions, which are basic to any algorithmic process, are rules to
obtain values of different kinds and types.
As mentioned on page 3-1 [GENERAL COMPONENTS], expressions are used to
define certain general components (subscripted variables and function
designators), and these quantities in turn are used to define
expressions. The definition of expressions is therefore necessarily
recursive.
===
It didn't make sense when I first read it some 50 years ago, and it
doesn't make sense now, but I learned not to let that bother me.
Louis
Return to the
comp.compilers page.
Search the
comp.compilers archives again.