monit-dev
[Top][All Lists]
Advanced

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

Re: monitrc erroneous line numbering off by one


From: Jan-Henrik Haukeland
Subject: Re: monitrc erroneous line numbering off by one
Date: Thu, 12 Feb 2004 13:36:06 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Reasonable Discussion, linux)

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?

-- 
Jan-Henrik Haukeland




reply via email to

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