- From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
- Date: Fri, 7 Jul 2017 08:38:06 -0700
- To: Wouter Beek <wouter@triply.cc>
- Cc: "public-rdf-comments@w3.org" <public-rdf-comments@w3.org>
Yes, I mistyped the Hex for octothorpe. One of the problems with building a single-level grammar for n-triples is how to deal with comments. As comments can only occur at the end of a line, it makes sense to fold them into the production for ends of lines (and the end of the document). Another problem with the n-triples grammar is its treatment of carriage return and line feed. I don't know what the right course to solve these problems should be. I'm almost at the point where I think that the only suitable remedy is revised TRs for N-Triples and N-Quads, and probably also Turtle. peter On 07/07/2017 08:02 AM, Wouter Beek wrote: > Hi Peter, others, > > Thanks for working on clarifying the grammar! > > On Thu, Jun 29, 2017 at 11:15 AM, Peter F. Patel-Schneider > <peter.patel-schneider@nuance.com <mailto:peter.patel-schneider@nuance.com>> > wrote: > > [7] EOL ::= ( WS? ('#x22' [^#xD#xA]* )? [#xD#xA] )+ > > [7a] END ::= EOL? WS? ('#x22' [^#xD#xA]* )? > > > Do you mean #x23 in the above two rules? I'm not sure what a double quote > would do there, but a line comment might make sense. > > Now that end-of-line characters are made explicit in the grammar, I'm > wondering whether there are implications for the way in which line numbers are > reported by processors? E.g., if a parser encounters a bug on a certain line > it is nice if the user is able to go to that line and fix the bug there. > > Most processors will use Unix and/or Windows end-of-line conventions and will > report an error on the second line of the following content (i.e., missing > end-of-statement character): > > ``` > <x:x><x:x><x:x>.#xD#xA<y:y><y:y><y:y> > ``` > > But according to the N-Triples grammar, the missing end-of-statement character > is not on the second but on the third line. > > --- > Cheers!, > Wouter. > > Email: wouter@triply.cc <mailto:wouter@triply.cc> > WWW: http://triply.cc
Received on Friday, 7 July 2017 15:38:44 UTC