Re: language design models, was Writing A Plain English Compiler

"Gerry Rzeppa" <gerry.rzeppa@pobox.com>
Mon, 10 Nov 2014 03:29:43 -0600

          From comp.compilers

Related articles
Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-04)
Re: Writing A Plain English Compiler Pidgeot18@verizon.net (=?UTF-8?Q?Joshua_Cranmer_=f0=9f=90=a7?=) (2014-11-05)
Re: Writing A Plain English Compiler gneuner2@comcast.net (George Neuner) (2014-11-07)
Re: Writing A Plain English Compiler Pidgeot18@verizon.invalid (=?UTF-8?Q?Joshua_Cranmer_=f0=9f=90=a7?=) (2014-11-08)
Re: language design models, was Writing A Plain English Compiler gneuner2@comcast.net (George Neuner) (2014-11-09)
Re: language design models, was Writing A Plain English Compiler gerry.rzeppa@pobox.com (Gerry Rzeppa) (2014-11-10)
| List of all articles for this month |
From: "Gerry Rzeppa" <gerry.rzeppa@pobox.com>
Newsgroups: comp.compilers
Date: Mon, 10 Nov 2014 03:29:43 -0600
Organization: Compilers Central
References: 14-11-004 14-11-005 14-11-012 14-11-018 14-11-021
Keywords: syntax, design
Posted-Date: 10 Nov 2014 15:58:52 EST

George says,
English in particular has slippery pronouns: the "royal"
"we" is singular; "you", "they" and "it" all may be singular or plural
depending on context.
[The plural use of "it" is rare in polite conversation, but is
relatively common in exasperation and vulgarity: e.g., "Screw it!" may
be a multiple reference.]


Gerry replies:
Which is one of the reasons we adopted the "language design model" that we
did. We knew that experts in linguistics understood such subtleties; but we
also knew that most of the people who speak English don't -- and yet they
somehow get by.


So, instead of trying to "understand" imperative sentences, we simply
attempt to MATCH them with routines defined elsewhere -- because this
appears to be what happens in many cases when we ask questions of, or give
commands to, our wives, our children, and even our dogs.


Say, "Want a treat little buddy?" and a baby (or a dog) may hear only "blah,
blah, TREAT, blah, blah" -- but will nevertheless respond appropriately.
Why? Because the word "treat" is associated with some kind of
previously-recorded mental picture or concept. Say, "Where has that mother
of yours gone?" and the subject may only hear, "WHERE blah blah MOTHER blah
blah blah" -- but will again respond appropriately, because a "where"
routine with a "mother"-compatible parameter has been previously defined and
can be called and executed.


Our compiler takes the same approach: we let the programmer define his own
routine headers -- using his own vocabulary, spelling, good or bad grammar,
etc -- and then we select the "best match" for his imperative sentences from
those.


Now one might think that such a sloppy approach would result in an difficult
and unpredictable system: but the fact of the matter (and we speak from
actual experience here) is that it results in a system that is both
convenient and reliable.



Post a followup to this message

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