document = directive* statement-list directive = "@prefix" prefix ":" uri-ref2 "." // Namespace declaration | "@prefix" ":" uri-ref2 "." // Default namespace | "@equivalence" uri-ref2 "." // Alternative to daml:equivalent | "@listfirst" uri-ref2 "." // Alternative to n3:first | "@listrest" uri-ref2 "." // Alternative to n3:rest | "@listnull" uri-ref2 "." // Alternative to n3:null | "@plus" uri-ref2 "." // Alternative to operator:plus | "@minus" uri-ref2 "." // Alternative to operator:minus | "@slash" uri-ref2 "." // Alternative to operator:slash | "@star" uri-ref2 "." // Alternative to operator:star statement-list = [ statement ( "." statement )* ] statement = subject property-list property-list = [ property ( ";" property )* ] property = verb object-list | ":-" anon-node // Creates anon-node aongside the current node verb = ">-" prop "->" // has 'prop' of | "<-" prop "<-" // is 'prop' of | operator // has operator:'operator' of (???) | prop // has 'prop' of -- shorthand | "has" prop "of" // has 'prop' of | "is" prop "of" // is 'prop' of | "a" // has rdf:type of | "=" // has daml:equivalent of object-list = object | object "," object-list anon-node = "[" property-list "]" // Something with given properties | "{" statement-list "}" // List of reified statements as resource | "(" node-list ")" // Construct list with // n3:first, n3:rest, n3:null prop = uri-ref2 operator = "+" // >- operator:plus -> | "-" // >- operator:minus -> | "/" // >- operator:slash -> | "*" // >- operator:star-> subject = node object = lit-node node-list = lit-node* lit-node = node | '"' constant-value '"' | '"""' constant value '"""' // Including single or double occurences of // quotes and/or newlines node = uri-ref2 | anon-node uri-ref2 = qname | "<" URI-reference ">" | "this" qname = prefix ":" local-name prefix = name // Namespace prefix local-name = name // Local name (namespace qualified) name = alpha alphanumeric* alpha = "a"-"z" | "A"-"Z" | "_" alphanumeric = alpha | "0"-"9" URI-reference = (conforming to syntax in RFC2396)