SPARQL Abstract Syntax

(This is without any assumptions on the question of whether to have an XML 
syntax or not.)

An abstract syntax means, to me, a way to write down the key concepts of the 
QL without getting into the detail of a particular serilaization.

A quick guess at an abstract syntax - this is pretty much a direct recording 
of the way that rq23 sets up queries:

query (
    type = one of ( select , construct , describe , ask)
      select(vars or * , distinct?)
      construct (triple template, triple template, ...)
      describe(list of var or uri)
      ask()
    pattern()
      basic(triple pattern, triple pattern, ...)
      optional(pattern)
      union(pattern, pattern, ...)
      filter(constraint expression)
      pattern
    order(order condition, order condition, ...)
    limit(N)
    offset(N)
)

I'd assume that any concrete syntax has extra features (e.g. prefixes) which 
it would want to add to the mix.

	Andy

Received on Monday, 21 March 2005 21:22:55 UTC