compiler messages

Ary Manzana ary at
Mon Dec 11 09:18:10 PST 2006

%u escribió:
> == Quote from Lionello Lunesu (lio at's article
>> Somebody else made mention of this...
> So is Walter aware the compiler can emit hundreds of repeated messages?
> (I guess I should check the bug repository...)
> Ant

This I had to face while porting the DMD parser to Java. The solution
(at least in the parser) was to break some specific while(true) loops if
the token read was TOKeof. Some loops currently request the next token, 
if it's not the expected token signal an error, and then request the 
next token again. This goes forever if the token is TOKeof. At some 
point, if more than 20 errors (I think) are gatheres, the program exits 
abruptly. This saves the compiler from looping undefinitely, but it's 
not a nice solution.

I don't if Walter is aware of this, but the fix should be easy. :-)

More information about the Digitalmars-d-learn mailing list