Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border4.nntp.dca.giganews.com!backlog4.nntp.dca3.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: Kaz Kylheku Newsgroups: comp.compilers Subject: Re: Error message with bison and flex Date: Thu, 10 Apr 2014 15:06:38 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 18 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-04-007@comp.compilers> References: <14-04-005@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: miucha.iecc.com 1397145138 79497 2001:470:1f07:1126:0:676f:7373:6970 (10 Apr 2014 15:52:18 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Thu, 10 Apr 2014 15:52:18 +0000 (UTC) Keywords: errors, practice, comment Posted-Date: 10 Apr 2014 11:52:18 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com X-Original-Bytes: 1697 Xref: csiph.com comp.compilers:1214 On 2014-04-08, 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]