[antlr-interest] Access to lexer warning/error messages after parsing

Granville Barnett granville at gbarnett.org
Tue Jul 1 11:29:55 PDT 2008


I agree with Waverly, catching the lexical error's as well seems a little
extreme and not really necessary.

Granville

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Edwards, Waverly
Sent: 01 July 2008 17:43
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Access to lexer warning/error messages after
parsing

 
Wouldn't it be wise to just let the lexical error go and let the parser
catch it.
Any invalid character isn't really recoverable and since the user has to
fix it
anyway, it will just show up a misplaced identifier, number or symbol as
far as the
parser is concerned.  Also if you store the lexical error, you'll end up
reporting
the error twice... once as a lexical error and once as a parse error.


W.

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Andy Tripp
Sent: Tuesday, July 01, 2008 11:38 AM
To: Raphael Reitzig
Cc: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Access to lexer warning/error messages
after parsing

Raphael Reitzig wrote:
> * possibility to set output stream for error messages via grammar
option:
> @errors { System.err } (default)

Note that you can do this yourself today with System.setErr().





More information about the antlr-interest mailing list