On 7 October 2017 at 16:50, <address@hidden> wrote:
> An extra pair of parentheses can cause "interesting" behaviour.
It was a double left parenthesis before a 'let'. Just a typo. My friend 'vim'
helped me balance the parentheses and everything looked good. So Chicken
evaluated the result of the 'let' which, oddly, was OK a lot of the time. That
was quite a detective adventure.
> After fixing the bug, I commented out extra display statements. I was too
> hasty and took out more than I should have thereby changing the structure
> of the code (removed some parentheses). The compiler (v4.12.0 Linux 64-bit)
> produced error messages with line numbers inside numbers.scm; this is odd.
I am now able to reproduce the problem. I made a copy of the working code and
reversed the changes I made to correct the problem I introduced earlier.
csc -d1 -O3 -X numbers-syntax -deploy -prologue prologue.scm -R numbers
-R linenoise -o testing testing.scm
Error: (line 1913) unexpected list terminator: #\)
Call history:
numbers.scm:1671: scan-ureal
numbers.scm:1603: scan-digits+hashes
numbers.scm:1549: scan-digits
numbers.scm:1531: lp
numbers.scm:1548: g1937
numbers.scm:1720: %string->compnum
numbers.scm:1672: scan-real
numbers.scm:1671: scan-ureal
numbers.scm:1603: scan-digits+hashes
numbers.scm:1549: scan-digits
numbers.scm:1531: lp
numbers.scm:1548: g1937
numbers.scm:1720: %string->compnum
numbers.scm:1672: scan-real
numbers.scm:1720: %string->compnum
numbers.scm:1672: scan-real <--
Error: shell command terminated with non-zero exit status 17920:
'/usr/local/bin/chicken' 'testing.scm' -output-file 'testing.c' -debug-level 1
-optimize-level 3 -extend numbers-syntax -prologue prologue.scm
-require-extension numbers -require-extension linenoise
The line identified in the error message looks like this - 1913 is marked
with the "->". The last two right parentheses are superfluous.
(else
; not a recognized token, could be a parser error,
; handled at the caller
-> token))))
The call history seems unrelated to the error.