forked from ontop/ontop
-
Notifications
You must be signed in to change notification settings - Fork 0
ObdalibComponentsDatalogParser
Martin Rezk edited this page Nov 29, 2013
·
3 revisions
[1] | parse | ::= | prog EOF |
[2] | prog | ::= | base? directive* rule+ |
[3] | directive | ::= | 'prefix' prefix '<'uriref'>' |
[4] | base | ::= | 'base' '<'uriref'>' |
[5] | rule | ::= | datalog_syntax_rule / swirl_syntax_rule |
[6] | prefix | ::= | STRING_PREFIX/':' |
[7] | uriref | ::= | STRING_URI |
[8] | datalog_syntax_rule | ::= | head? ':-' body? |
[9] | swirl_syntax_rule | ::= | body? '->' head? |
[10] | head | ::= | atom |
[11] | body | ::= | atom ((','/'^') atom)* |
[12] | atom | ::= | predicate '(' terms ')' |
[13] | predicate | ::= | full_name |
[14] | terms | ::= | term (',' term)* |
[15] | qualified_name | ::= | prefix id |
[16] | plain_name | ::= | id |
[17] | full_name | ::= | uriref |
[18] | term | ::= | object_term uri_term |
[19] | variable_term | ::= | '*' |
[20] | literal_term | ::= | STRING_LITERAL / STRING_LITERAL2 |
[21] | object_term | ::= | function '(' terms ')' |
[22] | uri_term | ::= | STRING_URI |
[23] | id | ::= | ID_PLAIN |
[24] | function | ::= | full_name |
[25] | ID_PLAIN | ::= | ID_START (ID_CORE)* |
[26] | ID_START | ::= | ALPHA / '_' |
[27] | ID_CORE | ::= | ID_START / DIGIT |
[28] | SCHEMA | ::= | ALPHA (ALPHA/DIGIT|'+'|'-'|'.')* |
[29] | URI_PATH | ::= | ALPHA/DIGIT|'_'|'-'|':'|'.'|'#'|'?'|'/' |
[30] | ALPHA | ::= | [a-z] / [A-Z] |
[31] | DIGIT | ::= | [0-9] |
[32] | STRING_URI | ::= | SCHEMA '://' (URI_PATH)* |
[33] | STRING_LITERAL | ::= | '"' .* '"' |
[34] | STRING_LITERAL2 | ::= | ''' .* ''' |
[35] | STRING_PREFIX | ::= | ID':' |
base <http://base.org/stuff/1.0/> prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p($x, $y) :- :q($x), r($y)
base <http://base.org/stuff/1.0/> prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> :q($x), r($y) -> abc:p($x, $y)
base <http://base.org/stuff/1.0/> prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p($x, $y) :- :q($x) ^ r($y)
prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p($x, $y) :- :q($x, "Person"), :r(:obj($y, "Student"), http://example.org/stuff/1.1/FUB)
prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p($x) :- :q($x, "Person") abc:r($y) :- :s($y, http://example.org/stuff/1.1/FUB) abc:t($z) :- :u($z, f(http://example.org/stuff/1.2/Occupation, "Student"))
prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p($x) :- :q($x, :rec1(http://example.org/stuff/1.1/FUB, :rec2(http://example.org/stuff/1.2/Occupation, :rec3(http://example.org/stuff/1.3/Degree, "Master"))))
prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> :- :q($x)
prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p($x) :-
base <http://base.org/stuff/1.0/> prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p(*) :- :q($x), r($y)
base <http://base.org/stuff/1.0/> prefix abc: <http://www.abc.org/1999/02/22-abc-syntax-ns#> prefix : <http://example.org/stuff/1.0/> abc:p() :- :q($x), r($y)
http://www.abc.org/1999/02/22-abc-syntax-ns#p($x, $y) :- http://example.org/stuff/1.0/q($x), http://base.org/stuff/1.0/r(http://example.org/stuff/1.0/s($y, "Student"), http://example.org/stuff/1.1/FUB)
- Quick Start Guide
- Easy-Tutorials
- More Tutorials
- Examples
- FAQ
- Using Ontop
- Learning more
- Troubleshooting
- Developer Guides
- Links