Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #3019
| From | Kaz Kylheku <480-992-1380@kylheku.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Who first invented dotted-item notation? |
| Date | 2022-05-22 18:29 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <22-05-047@comp.compilers> (permalink) |
| References | <22-05-046@comp.compilers> |
On 2022-05-22, Christopher F Clark <christopher.f.clark@compiler-resources.com> wrote:
> I know the notation from LR(0) machine construction, but also know
> that Gluskhov used it in his solution to NFA construction. Earley
> also used the notation to describe his method if I understand right.
> I'm presuming that there is some first use of the notation. Do we
> know who invented it?
In Lisp, we can write (1 2 3 4 5 6) in any of these ways:
(1 . (2 3 4 5 6))
(1 2 . (3 4.5 6))
(1 2 3 . (4 5 6))
(1 2 3 4 . (5 6))
(1 2 3 4 5 . (6))
(1 2 3 4 5 6 . NIL)
As well as:
(1 . (2 . (3 4 5 6)))
The dot doesn't actually exist; it isn't represented anywhere in the
data structure, but in a hand-written expression it could be used to
convey (purely as a comment) some semanticaly interesting division in
the list.
E.g. suppose we have some data structure which holds a list of symbols,
and an integer indicating a position among those symbols.
A custom printing routine for that structure could take advantage
of this, rendering it as, say:
#S(sym-structure
:dot-position 2
:syms (a b . (c d)))
where the custom printer for sym-structure looks at dot-position
and renders the syms slot accordingly, to provide a visual aid.
The following is not possible in any mainstream Lisp I know of: (. (a b c))
as a way of denoting (a b c). The custom printer could omit the
dot notation.
(I know of a dialect in which it that leading dot notation is allowed,
with that semantics, but starting in a git commit made in 2014, making
it irrelevant here.)
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
Who first invented dotted-item notation? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-05-22 12:32 +0300
Re: Who first invented dotted-item notation? Kaz Kylheku <480-992-1380@kylheku.com> - 2022-05-22 18:29 +0000
RE: Who first invented dotted-item notation? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-05-23 13:23 +0300
Re: Who first invented dotted-item notation? gah4 <gah4@u.washington.edu> - 2022-05-23 18:31 -0700
RE: Who first invented dotted-item notation? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-05-24 11:27 +0300
Re: Who first invented dotted-item notation? antispam@math.uni.wroc.pl - 2022-05-28 04:51 +0000
csiph-web