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 <[EMAIL PROTECTED]> 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
[email protected]
http://www.antlr.org:8080/mailman/listinfo/antlr-dev

Reply via email to