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


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/
#Processed by Id:,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/", line 707, in ?
  File "/var/tmp/WWW/2000/10/swap/", line 502, in doCommand
  File "/var/tmp/WWW/2000/10/swap/", line 190, in load
    return self.loadBuf(    # self._formula
  File "/var/tmp/WWW/2000/10/swap/", line 198, in loadBuf
  File "/var/tmp/WWW/2000/10/swap/", line 213, in feed
    i = self.directiveOrStatement(str,j)
  File "/var/tmp/WWW/2000/10/swap/", line 226, in
    j = self.statement(str, i)
  File "/var/tmp/WWW/2000/10/swap/", line 314, in statement
    j = self.property_list(str, i, r[0])
  File "/var/tmp/WWW/2000/10/swap/", line 571, in
    i = self.object_list(str, j, objs)
  File "/var/tmp/WWW/2000/10/swap/", line 589, in
    i = self.object(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/", line 743, in object
    j = self.subject(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/", line 320, in subject
    return self.item(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/", line 393, in item
    return self.path(str, i, res)
  File "/var/tmp/WWW/2000/10/swap/", 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 . version 1.47 version 1.109 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 -

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