help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error: End of file during parsing


From: Gregory Heytings
Subject: Re: Error: End of file during parsing
Date: Tue, 27 Sep 2022 11:48:25 +0000


It did tell you: the error is at EOF. That's where Emacs realized that there is an error. It cannot do that earlier.

The problem is likely unbalanced parentheses somewhere.

If a file contains N open parens and N+1 closing parens, or the other way round, Emacs can't even know or conclude what the programmer actually wanted to write. This kind of problem requires some manual error searching by the programmer.


If a file contains N open parens and N+1 closing parens, Emacs displays an error message pointing to the closing paren to which no opening paren corresponds.

If a file contains N+1 open parens and N closing parens, Emacs displays an "End of file during parsing" error message. It could be a bit smarter, though: if one assumes that the file is properly indented, which is usually the case, whenever a parenthesis is read in column 1, the number of opening and closing parens must match. IOW, Emacs could point to the first such place where this is not the case. Such a hint would not be 100% accurate, but would be helpful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]