W3C home > Mailing lists > Public > www-archive@w3.org > January 2003

Latest version of CWM needs line return after last predicate, is much slower too

From: Dominique HazaŽl-Massieux <dom@w3.org>
Date: 16 Jan 2003 11:11:31 +0100
To: www-archive+n3bugs@w3.org, timbl@w3.org, connolly@w3.org
Message-Id: <1042711893.17315.230.camel@stratustier>

As I was working on some rules for the Matrix maintenance, I noticed
that the latest version of CWM reacts differently from a previous
version, since it now requires a line return after the last predicate in
a file.

The attached file that only contains a trivial predicate triggers an
error when feed into cwm:
dom@stratustier:~/tmp$ python2.2 /var/tmp/WWW/2000/10/swap/cwm.py
#Processed by Id: cwm.py,v 1.115 2003/01/10 17:13:13 timbl Exp 
        #    using base file:/home/dom/tmp/toto.n3
        Traceback (most recent call last):
  File "/var/tmp/WWW/2000/10/swap/cwm.py", line 707, in ?
  File "/var/tmp/WWW/2000/10/swap/cwm.py", line 502, in doCommand
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 190, in load
    return self.loadBuf(stream.read())    # self._formula
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 198, in loadBuf
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 213, in feed
    i = self.directiveOrStatement(str,j)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 226, in
    j = self.statement(str, i)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 314, in statement
    j = self.property_list(str, i, r[0])
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 571, in
    i = self.object_list(str, j, objs)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 589, in
    i = self.object(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 743, in object
    j = self.subject(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 320, in subject
    return self.item(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 393, in item
    return self.path(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/notation3.py", line 405, in path
    if ahead not in _namechars + "[{(":
TypeError: 'in <string>' requires character as left operand

This error disappear when you add a line return after the predicate. I
don't if it's a bug or an intended change of behavior (my current
day-to-day version uses .
llyn.py version 1.47
cwm.py version 1.109
notation3.py version 1.120

On a completely unrelated point, the latest version of cwm is *much*
slower than the above (like 3 times slower), which shows pretty badly in
my usual applications such as tr and matrix automations.

Hope this helps,

Dominique HazaŽl-Massieux - http://www.w3.org/People/Dom/

<http://foo.bar> <http://foo.bar> <http://foo.bar>.

Received on Thursday, 16 January 2003 05:16:44 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:42:18 UTC