[closed] Re: Syntax Errors Missed In @keywords/@forAll Combination

Sean,
Thanks.
Negative test is covered by swap/test/neg-keywords3.n3 I think.

The code is fixed too, to give a specific error whenever a declared 
keyword i used for a qname.

Tim

$ echo '@keywords p . @prefix : <#> . @forAll p .' | cwm
#Processed by Id: cwm.py,v 1.145 2004/01/29 23:22:22 timbl Exp
         #    using base file:/devel/WWW/2000/10/swap/test/
         Traceback (most recent call last):
   File "/devel/WWW/2000/10/swap/cwm.py", line 650, in ?
     doCommand()
   File "/devel/WWW/2000/10/swap/cwm.py", line 346, in doCommand
     p.load("", baseURI=_baseURI)
   File "/devel/WWW/2000/10/swap/notation3.py", line 226, in load
     return self.loadBuf(stream.read())    # self._formula
   File "/devel/WWW/2000/10/swap/notation3.py", line 234, in loadBuf
     self.feed(buf)
   File "/devel/WWW/2000/10/swap/notation3.py", line 252, in feed
     i = self.directiveOrStatement(str,j)
   File "/devel/WWW/2000/10/swap/notation3.py", line 262, in 
directiveOrStatement
     j = self.directive(str, i)
   File "/devel/WWW/2000/10/swap/notation3.py", line 315, in directive
     i = self.commaSeparatedList(str, j, res, self.uri_ref2)
   File "/devel/WWW/2000/10/swap/notation3.py", line 669, in 
commaSeparatedList
     i = what(str, i, res)
   File "/devel/WWW/2000/10/swap/notation3.py", line 773, in uri_ref2
     'Keyword "%s" not allowed here.' % v[0])
notation3.BadSyntax: Line 1 of <file:/devel/WWW/2000/10/swap/test/>: 
Bad syntax (Keyword "p" not allowed here.) at ^ in:
"@keywords p . @prefix : <#> . @forAll ^p .

Received on Sunday, 29 February 2004 15:28:49 UTC