Liste des Groupes | Revenir à cl c |
On 07.12.2024 16:33, Bart wrote:
That and more.You're being aggressive.Am I?
Yes. I've seen enough jaw-dropping examples of C code that turned out to be legal, that now I wouldn't be surprised at anything.It says something however when I actually believed that that code wasHuh?
valid, because the compiler appeared to say so.
An unambiguous grammar is something quite essential; how would youYou can easily parse a language in an ambiguous syntax. For example, if a particular ambiguity is unlikely to arise in practice (maybe it's one of your examples that you say nobody would ever write).
parse code if it were ambiguous?
You postulate it as if the grammar were convoluted;My opinion is that it is. Especially its propensity for using long-winded production terms that look confusingly similar. (Would it have killed somebody to make the names more distinct?)
Oh, I see. That answers everything! Including having a '...' that includes statements starting with 'while'.So you're a parser and you see this:Because there's the '...' in between that answers that question.
>
do ... while
>
How do you know whether that 'while' starts a new nested loop or
terminates this one?
So you've got it?It looks like /you/ have now that I've explained it to you.
Les messages affichés proviennent d'usenet.