What to use for finding as many syntax errors as possible.

Chris Angelico rosuav at gmail.com
Sun Oct 9 18:23:27 EDT 2022


On Mon, 10 Oct 2022 at 06:50, Antoon Pardon <antoon.pardon at vub.be> wrote:
> I just want a parser that doesn't give up on encoutering the first syntax
> error. Maybe do some semantic checking like checking the number of parameters.

That doesn't make sense though. It's one thing to keep going after
finding a non-syntactic error, but an error of syntax *by definition*
makes parsing the rest of the file dubious. What would it even *mean*
to not give up? How should it interpret the following lines of code?
All it can do is report the error.

You know, if you'd not made this thread, the time you saved would have
been enough for quite a few iterations of "fix one syntactic error,
run it again to find the next".

ChrisA


More information about the Python-list mailing list