[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incorrect LINENO with exported nested functions with loops
From: |
Chet Ramey |
Subject: |
Re: Incorrect LINENO with exported nested functions with loops |
Date: |
Thu, 7 Oct 2021 16:10:36 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 |
On 10/7/21 12:58 AM, Tom Coleman wrote:
> I did some experimenting and am confident on the fix. I don't know how to
> supply a patch suggestion officially, but have pasted it below. Four lines
> in parse.y need deleting. Arithmetic for loops should NOT be decrementing
> the 'word_top' variable, they do not make use of it.
I haven't looked closely at this yet, but I'm curious about your reasoning
for the final sentence. The FOR token causes word_top to be incremented by
read_token_word(); why should the production not decrement it after the
entire loop is parsed?
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/