+ more paths
authorEric Prud'hommeaux <eric@w3.org>
Wed, 19 Dec 2012 17:06:57 -0500
changeset 566 9c0f16d34bd7
parent 564 997cdb80c4dc
child 567 2ec620e5c6e8
+ more paths
rdf-turtle/coverage/coverage
rdf-turtle/coverage/paths
--- a/rdf-turtle/coverage/coverage	Wed Dec 19 11:00:34 2012 -0500
+++ b/rdf-turtle/coverage/coverage	Wed Dec 19 17:06:57 2012 -0500
@@ -14,13 +14,16 @@
 use Data::Dumper;
 
 sub main {
-
     my @paths;
     my $pathspec = File::Spec->catpath($Vol, $Dir, 'paths');
     open(PATHS, $pathspec) || die "unable to open \"$pathspec\"\n";
     foreach my $line (<PATHS>) {
-	next if ($line =~ m/\s*#/);
+	$line =~ s{(?<!\\)#.*}{};
+	next if ($line =~ m/^\s*$/);
 	my ($name, $path) = split(/\t+/, $line);
+	chomp($path);
+	$path = eval ('"'.$path.'"');
+	# print "$name: \"$path\"\n";
 	push (@paths, [$name, $path]);
     }
 
@@ -72,6 +75,7 @@
     close (TTL);
     my $parser = turtleAwesome->new();
     &utf8::decode($sample);
+    print "$file\n";
     my $root = $parser->parse($sample);
     my $text = $root->toXML('', {
 	'' => 'http://www.w3.org/2005/01/yacker/uploads/turtleAwesome/', 
--- a/rdf-turtle/coverage/paths	Wed Dec 19 11:00:34 2012 -0500
+++ b/rdf-turtle/coverage/paths	Wed Dec 19 17:06:57 2012 -0500
@@ -1,4 +1,4 @@
-# name					TABs		path
+# name					TABs		path (intepreted as if it were in perl ""s)
 
 # IRIs
 full IRI subject					//triples/subject//IRIREF
@@ -7,8 +7,8 @@
 prefixed IRI subject					//triples/subject//PrefixedName
 prefixed IRI predicate					//triples//predicate//PrefixedName
 prefixed IRI object					//triples//object//PrefixedName
-IRI namespace in triple(p:)				//triples//PrefixedName/PNAME_NS
-IRI localname in triple(:ln | p:ln)			//triples//PrefixedName/PNAME_LN
+IRI namespace in triple (p:)				//triples//PrefixedName/PNAME_NS
+IRI localname in triple (:ln | p:ln)			//triples//PrefixedName/PNAME_LN # !! doesn't discriminate :ln from p:ln
 
 # blank nodes
 labeled blank node subject				//triples/subject//BLANK_NODE_LABEL
@@ -18,11 +18,28 @@
 [ ... ] <p> <o> .					//triples/blankNodePropertyList
 <s> <p> [ ... ] .					//triples//object/blankNodePropertyList
 
+# collections
+collection subject					//triples/subject/blank/collection
+collection object					//triples//object/blank/collection
+empty collection					//triples//collection[not(object)]
+non-empty collection					//triples//collection[object]
+
 # literals
 'x' literal object					//triples//object//STRING_LITERAL1
 '''x''' literal object					//triples//object//STRING_LITERAL_LONG1
 "x" literal object					//triples//object//STRING_LITERAL2
 """x""" literal object					//triples//object//STRING_LITERAL_LONG2
+literal with newline					//String/*[contains(text(), '\n')]
+literal with linefeed					//String/*[contains(text(), '\n')]
+literal with \r						//String/*[contains(text(), '\n')]
+literal with \t						//String/*[contains(text(), '\n')]
+literal with \u						//String/*[contains(text(), '\\u')]
+literal with \U						//String/*[contains(text(), '\\U')]
+integer							//triples//INTEGER
+decimal							//triples//DECIMAL
+double							//triples//DOUBLE
+""^^<t>							//triples//IRIREF
+""^^p:t							//triples//PrefixedName
 
 # Prefixes
 old-style prefix					//prefixID