Liste des Groupes | Revenir à cl c |
On 11.12.2024 03:21, bart wrote:The names I'm talking about aren't terminals, they're ones like '*declaration' and '*declarator', or 'multiplicative-expression'.On 09/12/2024 18:46, Janis Papanagnou wrote:Sure; I recall Fortran had such an ambiguity, I think it was in
>An unambiguous grammar is something quite essential; how would you>
parse code if it were ambiguous?
You can easily parse a language in an ambiguous syntax. [...]
context of FOR loops (something with the assignment and commas,
IIRC). - Whether it's "easily [to] parse" is arguable, though,
and certainly depends. - But I don't recall to have seen scary
things like that in any other language I had to do with.
Experienced language developers wouldn't define an ambiguous
syntax in the first place. So what do you think your statement
contributes to desire to have an "unambiguous syntax"?
I mean, if you get confused by an unambiguous syntaxes already,
what do you think happens with people if they have to program
in or understand an ambiguous language!
>(I won't comment on your opinion.)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?)
With respect to distinctness of names I thought we had already
exchanged some words - remember my 'while' and 'until' samples
from Pascal (that somehow offended you)?
Concerning "C"; I don't see why you shouldn't name a "positive"I sometimes use 'when' for positive rather than 'if', and 'until' or 'unless' for negative.
conditioned control construct consistently(!) as 'while' whether
it controls a loop entry or a loop exit, and to name a "negative"
conditioned control construct consistently(!) as 'until'.
Les messages affichés proviennent d'usenet.