[prev in list] [next in list] [prev in thread] [next in thread] 

List:       antlr-dev
Subject:    Re: [antlr-dev] Another error message going too far?
From:       Terence Parr <parrt () cs ! usfca ! edu>
Date:       2008-05-08 17:44:13
Message-ID: CB281548-8E05-4555-B5E0-BD3F86E3C19C () cs ! usfca ! edu
[Download RAW message or body]

Hmm....maybe ANTLR should delete all dependent output files as it  
starts; 'course I can't know that until I parse everything (imports  
can chain).  If I say "gcc t.c", i expect t.o to be wiped out no  
matter what. I expect it to be like "myprog > t.o", which wipes t.o  
first.

make sense?

Ter
On May 7, 2008, at 1:09 PM, Benjamin Niemann wrote:

> I guess this "reference ... is ambiguous" error is generated during
> analysis, so ANTLR should probably just bail out after analysis, if
> there was an error. Are there any (regular) error messages during
> codegen? I mean except those "internal error, template not found"
> thingies, those probably need some "delete half written file" handling
> (btw. how do other compilers handle these failure modes, do they leave
> broken files around which are newer than the source???)
>
> On Wed, May 7, 2008 at 10:02 PM, Terence Parr <parrt@cs.usfca.edu>  
> wrote:
>>
>> On May 7, 2008, at 12:46 PM, Benjamin Niemann wrote:
>>
>>
>>> Hi Ter,
>>>
>>> yep, I confirmed that this happens with a fresh build and all
>>> intermediate files cleaned.
>>>
>>> Another thing I noticed in this context, which is an independent
>>> feature request: when ANTLR exits with an error, it should also  
>>> delete
>>> it's output files (or not touch them at all, what ever is easier to
>>> implement). Because now, if I have a make dependency of fooParser.py
>>> on foo.g and ANTLR fails, make will succeed on the next run, because
>>> fooParser.py exists and is newer than foo.g (and in this specific  
>>> case
>>> contains valid code, because the error was wrong...). That caused
>>> quite some confusion on my side...
>>>
>>
>> wow!  crap...you mean if it fails during code gen?  I think that's  
>> the only
>> time it opens them.
>> Ter
>>

_______________________________________________
antlr-dev mailing list
antlr-dev@antlr.org
http://www.antlr.org:8080/mailman/listinfo/antlr-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic