Sujet : Re: question about linker
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 12. Dec 2024, 05:50:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjdq1p$1vslc$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 30
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 11.12.2024 18:20, bart wrote:
On 11/12/2024 16:51, Janis Papanagnou wrote:
[ dangling else ]
So here you finally acknowledge there may be ambiguity from a human
perspective.
From a semantical perspective, not from a syntactical. There's rules
to disambiguate a dangling-else. And there's languages that designed
a syntax without an inherent semantical ambiguity (that would need to
be cleared by such rules).
For (yet another) example; my K&R shows a syntax for expressions like
expression := binary
binary := binary + binary
binary := binary * binary
An actual expression x = 2 + 3 * 4 would be "ambiguous" (without
precedence rules).
A language who would define the grammar using non-terminal symbols
'factor' and 'term' (for example) could disambiguate the semantics
(on the syntax level).
Are you again trying to confuse the matter by speaking about "human
perspective"; we spoke about syntax and semantics.
What you had before was writing syntactical wrong code and claiming
you were confused. And you deliberately changed the sample syntax
and expected that it is still code with the same semantics or what?
There's neither a syntactical nor a semantical ambiguity between a
while-loop and a do-wile-loop.
[...]
(What a waste of time!)
Janis