Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #2851

What is the semantics of a language?

From Roger L Costello <costello@mitre.org>
Newsgroups comp.compilers
Subject What is the semantics of a language?
Date 2022-01-22 00:08 +0000
Organization Compilers Central
Message-ID <22-01-081@comp.compilers> (permalink)

Show all headers | View raw


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]

Back to comp.compilers | Previous | NextNext in thread | Find similar


Thread

What is the semantics of a language? Roger L Costello <costello@mitre.org> - 2022-01-22 00:08 +0000
  Re: What is the semantics of a language? luser droog <luser.droog@gmail.com> - 2022-01-24 11:39 -0800
  Re: What is the semantics of a language? gah4 <gah4@u.washington.edu> - 2022-01-25 01:19 -0800
  Re: What is the semantics of a language? George Neuner <gneuner2@comcast.net> - 2022-01-26 14:24 -0500
    Re: What is the semantics of a language? gah4 <gah4@u.washington.edu> - 2022-01-26 13:21 -0800
  Re: What is the semantics of a language? Louis Krupp <lkrupp@invalid.pssw.com.invalid> - 2022-02-18 04:16 -0700

csiph-web