From grossd@ibm.net  Tue Mar  7 03:49:55 2000
Received: from mail2.rdc3.on.home.com (mail2.rdc3.on.home.com [24.2.9.41])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id DAA01821
	for <prolog@swi.psy.uva.nl>; Tue, 7 Mar 2000 03:49:54 +0100 (MET)
Received: from cr889345-a.yec1.on.wave.home.com ([24.114.56.22])
          by mail2.rdc3.on.home.com (InterMail v4.01.01.00 201-229-111)
          with SMTP
          id <20000307025009.LAIN11289.mail2.rdc3.on.home.com@cr889345-a.yec1.on.wave.home.com>;
          Mon, 6 Mar 2000 18:50:09 -0800
Received: by localhost with Microsoft MAPI; Mon, 6 Mar 2000 21:46:31 -0800
Message-ID: <01BF87B5.6F09B240.grossd@ibm.net>
From: Daniel Gross <grossd@ibm.net>
Reply-To: "gross@fis.utoronto.ca" <gross@fis.utoronto.ca>
To: "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Cc: "'gross@fis.utoronto.ca'" <gross@fis.utoronto.ca>
Subject: reading a text file ..
Date: Mon, 6 Mar 2000 21:46:30 -0800
X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211
Encoding: 47 TEXT

Hi all,

After a long time i am writing a prolog program again, but encountered some 
problems, which i think, are due to not knowing how to approach things 
properly.

Following is a sample template of text i wish to parse into prolog, and 
represent as facts.

Token SerializedViewObject_0_1
    IN SerializedObject
    WITH
        attribute, type
             : "OME.GraphicView$GVERecord"
        attribute
            x : 323
        attribute
            y : 301
        attribute
            ID : 1
END

SimpleClass IStarRoleElement
    IN OMEInstantiableClass, IStarActorElementClass
    ISA IStarActorElement
    WITH
        attribute, imagesize
            height : 80
        attribute, imagesize
            width : 80
        attribute, imagename
             : "Role.gif"
        attribute, name
             : "Role"
END


In order to make my life easy (i thought) i read in line by line and 
translate each line into a prolog clause. I managed to do all the work just 
when i wish to translate Comma seperated lists of into lists.i found it 
quite complicated. Is there a simple way to do that. In general is there an 
easy way to parse such structures into prolog facts.

appreciating any response

Daniel


