Article View: comp.lang.c
Article #2115Re: stupid cascade of errors
From: fir
Date: Wed, 02 Dec 2026 22:11
Date: Wed, 02 Dec 2026 22:11
115 lines
6132 bytes
6132 bytes
Ross Finlayson pisze:
> On 12/02/2026 12:17 PM, fir wrote:
>> when you do a mistake and say left one not needed ) or }
>> compiler make very long cascade of idiotic errors
>>
>> do they really must be so stupid?
>
>
> Sometimes it's hard to think while computing.
>
> Thinking while computing, ....
>
> It's usually called "principle of least surprise" or
> "principle of least astonishment" not giving the compiler
> that's got the scanner and look-ahead or about 3 bytes of memory
> since it was compiled into a finite-state-automaton the scanner
> then parser or tokenizer/lexer the scanner or about a push-down
> automaton in nesting and quoting constructs including comments and
> escape characters: wrong-way brackets, all the way to the end-of-file.
>
> Grammars are usually described in terms of what they accept -
> maybe then for as so what they'd reject. ("Too deep, ..., too far, ...,
> passed another accepted construct ignoring that, ....")
> For example, a general rejector that starts always acting
> as an accepter, to reject for what's not being accepted.
>
>
> "Classroom compilers", ....
>
>
> There's a general rule: "It's not a bug in the compiler,
> there's a problem between keyboard and chair."
>
>
> Many modern accounts of parsing are multi-pass parsers
> and mostly don't reflect the text-book class-room reality.
> Something like "Tree-Sitter", for example, it's sitting
> on quite a large tree. Here instead is a usual idea
> that parsing makes passes in sequences, sort of an,
> "abstract syntax sequence" instead of "abstract syntax tree",
> i.e., the source is a sequence, the tokens is a sequence,
> the statements are a sequence, the blocks are a sequence,
> un-parsed code is the literal source,
> then there's blocks nest, expressions nest, ....
>
>
> So, nesting and bracketing about groupers and joiners
> or comma and separators, vis-a-vis, quoting-contexts
> and escape-contexts and comments and whither whitespace,
> with affixes and a bunch of different accounts of what
> makes productions of terminals vis-a-vis grammars and
> syntax or railroad diagrams that involve left-right scanning
> or multi-pass scanning and parsing, usually delegated
> to manipulation of the tree after the usual top-down
> vis-a-vis bottom-up sorts of accounts of parsing, single-pass,
> has that there's not much usual formal literature about
> machines that parse vis-a-vis the usual text-book account.
>
>
> Trying to find parser-generators usually, since it's considered
> that regular-expressions and usual grammars must have small
> and fast implementations usually given to using least-space
> in the old days and so not necessarily sort of organized
> about for example "run it up branchless the alternatives",
> vis-a-vis lookup-tables and jumping all over the code-segment,
> it varies.
>
>
> If you're going to the trouble of parsing something,
> might at least allocate five or ten times as much
> memory as is being parsed and make markers over passes,
> then those can be picked through for the logic
> and discarded (or, re-used, for example that the
> locator of the construct in the AST if to result
> points to the offset in the source text).
>
>
>
>
> Not so necessarily relevant though many machines are
> simply running regular-expressions all day or compiling
> code all day or making to/from string all day. Then,
> at least the compiler's telling you something's wrong,
> think how bad C++ programmers have it when it dumps
> template logic which isn't even exactly C++ any-more,
> learn to appreciate it, then also giving it -Wall -Wextra
> -Werror then cleaning up the code always seems a good idea.
>
>
> I have found bugs in the compiler once or twice in
> the count-less yet count-ably many times scutinizing
> the compiler results of my or others' designs, that,
> though, was long after I stopped looking for them.
>
> Over on comp.theory I emitted a bunch of design notes
> about "Viswath & Charmaigne", about, "the character-machine",
> about vectorizing the parsing, yet the account of the
> "multi-pass parser" and data-structure of the _sequences_
> and the overlay their _sequences_ (since, they're all
> the same size), is considered an account of second-course
> school-work.
>
> A sequitur cascade of sequiturs, ....
>
>
you unnecessary complicate your answers like spreading whole story not
getting to the simple points
that makes a situation when i guess most people dont read your posts,
for me its espacilly hard as i dont know english too much
normally you at least should present simple answer first - like 2-3
simple lines and then spread a story imo
Technical Details
Message-ID:
<11eq534$3jcrv$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11epud7$3fup6$1@dont-email.me> <nlmdnS7uoOV1Fo32nZ2dnZfqn_WdnZ2d@giganews.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: fir <profesor.fir@gmail.com> Newsgroups: comp.lang.c Subject: Re: stupid cascade of errors Date: Wed, 2 Dec 2026 23:11:42 +0100 Organization: A noiseless patient Spider Lines: 115 Message-ID: <11eq534$3jcrv$1@dont-email.me> References: <11epud7$3fup6$1@dont-email.me> <nlmdnS7uoOV1Fo32nZ2dnZfqn_WdnZ2d@giganews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 02 Dec 2026 22:11:49 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3781503"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Y9D0l/rPzVXVfQuzrK0oBRibAtpHPhXg="; posting-host="d8d88b06a7eda50b591c1c8e5ef4a90e" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0 SeaMonkey/2.53.24 Cancel-Lock: sha1:7d/c7g4pisGbzJyyz2g+zq3wp5E= sha256:n4ms8K8M0oYq2/toHY4ydxQ0S4esMMGEGJZV/lwUB08= sha1:Di5m+kM4H3eg08iyotXVykSPEWU= sha256:46LiB3bOU48XLW+x1Ii/BDsM2sf/rxVcUEd2pVEppb4= In-Reply-To: <nlmdnS7uoOV1Fo32nZ2dnZfqn_WdnZ2d@giganews.com>