frankpfenning / C0

C0 Language
4 stars 0 forks source link

Error locations off by one in first line of file #42

Closed frankpfenning closed 11 years ago

frankpfenning commented 11 years ago

Somehow, error locations are off-by-one in the first line of a file. Error locations are correct when coin is parsing interactively.

robsimmons commented 11 years ago

In coin/coin.sml, remember_pos is always initialized to 2, not 1. Similarly initializing the stream at 2 instead of 1 in makeLexer seems to resolve this issue. That's not particularly pleasing, as resolutions go, but that's the way I resolved this in r234. I'll let Frank decide whether that's good enough to close the issue.

frankpfenning commented 11 years ago

It works, "just because". I am sure at some point this will come back to us, for now I will mark it as closed.