Did you know ... Search Documentation:
Pack sparkle -- prolog/sparql_dcg.pl
PublicShow source
sparql_goal ---> (sparql_goal, sparql_goal) % conjunction
               ; (sparql_goal; sparql_goal) % disjunction
               ; rdf(resource,resource,object)
               ; filter(cond)
               .

resource :< object. % any resource is an object

literal(+literal)   :: object.  % any ground literal is an object
atomic              :< literal. % any atomic can be a plain literal
lang(atom,atom)     :: literal. % literal with language
type(resource,atom) :: literal. % typed literal

object   :< expr. % any object is an expr
number   :< expr. % Prolog numerical values can also be expressions

condition ---> (cond , cond)
             ; (cond ; cond)
             ; \+ cond
             ; expr == expr
             ; expr \= expr
             ; expr >= expr
             ; expr =< expr
             ; expr < expr
             ; expr > expr
             ; between(expr,expr,expr)
             ; in(object,list(object))
             ; regex(pattern,value)
             ; bound(object)
             ; blank(resource)
             ; uri(object)
             ; literal(object)
             .

expr ---> expr + expr
        ; expr - expr
        ; expr * expr
        ; expr / expr
        ; +expr
        ; -expr
        ; str(expr)
        ; lang(expr)
        ; datatype(expr)
        .

var ---> '$VAR'(integer)
       ; '@'        % anonymous blank node
       ; '@'(atom)  % nonymous blank node
       .

var :< resource
var :< literal

Samer Abdallah, Dept. of Computer Science, UCL (2014)

 select(+Vars:list(expr), +Goal:sparql_goal, +Options:list(option))// is det
Any variables in the query must be represented by '$VAR'/1 terms as generated by numbervars/3.
 ask(+Goal:sparql_goal)// is det
Format an ASK query.
 describe(+Resource:resource)// is det
 describe(+Resource:resource, +Goal:sparql_goal)// is det

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 describe(Arg1, Arg2, Arg3, Arg4)