Arc Forumnew | comments | leaders | submitlogin
2 points by conanite 5696 days ago | link | parent

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 ...



3 points by CatDancer 5696 days ago | link

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.

-----

2 points by conanite 5695 days ago | link

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.

-----

3 points by CatDancer 5695 days ago | link

In the description I moved the comment up a line so it doesn't make it appear that the parser is doing magic ^__^

-----