[antlr-interest] Exit Status from ANTLR

Jim Idle jimi at temporal-wave.com
Wed Jun 27 08:21:47 PDT 2007


The C runtime tracks the error count:

RECOGNIZER->errorCount (in actions)

 and I have attempted to make the default error a bit more obvious just
because when I develop grammars I tend to do the error message last and
can never remember what all the @:-@[] mean with certainty ;-)

To be quite honest though it is just not practical to supply an error
display routine that would be really useful for all cases. I started to
write a generic soruce code line and carat routine for instance and you
soon realize that there is more chance of an error in that routine than
not. So, all developers should expect to override and implement their
own error display routine in any case.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Robin Davies
> Sent: Tuesday, June 26, 2007 11:38 PM
> To: Randall R Schulz; antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Exit Status from ANTLR
> 
> > >> I want an exit status from the ANTLR parser generator tool, not
> > >> from the parsers it generates.
> > >
> 
> Although an error count in the runtime would be nice too. At this
> point, I
> can't imagine that anyone is NOT going to have to find the right error
> message function in parsers and/or lexers to override just so that
they
> can
> go ++Error, just so that they can return failures when running
> generated
> grammars.  (Is this a C# runtime thing, or do all runtimes suffer from
> that?)
> 
> 



More information about the antlr-interest mailing list