Deutsch   English   Français   Italiano  
<865xrftsb6.fsf@linuxsc.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Tim Rentsch <tr.17687@z991.linuxsc.com>
Newsgroups: comp.lang.c
Subject: Re: Top 10 most common hard skills listed on resumes...
Date: Sun, 01 Sep 2024 06:30:21 -0700
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <865xrftsb6.fsf@linuxsc.com>
References: <vab101$3er$1@reader1.panix.com> <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> <vavmbk$13k4n$1@dont-email.me> <86seuktkcg.fsf@linuxsc.com> <vb1lt3$1g1l4$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Date: Sun, 01 Sep 2024 15:30:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1ccc4d5fef9c2c82c9c978d9286151e6";
	logging-data="1584882"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/WT2G0XkyzYiZuJkuC7d8U24sKpNavggw="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:9orik+e88xOhqErbI6eMfqjkgBc=
	sha1:tdEaKLiLHklezUD205wmLLtyMx0=
Bytes: 2526

Bart <bc@freeuk.com> writes:

> On 31/08/2024 23:10, Tim Rentsch wrote:
>
>> Bart <bc@freeuk.com> writes:
[...]
>>> Given this:
>>>
>>>     x + y = z;
>>>     (x + y) = z;
>>>
>>> My compiler produces the same AST for the LHS of '=' in both
>>> cases.
>>
>> To understand why they are different, try drawing parse trees
>> rather than abstract syntax trees.
>>
>> https://en.wikipedia.org/wiki/Parse_tree
>
> Yeah, the CST differs in retaining the parentheses.  But I can
> already see that from the source code.
>
> For normal compilation, that information is redundant.

The parse trees are different in a lot more ways than whether
one keeps parentheses.  But the point is to compare the parse
tree for x + y = z to the abstract syntax tree for x + y = z.
Among other things, the input x + y = z doesn't even have a
parse tree;  the rules governing the formation of parse trees
don't allow any parse tree matching that entire input.