Sujet : Re: question about linker
De : bc (at) *nospam* freeuk.com (Bart)
Groupes : comp.lang.cDate : 04. Dec 2024, 18:43:00
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <viq4b3$10kq3$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Mozilla Thunderbird
On 04/12/2024 16:57, Scott Lurndal wrote:
Bart <bc@freeuk.com> writes:
On 02/12/2024 18:13, Scott Lurndal wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
On 01.12.2024 17:42, Bart wrote:
On 01/12/2024 15:08, Janis Papanagnou wrote:
On 01.12.2024 12:52, Bart wrote:
>
makes typing easier because it is case-insensitive,
>
I don't think that case-insensitivity is a Good Thing. (I also don't
think it's a Bad Thing.)
>
I think it's a _real bad thing_ in almost every context related
to programming.
>
OK. I think the opposite. So who's right?
The consensus so far does not favor your viewpoint.
From the languages I know of in detail and I'm experienced in none
is "fussy" about semicolons. Rather it's a simple and well designed
syntactical token, whether used as separator or terminator. You've
just to put it where it's defined.
>
Indeed. One wonders at Bart's familiarity with formal grammars.
>
Why?
Because having a formal grammar is the keystone of a good
language design.
Do you use a formal grammar when parsing a CSV file, or something equally trivial?
Parsers don't need such grammars. The information needed to construct one manually can be in the programmer's mind, it might be an informal description in English, it might be defined by examples of an existing languages.
Or the parser was created for a trivial language and has evolved.
A formal or informal grammar might be useful in a language reference - once the language is stable.
A formal one will be needed if planning to use an automatic tool that will generate your parser, or maybe you want to check it for ambiguities etc. (Mine will likely fail that test, but I already know what they are.)
So, I know what they are, I just don't think they're useful for the informal tools I write.
Sometimes people make a big deal out of this stuff: a typical textbook on compilers may devote 100s of pages to the theory behind lexing, parsing, CFGs and so on.
For the rest of us, that part is the simplest part of a compiler. You write it, and move on.