[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: monitrc erroneous line numbering off by one
From: |
Christian Hopp |
Subject: |
Re: monitrc erroneous line numbering off by one |
Date: |
Thu, 12 Feb 2004 15:50:50 +0100 (CET) |
On Thu, 12 Feb 2004, Christian Hopp wrote:
> On Thu, 12 Feb 2004, Jan-Henrik Haukeland wrote:
>
> > Martin Pala <address@hidden> writes:
> >
> > >> 2.) parser increments the line position (lineno) by all empty and
> > >> comment lines following the invalid line, which is reported. Can
> > >> some flex guru look on it? Both attached configurations still
> > >> produces this kind of error.
> > >>
> > >
> > > This problem remains. Is here some way how to ignore "\n" for empty
> > > and comment lines following invalid statement line?
> >
> > It's tricky because when the statement is treated in the action block
> > of the parser, flex has already scanned to the next token, and if
> > there was white space or comments "#.." the lineno variable will be
> > increased (at least that is the hypothesis). In other words when we
> > report an error in lineno, the actual line number can/will be off by
> > the number of whitespace lines to the next valid token. Hmm, food for
> > thoughts.. how to fix this whiteout hacking to much. Christian, any
> > ideas?
>
> This problem happens as soon as we deal with strings (same for paths,...)
> and statements with variable arguments... like allow.
Okay its anykind of "argument" we are referring to... also numbers!
> My idea is to save the position when ever a string type is parsed. And
> whenever an error is referring to such an error we use the saved pos
> instead of the lineno. It seems to work but it needs further testing.
I also found a possible segfault (and a fix) in the parser in
p.y:addhtpasswdentry.
CHopp
--
Christian Hopp email: address@hidden
Institut für Elektrische Informationstechnik fon: +49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf. fax: +49-5323-72-3197
pgpkey: https://www.iei.tu-clausthal.de/pgp-keys/
- Re: monitrc erroneous line numbering off by one, Martin Pala, 2004/02/11
- Re: monitrc erroneous line numbering off by one, Martin Pala, 2004/02/11
- Re: monitrc erroneous line numbering off by one, Jan-Henrik Haukeland, 2004/02/12
- Re: monitrc erroneous line numbering off by one, Christian Hopp, 2004/02/12
- Re: monitrc erroneous line numbering off by one,
Christian Hopp <=
- Re: monitrc erroneous line numbering off by one, Christian Hopp, 2004/02/12
- Re: monitrc erroneous line numbering off by one, Jan-Henrik Haukeland, 2004/02/12
- Re: monitrc erroneous line numbering off by one, Christian Hopp, 2004/02/12
- Re: monitrc erroneous line numbering off by one, Christian Hopp, 2004/02/13
- Re: monitrc erroneous line numbering off by one, Jan-Henrik Haukeland, 2004/02/13
- Re: monitrc erroneous line numbering off by one, Christian Hopp, 2004/02/13
- Re: monitrc erroneous line numbering off by one, Jan-Henrik Haukeland, 2004/02/13
- Re: monitrc erroneous line numbering off by one, Christian Hopp, 2004/02/13