Liste des Groupes | Revenir à cl c |
Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>Ben Bacarisse <ben@bsb.me.uk> writes:>
>
[...]
>And as for your remarks about typical implementations, does your C>
parser /really/ accept an assignment expression on both sides of
an = operator? What does that even look like in the code? I have
written one C parser, contributed to one other and (over the
years) examined at least two more, and none of them do what you
seem to be suggesting is typical.
It wouldn't be surprising to see a parser written so it would
accept (syntactically) a superset of the well-formed inputs
allowed by the language grammar. Any parses not allowed by the
grammar could then be flagged as erroneous in a later semantics
pass.
Yes, that is pretty much what I've seen in more than one C parser.
[...]
Les messages affichés proviennent d'usenet.