Re: Grammar presentation syntax FLD and BLD

> 
> 
> 
> Michael Kifer wrote:
> >>> Further, to dramatically improve readability of examples and test cases, 
> >>> I'd suggest
> >>>
> >>>  Const          ::= LITERAL '^^' SYMSPACE  |  NUMERIC  |  ALPHANUMERIC
> >>>
> >>> where the last 2 options are sugar that allows one to omit any enclosing 
> >>> "" or trailing ^^xsd:decimal or ^^rif:local.
> >>>       
> >> I agree that we want to improve readability of examples.  incidentally, 
> >> I think it is much more convenient to abbreviate IRIs rather than local 
> >> symbols, since local symbols will not be used very often (I think): the 
> >> names of local symbols are not accessible outside the rule set.
> >> However, I'm not sure this BNF is the place.  I think we can just say 
> >> something like:
> >>
> >> For readability, in the examples throughout this document and in other 
> >> documents we use the following abbreviations:
> >> *  "ns#localname"^^rif:iri as compact URIs of the form prefix:localname
> >> *  "numeric+(.numeric+)?"^^xsd:decimal as numbers numeric+(.numeric+)?
> >>     
> >
> > I am reluctant to do this in the official RIF specification, because it is
> > supposed to illustrate how exactly things are supposed to be written in the
> > language.  (Unofficial) tutorials and papers are a different matter. There
> > people can do whatever they want.
> >
> >   
> The problem is the test cases.  Aren't they "official"?  And yet I would 
> like them to be readable (and writable), and I don't think it is 
> desirable to have each test case be in a different language, as Sandro 
> suggests.  Implementers would get a lot of valuable ideas about how to 
> build their translators from reading the test cases, but only if they 
> can read the test cases.

In test cases it is ok, I think. Even in the main document we use compact
URIs, which are considered informal shorthands, so we are not that strict
there either.
My main concern is that we do not use too many shorthands in the examples
in the main body of the document. This is because, I think, we should have
at least some examples that show exactly how things are supposed to be
written, without any shorthands.

In the test cases, you can simply write at the top that you use such and
such conventions (and I would also repeat the curie convention there).
We should use the same set of conventions for all the test cases.

(I understand that Jos meant the main body of the document, not just the
test cases.)


	--michael  

Received on Friday, 29 February 2008 19:30:05 UTC