Re: Error message with bison and flex

Kaz Kylheku <kaz@kylheku.com>
Thu, 10 Apr 2014 15:06:38 +0000 (UTC)

          From comp.compilers

Related articles
Error message with bison and flex laplante.p@gmail.com (2014-04-07)
Re: Error message with bison and flex kaz@kylheku.com (Kaz Kylheku) (2014-04-10)
Re: Error message with bison and flex DrDiettrich1@aol.com (Hans-Peter Diettrich) (2014-04-11)
Re: Error message with bison and flex gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-04-12)
| List of all articles for this month |

From: Kaz Kylheku <kaz@kylheku.com>
Newsgroups: comp.compilers
Date: Thu, 10 Apr 2014 15:06:38 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 14-04-005
Keywords: errors, practice, comment
Posted-Date: 10 Apr 2014 11:52:18 EDT

On 2014-04-08, laplante.p@gmail.com <laplante.p@gmail.com> wrote:
> Sometime the text return from a syntax error is very short.


Usually, there is little or no program text at all in a syntax error message.


> I would like to output 5 lines before the error and
> 5 lines after the error.


I don't see the point of this.


Just output errors in a way that an IDE can understand, so you can navigate
through errors visually. Then you have all the lines you want before and after
the error.


Speaking for myself, but I suspect the majority of others, programmers do not
want the error output of a compiler inflated by an order of magnitude with
snippets of the source code.
[People do use lex, yacc, et al for other things than compilers that run under IDEs. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.