(ref.doc)syntax

Next Semantics Prev: background Up: ITPL

Syntax:

p 49
The computer field has a well-established tradition of using strange
acronyms...
Graal: Great Relief After Ada Lessons.

p 51, 3.3 The need for static semantics
Definition: Static semantics is the description of the structural
constraints that cannot be adequately captured by syntax descriptions.

This definition may seem contradictory, since syntax itself was
introduced as describing the structural properties of programs. But
the definition uses the word "syntax" in a pragmatic and more
restricted sense, to denote the structural properties which may be
described through abstract productions [...]. This should ideally
cover all structural constraints, but unfortunately this is not
possible with formalisms such as abstract syntax and BNF which only
address context-free properties.

p 57
Abstract syntax is a tool for *reasoning* about programs, not a
notation for *writing* programs.

p 63, 3.7.2 Language and system design
Software designers often have to invent languages to allow users to
communicate with their systems. A typical mistake in this activity is
to concentrate too early on the concrete form of the interaction; the
result is to obscure the issues and to freeze details prematurely.

Many systems actually need at least three interfaces:

- a *batch* interface making the system available through packaged
  sequences of commands
- a purely *interactive* interface
- a *routine* interface that makes the system's functions available to
  other programs.

The "languages" used by these various interfaces differ widely in
their external appearance, even though they are functionally
equivalent. Abstract syntax provides a convenient way of designing a
language by concentrating first on the important aspects and
postponing the representation details.


Cargo: Computer-Aided Research into Grandma's Origins.

p 76 [ambiguity in the parsing of expressions in BNF]
The price to pay for the removal of the ambiguity is a heavier
notation, making abstract syntax suitable for mathematic reasoning but
not for writing or reading programs.


automatically generated by info2www version 1.2.2.8