On SWI-prolog 8.1.0 I’m using phrase_from_file to parse a file.
When I detect an error I need to report the line number. Unfortunately line_count/2 reports the wrong number, apparently the last line of the last file compiled?
This used to work - or perhaps I’ve never advanced that many lines before realizing I can’t advance the parse and reporting the error? I describe using line_count/2 and phrase_from_file in the DCG tutorial. And the SimGen code was using it (though it might have been broken, we stopped work rather abruptly on it while I was in middle of some major work).