bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] Feature request


From: arnold
Subject: Re: [bug-gawk] Feature request
Date: Tue, 26 May 2015 17:26:03 -0400
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

> From: "Anton Treuenfels" <address@hidden>
> To: <address@hidden>
> Date: Thu, 21 May 2015 21:28:57 -0500
> Subject: [bug-gawk] Feature request
>
> I wonder if it might be possible to incorporate some way to set the
> number of errors gawk reports before it gives up and dies. I ask because
> a single parse error can trigger a cascade of additional errors - most
> of which are not only irrelevant but have the effect of scrolling the
> actual triggering error off the screen. Then it becomes a game of "can
> I stop the scroll fast enough to actually see the real error?"
>
> Just a thought.
>
> - Anton Treuenfels

This is one of those damned-if-you-do-damned-if-you-don't situations.
The yyerror() routine purposely does not exit after the first syntax
error in the hope that more (legitimate) errors will be discovered and
reported. This doesn't always work out.

You can edit the yyerror() routine in awkgram.y to call exit(EXIT_FAILURE)
at the end.  You could also just increase the history size of your terminal
emulator for scrolling backwards.

I don't particulary wish to add an option or environment variable
to change this behavior.

Thanks,

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]