From ai@solvo.ru Tue Oct  9 12:57:21 2001
Received: from grace.solvo.ru (grace.solvo.ru [195.201.44.100])
	by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f99AvKt28122
	for <prolog@swi.psy.uva.nl>; Tue, 9 Oct 2001 12:57:20 +0200 (MET DST)
Received: from elbrus (elbrus.solvo.ru [195.201.44.16])
	by grace.solvo.ru (8.8.8/8.8.8) with SMTP id OAA16990
	for <prolog@swi.psy.uva.nl>; Tue, 9 Oct 2001 14:57:14 +0400
Message-ID: <00b201c150b1$3b7659d0$102cc9c3@solvo.ru>
From: "Lyosha" <ai@solvo.ru>
To: <prolog@swi.psy.uva.nl>
Date: Tue, 9 Oct 2001 14:57:45 +0400
Organization: Solvo
MIME-Version: 1.0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Subject: [SWIPL] DCG rules and error reporting

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

