Deutsch English Français Italiano |
<87le0c4d6r.fsf@nosuchdomain.example.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson <Keith.S.Thompson+u@gmail.com> Newsgroups: comp.lang.c Subject: Re: Top 10 most common hard skills listed on resumes... Date: Sat, 31 Aug 2024 14:03:56 -0700 Organization: None to speak of Lines: 28 Message-ID: <87le0c4d6r.fsf@nosuchdomain.example.com> References: <vab101$3er$1@reader1.panix.com> <874j75zftu.fsf@bsb.me.uk> <valrj7$367a8$2@dont-email.me> <87mskwy9t1.fsf@bsb.me.uk> <vanq4h$3iieb$1@dont-email.me> <875xrkxlgo.fsf@bsb.me.uk> <vapitn$3u1ub$1@dont-email.me> <87o75bwlp8.fsf@bsb.me.uk> <vaps06$3vg8l$1@dont-email.me> <871q27weeh.fsf@bsb.me.uk> <20240829083200.195@kylheku.com> <87v7zjuyd8.fsf@bsb.me.uk> <20240829084851.962@kylheku.com> <87mskvuxe9.fsf@bsb.me.uk> <vaq9tu$1te8$1@dont-email.me> <875xrivrg0.fsf@bsb.me.uk> <20240829191404.887@kylheku.com> <86cylqw2f8.fsf@linuxsc.com> <871q2568vl.fsf@nosuchdomain.example.com> <20240830232138.772@kylheku.com> <vavhbn$12i2n$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Sat, 31 Aug 2024 23:03:56 +0200 (CEST) Injection-Info: dont-email.me; posting-host="78f6e35217d9802ff674987bcdbe52ec"; logging-data="1215711"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GyyrO3FpR9cPv75+NKCf/" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:i47SswATeNuSX7cbXeJYv6mjliA= sha1:i+G5QEntx39uwx/YeG/iawaMwvQ= Bytes: 2904 James Kuyper <jameskuyper@alumni.caltech.edu> writes: > On 8/31/24 03:08, Kaz Kylheku wrote: >> On 2024-08-30, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote: > ... >>> However, the compilers I've tried produce the same diagnostic (not a >>> syntax error message) for both. Probably they use a tweaked grammar >>> that allows more a general expression as the LHS of an assignment, >>> and catch errors later in semantic analysis, for the purpose of >>> producing diagnostics that are easier to understand. It's obvious >>> that in `x + 1 = y`, the programmer (probably) intended `x + 1` >>> to be the LHS of an assignment. These compilers (I tried gcc, >>> clang, and tcc) are clever enough to recognize that. >> >> A standard operator precedence parsing algorithm such as Shunting Yard >> cannot help but parse that. > > True, which is an example of why a precedence parsing algorithm is > inappropriate for parsing C, which is not defined in terms of precedence > levels. Perhaps -- but as long as it's used in a way that allows all syntax errors and constraint violations to be diagnosed, it's not a problem. I haven't looked into what parsing algorithms any existing compilers use. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */