org.eclipse.rdf4j.query.parser.serql.grammar.txt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdf4j-queryparser-serql Show documentation
Show all versions of rdf4j-queryparser-serql Show documentation
Query language parser implementation for SeRQL.
ParseUnit ::= Query [NamespaceDeclList]
NamespaceDeclList::= "using" "namespace" NamespaceDecl ("," NamespaceDecl)*
NamespaceDecl ::= "="
Query ::= TupleQuerySet
| GraphQuerySet
TupleQuerySet ::= TupleQuery [SetOperator TupleQuerySet]
TupleQuery ::= "(" TupleQuerySet ")"
| SelectQuery
GraphQuerySet ::= GraphQuery [SetOperator GraphQuerySet]
GraphQuery ::= "(" GraphQuerySet ")"
| ConstructQuery
SetOperator ::= "union" ["all"]
| "minus"
| "intersect"
SelectQuery ::= "select" ["distinct"|"reduced"] Projection [QueryBody]
Projection ::= "*"
| [ ProjectionElem ("," ProjectionElem)* ]
ProjectionElem ::= ValueExpr ["as" Var]
ConstructQuery ::= "construct" ["distinct"|"reduced"] ConstructClause [QueryBody]
ConstructClause ::= "*"
| PathExprList
QueryBody ::= ("from" ["context" ContextID] PathExprList)+
["where" BooleanExpr]
["order" "by" OrderExprList]
["limit" ]
["offset" ]
ContextID ::= Var
| Uri
| BNode
PathExprList ::= UnionPathExpr ("," UnionPathExpr)*
UnionPathExpr ::= PathExpr ("union" PathExpr)*
PathExpr ::= BasicPathExpr
| OptGraphPattern
| "(" PathExprList ")"
BasicPathExpr ::= Node Edge Node [[";"] PathExprTail]
OptGraphPattern ::= "[" PathExprList ["where" BooleanExpr] "]"
PathExprTail ::= Edge Node [[";"] PathExprTail]
| OptPathExprTail [";" PathExprTail]
OptPathExprTail ::= "[" Edge Node [[";"] PathExprTail] ["where" BooleanExpr] "]"
PathExprCont ::= PathExprBranch
| PathExprTail
PathExprBranch ::= ";" PathExprTail
PathExprTail ::= Edge Node
| "[" Edge Node [PathExprCont] ["where" BooleanExpr] "]"
Edge ::= Var
| Uri
Node ::= "{" [ NodeElem ("," NodeElem)* ] "}"
NodeElem ::= Var
| Value
| ReifiedStat
ReifiedStat ::= "{" [NodeElem] "}" Edge "{" [NodeElem] "}"
OrderExprList ::= OrderExpr ("," OrderExpr)*
OrderExpr ::= ValueExpr ["asc"|"desc"]
BooleanExpr ::= OrExpr
OrExpr ::= AndExpr ["or" BooleanExpr]
AndExpr ::= BooleanElem ["and" AndExpr]
BooleanElem ::= "(" BooleanExpr ")"
| "true"
| "false"
| "not" BooleanElem
| "bound" "(" Var ")"
| "sameTerm" "(" ValueExpr "," ValueExpr ")"
| ValueExpr CompOp ValueExpr
| ValueExpr CompOp ("any"|"all") "(" TupleQuerySet ")"
| ValueExpr "like"
| ValueExpr "in" "(" TupleQuerySet ")"
| ValueExpr "in" "(" ArgList ")"
| "exists" "(" TupleQuerySet ")"
| "isResource" "(" Var ")"
| "isURI" "(" Var ")"
| "isBNode" "(" Var ")"
| "isLiteral" "(" Var ")"
| "langMatches" "(" ValueExpr "," ValueExpr ")"
| "regex" "(" ValueExpr "," ValueExpr [ "," ValueExpr ] ")"
CompOp ::= "=" | "!=" | "<" | "<=" | ">" | ">="
ValueExpr ::= Var
| Value
| "datatype" "(" Var ")"
| "lang" "(" Var ")"
| "label" "(" Var ")"
| "namespace" "(" Var ")"
| "localname" "(" Var ")"
| "str" "(" ValueExpr ")"
| FunctionCall
FunctionCall ::= Uri "(" [ArgList] ")"
ArgList ::= ValueExpr ("," ValueExpr)*
Var ::=
Value ::= Uri
| BNode
| Literal
Uri ::=
|
BNode ::=
Literal ::=
|
|
|
|
|
::= "<" (* a legal URI, see http://www.ietf.org/rfc/rfc2396.txt *) ">"
::= ":" *
::= "_:"
::= (* A quoted character string with escapes *)
::= "@"
::= "^^" (|)
::= "+"? [0-9]+
::= "-" [0-9]+
::= ("+"|"-")? [0-9]* "." [0-9]+
::= *
| "_" +
::= (|"_") *
::= (* see http://www.w3.org/TR/REC-xml-names/#NT-NCNameChar *)
::= (* see http://www.w3.org/TR/REC-xml/#NT-Letter *)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy