From: | Tony Finch <dot@dotat.at> |
Newsgroups: | comp.compilers |
Date: | 5 Jun 2006 20:48:29 -0400 |
Organization: | dotat labs |
References: | 06-05-083 06-06-004 |
Keywords: | syntax, algol68 |
Posted-Date: | 05 Jun 2006 20:48:29 EDT |
Karsten Nyblad <148f3wg02@ sneakemail.com> wrote:
>olivier.chatelain@gmail.com wrote:
>>
>> What about using Plural => Singular transformations to generate loop
>> variables from name of lists?
>>
>> FOR dependency IN dependencies DO
>> PRINT dependency.name
>> END
>>
>> FORALL dependencies DO
>> PRINT dependency.name
>> END
>
>When writing business applications for use in none English speaking
>languages, it is common to let the identifiers be in the local
>language, but few languages derive plural from singular the way it is
>done in English.
One of the more amusing aspects of the Algol 68 VW grammar is the
somewhat formal structure of the names used to describe parts of the
language, which are almost but not quite English, and frequently
utterly bizarre because of the strange affixes. I wonder if this was a
result of the multi-lingual committee that defined the language.
For example, the affix -S usually means "one or more", so DECS is one or
more declarations; and -ETY usually means "can be empty", as in SHORTSETY
can be SHORTS or EMPTY. Frequently when the grammar uses SOID for what
we now call types, i.e. a SORT followed by a MOID, which is a MODE or
VOID. Obviously.
Nowadays it seems more popular to use punctuation for this sort of thing,
resulting in a more mathematical rather than linguistic flavour. For
example, the IETF's ABNF.
Tony.
--
f.a.n.finch <dot@dotat.at> http://dotat.at/
BISCAY FITZROY: EAST OR NORTHEAST 4 OR 5 INCREASING 6 OR 7 IN FITZROY. FAIR.
GOOD.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.