delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/30/10:29:07

Date: Sun, 30 Aug 1998 17:28:37 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Nate Eldredge <nate AT cartsys DOT com>
cc: Endlisnis <s257m AT unb DOT ca>, djgpp AT delorie DOT com
Subject: Re: Display question...
In-Reply-To: <35E733E7.BE5A1DB7@cartsys.com>
Message-ID: <Pine.SUN.3.91.980830172221.20257a-100000@is>
MIME-Version: 1.0

On Fri, 28 Aug 1998, Nate Eldredge wrote:

> It detects it quite well, but doesn't always explain it well.  I once
> had a bug involving a missing parenthesis in a complicated macro.  GCC
> just said "Parse error", which didn't help me much.  In desperation I
> submitted the code to Turbo C, got a "Missing )" message, and had it
> fixed quickly.  But that is less important.

"Parse error" means "Syntax error", that's all.

The degree to which a given parser can give you specific diagnostics on
syntax errors depends on how that parser was designed.  It is sheer luck
to get a diagnostics such as "Missing )"; a sufficiently-complexx
expression that uses unbalanced parentheses will probably break that. 
Many syntax errors leave the parser in an error state from which they
cannot second-guess what was the cause of the problem without a prolonged 
analysis that would make the parse painfully slow. 

On the other hand, you could always ask: if Turbo C is so smart, why 
doesn't it just add that paren and compile the source anyway?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019