Sujet : Re: question about linker
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 12. Dec 2024, 12:38:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjei07$241kh$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
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 12.12.2024 06:35, Keith Thompson wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
[...]
For (yet another) example; my K&R shows a syntax for expressions like
>
expression := binary
binary := binary + binary
binary := binary * binary
That's odd. Is that an exact quotation?
No, not exact, I abbreviated it; omitted about 25 other operators and
used another syntax (no ' | '). (Trust me that it hasn't things that
I called 'factor' and 'term' in my post, which is equivalent to what
you have formulated below in your copy.) - I'm using a translation of
something that someone classified as being a "pre-second" edition but
not quite the first edition. Two references point to 1977 (Prentice
Hall) and 1978 (Bell Labs). - The text for the "binary" syntax has two
optional informal columns, the first one has the comment "precedence"
for some of the variants of "binary" operators. (But it's also just
titled as "Syntax in Short"; probably presented in a form to make it
easy to understand without overloading it for purpose of a textbook.)
It serves the purpose to explain an ambiguous syntax with non-codified
precedence and a separate precedence table (but it's not an exact "C"
syntax description as you'd probably find it in standards documents).
[...]
My copy of K&R 1st edition (1978) has, among other things:
multiplicative-expression:
additive-expression:
Janis