Subject: [SWIPL] DCG rules and error reporting

From: "Lyosha" <[email-masked]>
Date: Tue, 9 Oct 2001 14:57:45 +0400

Hi,

I have a question about parsing with DCG rules.
Maybe someone can suggest me a solution. I know
it's something simple, but I just can't see it.

I use DCG rules in my parser. Is there a way to implement 
error reporting mechanism refering to lines in the source stream?
I want my parser to point me at the specific line where the error 
happened.

For example, I could define: 
newline --> "\n". 
and put a counter for lines in there, but it won't work with
combination of rollback and cut that I use in my other DCG rules.

Thanks,
Lyosha