Path: csiph.com!eternal-september.org!feeder3.eternal-september.org!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: cross@spitfire.i.gajendra.net Newsgroups: comp.compilers Subject: Re: paper: Towards Automatic Error Recovery in Parsing Expression Date: Fri, 11 Jul 2025 11:33:33 -0000 Organization: Compilers Central Sender: johnl%iecc.com Approved: comp.compilers@iecc.com Message-ID: <25-07-007@comp.compilers> References: <25-07-004@comp.compilers> <25-07-005@comp.compilers> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="7273"; mail-complaints-to="abuse@iecc.com" Keywords: errors, parse Posted-Date: 11 Jul 2025 13:42:17 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3674 In article <25-07-005@comp.compilers>, Kaz Kylheku <643-408-1753@kylheku.com> wrote: >On 2025-07-09, John R Levine quoted: >> Error recovery is an essential feature for a parser that should be plugged >> in Integrated Development Environments (IDEs), which must build Abstract > >I am deeply skeptical. Error recovery is essential when you're handing >a deck of punched cards to a job submission window. > >A compiler integrated into an IDE can stop at the first error, >put the cursor there and so it goes. > >The IDE can always be compiling as you type each character, so that most >of the time there are no errors in the code. The only time an error >occurs is when you type something malformed or not yet complete, and >that is happening exactly in one place: where the cursor is in the >file that has the current editing focus. The situation is flagged >as you type so you fix it Sadly, this sounds more aspirational than reflective of actual pratice today. One may have a perfectly fine program that one loads into one's IDE (or, increasingly, more traditional text editor augmented with an external language server that it communicates with via an RPC protocol), but one hasn't (yet!) set up the environment so that the code actually compiles. As a trivial example, one might need to configure the path to a set of prerequisite libraries, or install a dependency, or something similarly mundane, before the code will actually build. The editor choking at that point is not useful. >If your refactoring tools are producing bad code, the tools need >to be repaired. Caveat that I'm not done reading the paper, but I am not sure that was the issue. I think it has more to do with things like supporting syntax highlighting and cross-referencing. A missing semi-colon that caused syntax highlighting in the rest of the file to fail is kind of a bummer. - Dan C.