I'm curious, in the example you give, you show a missing closing paren after a def; but how does the reader know that the missing paren isn't missing from a later form? (assuming the reader has little understanding of the content it's reading beyond paren-balancing - especially since it's a scheme reader reading arc code).
The only obvious clue I can see is indentation ...
At this stage, MzScheme is reading lists from the input file as data. Once a complete list has been read, Arc then takes that list and interprets it as a piece of Arc code.
On line 4, the MzScheme reader sees the first opening parenthesis which starts the def. It then reads all the way to the end of the file without finding a closing parenthesis, and so complains that it isn't able to read the list starting on line 4.
ummm ... doh. I understand now, it's reporting the line number of the unmatched opening paren ... I was thinking it was the line number where the missing one should have been. thanks.