Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: BGB Newsgroups: comp.lang.c Subject: Re: question about linker Date: Tue, 3 Dec 2024 14:49:27 -0600 Organization: A noiseless patient Spider Lines: 51 Message-ID: References: <87mshhsrr0.fsf@nosuchdomain.example.com> <8734j9sj0f.fsf@nosuchdomain.example.com> <87ttbpqzm1.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 03 Dec 2024 21:49:39 +0100 (CET) Injection-Info: dont-email.me; posting-host="ca04aaa273285074a16173198055021c"; logging-data="375214"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yK7GAzw9/gwv+vUzG4mtgf7eDXQ0p8jI=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:i/Xi9xvlvA3L0H3eBwcu2uVFjTA= Content-Language: en-US In-Reply-To: Bytes: 3212 On 12/3/2024 1:27 PM, Janis Papanagnou wrote: > On 03.12.2024 19:57, BGB wrote: >> On 12/2/2024 12:13 PM, Scott Lurndal wrote: >>> >>> Indeed. One wonders at Bart's familiarity with formal grammars. >> >> In my case, personally I haven't encountered much that doesn't work well >> enough with a recursive-descent parser. > > Is that meant as a contradiction? - If so, how? > Formal grammars and parser generators aren't usually necessary IME, since recursive descent can deal with most everything (and is generally more flexible than what one can deal with in a formal grammar). Though, it seems I didn't read enough, they were debating about syntactic use of semicolons as a separator rather than parser writing... But, yeah, in that context I think it is more a tradeoff between semicolons and syntactically significant line-breaks. Can go either way, where line-breaks make more sense if one is wanting to design a parser like: Read one line of input; Break into tokens; Parse a statement. But then the language generally needs an explicit line continuation character, say: c=func(a, \ b, c) And, debate whether it is better to have a semicolon on every line, or a line continuation to break up long lines. Separators can serve to help avoiding expressions merging in unintended ways, but could be avoided or left optional if one is going for a simplistic syntax, say: proc A B C dst = func A B C Probably with the language disallowing the creation of any complex expressions (and/or, one goes down the path that leads to either S-expressions or Smalltalk syntax). > Janis >