Sujet : Re: Top 10 most common hard skills listed on resumes...
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 01. Sep 2024, 04:01:10
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86o758t6vd.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Keith Thompson <Keith.S.Thompson+
u@gmail.com> writes:
Bart <bc@freeuk.com> writes:
[...]
I can also say that the C grammar is buggy:
>
assignment-expression:
conditional-expression
unary-expression asssignment-operator assignment-expression
>
When attempting to parse an assignment-expression, do you go for a
conditional-expression or unary-expression?
>
The latter is a subset of the former. If you go for a
conditional-expression and find that an assignment-operator
follows, now you have to perform some analysis on the LHS to see
if that conditional-expression contains only a unary-expression.
[...]
>
[...] I'm skeptical that the C grammar is buggy. [...]
It appears that what Bart means by buggy is different from what
you mean. I think what Bart means is that the grammar is not
suitable for being used by a particular parsing algorithm. Of
course that is not what the C standard means to supply, which is
rules of grammar that exactly reflect what syntactic forms are
suitable (syntactically) as C programs, without regard to how
input source is processed. The C standard's rules of grammar
are meant as a declarative specification, not as a procedural
description. Bart's complaint is, I believe, a complaint that
the grammar rules in the C standard do not provide a suitable
procedural description (for the procedural framework he has in
mind). They aren't meant to. Your comment is meant, I believe,
to be about whether the grammar rules in the C standard provide
an accurate declarative specification, which they almost
certainly do, especially as regards to the limited area of
expression syntax.