[redland-dev] [Raptor RDF Syntax Library 0000499]: Turtle parser fails to correctly parse valid syntax

Mantis Bug Tracker mantis-bug-sender at librdf.org
Wed Mar 21 11:49:04 EDT 2012


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.librdf.org/mantis/view.php?id=499 
====================================================================== 
Reported By:                normang
Assigned To:                
====================================================================== 
Project:                    Raptor RDF Syntax Library
Issue ID:                   499
Category:                   api
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
Syntax Name:                Turtle 
====================================================================== 
Date Submitted:             2012-03-21 15:49
Last Modified:              2012-03-21 15:49
====================================================================== 
Summary:                    Turtle parser fails to correctly parse valid syntax
Description: 
(yes, this is against a not-quite-up-to-date release; apologies if this has been
fixed in the interim)

A Turtle IRIref can be of the form "PNAME_NS PN_LOCAL" (see
http://www.w3.org/TR/turtle/#sec-grammar-grammar).  Following this through, we
find

[100s]   	<PN_LOCAL>	   ::=   	( PN_CHARS_U | [0-9] ) ( ( PN_CHARS | "." )*
PN_CHARS )?

PN_CHARS_U is [A-Za-z_], and PN_CHARS is [A-Za-z0-9-_]

An IRIref of "x:Type.dot" is therefore a valid IRIref, but rapper doesn't accept
it.

Steps to Reproduce: 
% cat try.ttl
@prefix x: <urn:example.org#>.

<#foo> a x:Type.dot .
% rapper -iturtle try.ttl
rapper: Parsing URI file:///path/try.ttl with parser turtle
rapper: Serializing with serializer ntriples
<file:///path/try.ttl#foo> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<urn:example.org#Type> .
rapper: Error - URI file:///path/try.ttl:3 - syntax error
rapper: Parsing returned 1 triple
% 

Additional Information: 
The file
    @prefix x: <urn:example.org#>.
    <#foo> a x:Type.dot.
should work, too, with the last IRIref being <urn:example.org#Type.dot>
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2012-03-21 15:49 normang        New Issue                                    
======================================================================



More information about the redland-dev mailing list