+ Use EOL n-triples
authorGavin Carothers <gavin@carothers.name>
Tue, 23 Aug 2011 16:38:58 -0700
branchn-triples
changeset 138 7c5b7a87c25a
parent 134 2425138ccd6a
child 193 1621235cc65b
+ Use EOL
rdf-turtle/index.html
rdf-turtle/n-prime.bnf
--- a/rdf-turtle/index.html	Mon Aug 22 17:03:07 2011 -0700
+++ b/rdf-turtle/index.html	Tue Aug 23 16:38:58 2011 -0700
@@ -890,7 +890,8 @@
           <p>A N′ document is a Unicode[[!UNICODE]] character string encoded in UTF-8.
           Unicode codepoints only in the range U+0 to U+10FFFF inclusive are allowed.</p>
           <p><a href="#sec-strings">Escape sequence rules</a> are the same as Turtle. However, as only the <code>STRING_LITERAL2</code> production is allowed new lines in literals MUST be escaped.</p>
-          <p class="issue">Current grammar is not in fact line oriented.</p>
+          <p class="issue">Current grammar doesn't deal with comments correctly.</p>
+          <p class="issue">Current grammar doesn't deal with triple lines that end in EOF rather then EOL.</p>
           <pre data-include="n-prime.bnf" data-oninclude="esc">
           </pre>
         </section>
--- a/rdf-turtle/n-prime.bnf	Mon Aug 22 17:03:07 2011 -0700
+++ b/rdf-turtle/n-prime.bnf	Tue Aug 23 16:38:58 2011 -0700
@@ -1,5 +1,5 @@
 primeTriplesDoc         ::= (triple)*
-triple                  ::= subj pred obj '.'
+triple                  ::= subj pred obj '.' ( EOL )
 subj                    ::= IRI_REF | BLANK_NODE_LABEL
 pred                    ::= IRI_REF 
 obj                     ::= IRI_REF | BLANK_NODE_LABEL | lit
@@ -8,6 +8,8 @@
 @terminals
 LANG                    ::= [a-zA-Z]+ ( "-" [a-zA-Z0-9]+ )*
 
+EOL                     ::= [\r\n]+
+
 /* From Turtle */
 [70s] IRI_REF           ::= '<' ([^<>"{}|^`\]-[#x00-#x20] | UCHAR )* '>'
 [73s] BLANK_NODE_LABEL  ::= "_:" PN_LOCAL 
@@ -41,4 +43,4 @@
                           | [#203F-#2040] 
 [100s] PN_LOCAL         ::= ( PN_CHARS_U | [0-9] ) ( ( PN_CHARS | "." )* PN_CHARS )?
 
-@pass                   ::= [ \t\r\n]+ | "#" [^\r\n]* 
\ No newline at end of file
+@pass                   ::= [ \t]+ | "#" [^\r\n]* [\r\n]
\ No newline at end of file