Sujet : Re: question about linker
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 11. Dec 2024, 17:30:51
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjcens$1kcos$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 11.12.2024 09:43, Ike Naar wrote:
On 2024-12-09, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
An unambiguous grammar is something quite essential; how would you
parse code if it were ambiguous?
Here's an ambiguity in the C grammar:
[...]
The following selection-statement is grammatically ambiguous:
if (E1) if (E2) S1 else S2
Yes, the dangling else is a common ambiguity in many programming
languages.
That's why I prefer languages with syntaxes like in Algol 68 or
Eiffel (for example).
(The ambiguity [in Fortran] that I mentioned elsethread is a more
obscure candidate.)
Janis