- From: Alex Hall <alexhall@revelytix.com>
- Date: Fri, 8 Jul 2011 20:02:05 -0400
- To: Mischa Tuffield <mischa.tuffield@garlik.com>
- Cc: RDF WG <public-rdf-wg@w3.org>
- Message-ID: <CAFq2bizFoFm+e3efc9Rht+hOUwvnRO5CLJU_gdVJWAOsC+XcjQ@mail.gmail.com>
On Fri, Jul 8, 2011 at 12:29 PM, Mischa Tuffield <mischa.tuffield@garlik.com > wrote: > <snip/> > 5. In Section 4.4 - Grammar: there is a distinct lack of whitespacing here, > I am guessing this is based the current grammar is but a first pass. There > is an email thread I started on this list which includes feedback from a > Stefano D'Angelo (parser implementer), I think we should make sure we > address the issues brought forward there [1]. > > There is a related note from Andy at [1]. Basically, whitespace and comments are included in the PASSED TOKENS rule, which indicates that whitespace and comments are allowed as tokens (a.k.a. terminals) anywhere in the grammar but ignored. This reflects the fact that many tools (javacc, Antlr, etc) can skip whitespace tokens or emit them on a special hidden channel. Note that section 4.1 does talk some about whitespace. Manually inserting whitespace tokens everywhere they could possibly appear in the grammar would be too difficult and would obscure the meaningful parts of the grammar. So we just say that it's allowed everywhere (outside of terminals) and only required to disambiguate two terminals that would otherwise be interpreted as one. Note also that the SPARQL grammar [2] handles whitespace in a similar fashion. -Alex [1] http://lists.w3.org/Archives/Public/public-rdf-wg/2011Mar/0297.html [2] http://www.w3.org/TR/sparql11-query/#whitespace
Received on Saturday, 9 July 2011 00:02:33 UTC