Re: Patch for column number in doas error messages

2018-07-09 Thread Laurence Tratt
On Mon, Jul 09, 2018 at 10:04:35AM +0200, Otto Moerbeek wrote: Hello Otto, >> I still don't see the point. In 30 years, I've gotten by with parsers >> that say "syntax error", and had very bad experiences with programs that >> do a poor job anticipating where the parse error is. Of course there

Re: Patch for column number in doas error messages

2018-07-09 Thread Phil Eaton
Thanks for the comments. Happy to take a stab at going the bc/bc.y route if that seems acceptable. That yyerror handler looks much more helpful. On Mon, Jul 9, 2018 at 4:04 AM Otto Moerbeek wrote: > On Mon, Jul 09, 2018 at 01:52:29AM -0600, Theo de Raadt wrote: > > > Otto Moerbeek wrote: > > >

Re: Patch for column number in doas error messages

2018-07-09 Thread Otto Moerbeek
On Mon, Jul 09, 2018 at 01:52:29AM -0600, Theo de Raadt wrote: > Otto Moerbeek wrote: > > > On Mon, Jul 09, 2018 at 01:21:25AM -0600, Theo de Raadt wrote: > > > > > Phil Eaton wrote: > > > > > > > Hey, > > > > > > > > Doas currently tells you the line but not the column for syntax errors. >

Re: Patch for column number in doas error messages

2018-07-09 Thread Theo de Raadt
Otto Moerbeek wrote: > On Mon, Jul 09, 2018 at 01:21:25AM -0600, Theo de Raadt wrote: > > > Phil Eaton wrote: > > > > > Hey, > > > > > > Doas currently tells you the line but not the column for syntax errors. In > > > the case of a missing newline at the end of a line I was confused. So I > >

Re: Patch for column number in doas error messages

2018-07-09 Thread Otto Moerbeek
On Mon, Jul 09, 2018 at 01:21:25AM -0600, Theo de Raadt wrote: > Phil Eaton wrote: > > > Hey, > > > > Doas currently tells you the line but not the column for syntax errors. In > > the case of a missing newline at the end of a line I was confused. So I > > added the column number to the message

Re: Patch for column number in doas error messages

2018-07-09 Thread Theo de Raadt
Phil Eaton wrote: > Hey, > > Doas currently tells you the line but not the column for syntax errors. In > the case of a missing newline at the end of a line I was confused. So I > added the column number to the message as well. > > Also, is there any interest in relaxing the grammar so a traili

Re: Patch for column number in doas error messages

2018-07-08 Thread Martijn van Duren
Hello Phil, On 07/09/18 02:35, Phil Eaton wrote: > Hey, > > Doas currently tells you the line but not the column for syntax errors. In > the case of a missing newline at the end of a line I was confused. So I > added the column number to the message as well. I don't care much about the change on

Patch for column number in doas error messages

2018-07-08 Thread Phil Eaton
Hey, Doas currently tells you the line but not the column for syntax errors. In the case of a missing newline at the end of a line I was confused. So I added the column number to the message as well. Also, is there any interest in relaxing the grammar so a trailing rule without a newline is ok?