Re: Natural "for" Loop, using Plural / Singular transformations ??

Tony Finch <dot@dotat.at>
5 Jun 2006 20:48:29 -0400

          From comp.compilers

Related articles
Natural "for" Loop, using Plural / Singular transformations ?? olivier.chatelain@gmail.com (2006-05-26)
Re: Natural "for" Loop, using Plural / Singular transformations ?? owong@castortech.com (Oliver Wong) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? dmaziuk@bmrb.wisc.edu (Dimitri Maziuk) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? tom@infoether.com (Tom Copeland) (2006-05-30)
Re: Natural "for" Loop, using Plural / Singular transformations ?? 148f3wg02@sneakemail.com (Karsten Nyblad) (2006-06-03)
Re: Natural "for" Loop, using Plural / Singular transformations ?? dot@dotat.at (Tony Finch) (2006-06-05)
Re: Natural "for" Loop, using Plural / Singular transformations ?? p_ludemann@yahoo.com (Peter Ludemann) (2006-06-11)
Re: Natural "for" Loop, using Plural / Singular transformations ?? jthorn@aei.mpg.de (Jonathan Thornburg) (2006-06-12)
Re: Natural "for" Loop, using Plural / Singular transformations ?? haberg@math.su.se (2006-06-12)
Re: Natural "for" Loop, using Plural / Singular transformations ?? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2006-06-15)
Re: Natural "for" Loop, using Plural / Singular transformations ?? gene@abhost.us (Gene Wirchenko) (2006-06-27)
Re: Natural "for" Loop, using Plural / Singular transformations ?? gene@abhost.us (Gene Wirchenko) (2006-06-27)
| List of all articles for this month |

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.


Post a followup to this message

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