hfc.tex 2.14 KB
 Bernd Kiefer committed Aug 29, 2016 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56  \begin{document} \begin{table} \begin{verbatim} ::= ::= {"SELECT" | "SELECTALL"} ["DISTINCT"] {"*" | ^+} ::= "?"{a-zA-Z0-9}^+ | "?_" ::= any NON-whitespace character ::= "WHERE" {"&" }^* ::= ^+ ::= ^+ ::= | ::= | ::= "<" ^+ ">" ::= "\"" ^* "\"" [ "@" | "^^" ] ::= any character, incl. whitespaces, numbers, even '\"' ::= "de" | "en" | ... ::= "" | "" | "" | "" | "" | "" | "" | "" | "" | "" | "" | "" | "" | "" | "" | ... ::= "FILTER" {"&" }^* ::= | ::= "!=" ::= ^* ::= ^+ ::= "AGGREGATE" {"&" }^* ::= ^+ "=" ^* ::= ^+ \end{verbatim} \caption{BNF for the hfc query syntax} \end{table} \textbf{Notes:} \begin{itemize} \item The reserved keywords ASK, SELECT, SELECTALL, DISTINCT, WHERE, FILTER, and AGGREGATE need \emph{not} be written uppercase. \item It is required that neither filter predicates nor aggregate functions have the same name as the above reserved keywords \item \emph{don't-care} variables should be marked \emph{explicitly} by using exactly the identifier \texttt{?\_}; this is especially important when using \texttt{"*"} in a SELECT; example: \begin{verbatim} SELECT DISTINCT WHERE ?s ?_ SELECT WHERE ?s ?o ?_ ?_ \end{verbatim} when restricting the object position without projecting it, we explicitly write down the selected vars: \begin{verbatim} SELECT ?s WHERE ?s ?o ?_ ?_ FILTER ?o != \end{verbatim} \end{itemize} \end{document}