[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small fix of column number in parser
From: |
Daniel Kraft |
Subject: |
Re: Small fix of column number in parser |
Date: |
Thu, 28 Apr 2011 08:53:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9 |
On 04/28/11 08:13, John W. Eaton wrote:
On 28-Apr-2011, Jordi Gutiérrez Hermoso wrote:
| On 5 April 2011 04:17, Daniel Kraft<address@hidden> wrote:
|
|> attached is a hg changeset that fixes wrong column numbers. If the
|> attached test.m is executed without the patch, one gets:
|>
|> error: bar
|> error: called from:
|> error: /tmp/test.m at line 2, column -1
|>
|> With the patch, the column number is correctly reported as 1.
|
| I tested your patch and it worked, so I pushed it to the default
| branch:
|
| http://hg.savannah.gnu.org/hgweb/octave/rev/fd367312095a
I don't understand why you removed the line that decremented the
column count when the character is put back on the input stream.
What problem does that fix? It looks to me like removing that line
would introduce a bug.
As I understand it, this should be right -- it's more or less the other
way round, if we skip a white-space character, we increment the counter.
If we don't have white-space, we put it back on the stream, return and
do nothing at all to the counter. Decrementing it was precisely the
reason for reporting "column -1" above.
|> In particular, is there some tag I should add to messages sent with
|> patches? E.g., on the GCC lists, we have "[patch]" in the subjects
|> of messages containing diff's.
|
| Yes, please use our patch tracker. Easier to have them all in one
| place instead of scattered in our respected inboxen:
|
| https://savannah.gnu.org/patch/?group=octave
If the patch fixes a bug, then please attach the patch to a bug report
in the bug tracker. I'd prefer to just use the patch tracker for new
functions or features, not for bug fixes.
There was no bug report for this problem -- but of course I can always
create one to attach a patch which fixes a bug. In that case, should I
also post to the mailing list that a new patch is available, or can this
be seen right from the bug-list?
Yours,
Daniel
--
http://www.pro-vegan.info/
--
Done: Arc-Bar-Cav-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Hea-Mon-Pri