1
|
pentalsDoc
|
::=
|
line*
|
2
|
line
|
::=
|
ws* (comment | pental) ? eoln
|
3
|
comment
|
::=
|
'#' (character - ( cr | lf ) )*
|
4
|
pental
|
::=
|
subject ws+ predicateSlot ws+ object
ws+ ((context | ',') seq?)?
terminal? ws*
|
5
|
context
|
::=
|
name | nodeID | compoundName
|
6
|
subject
|
::=
|
name | nodeID | compoundName
|
7
|
predicateSlot
|
::=
|
name | compoundName
|
8
|
object
|
::=
|
name | compoundName | literal
|
9
|
seq
|
::=
|
realNumber
|
10
|
terminal
|
::=
|
'.' | '?' | '!'
|
11
|
uriref
|
::=
|
'<' absoluteURIref '>'
|
12
|
compoundName
|
::=
|
'(' ws* name (ws+ name)+ ws* ')'
|
13
|
name
|
::=
|
uriref | nameToken | namespacePrefix
':' nameToken
|
14
|
namespacePrefix
|
::=
|
namespacePrefix ::= [A-Za-z][A-Za-z0-9_]*
|
15
|
nodeID |
::=
|
'_:' nameToken
|
16
|
literal
|
::=
|
langstring | xmlString
|
17
|
langString
|
::=
|
'"' string '"' ('-' language)?
|
18
|
xmlString
|
::=
|
'xml' langString
|
19
|
language
|
::=
|
( character - ( '.' | ws ) )+
and containing any allowed xml:lang content as defined in
http://www.w3.org/TR/REC-xml#sec-lang-tag
|
20
|
ws
|
::=
|
space | tab
|
21
|
eoln
|
::=
|
cr | lf | cr lf
|
22
|
space
|
::=
|
#x20 /* US-ASCII space - decimal
32 */
|
23
|
cr
|
::=
|
#xD /* US-ASCII carriage return - decimal
13 */
|
24
|
lf
|
::=
|
#xA /* US-ASCII linefeed - decimal
10 */
|
25
|
tab
|
::=
|
#x9 /* US-ASCII horizontal tab - decimal
9 */
|
26
|
string
|
::=
|
character* with escapes. Defined in
section Strings
|
27
|
nameToken
|
::=
|
[A-Za-z0-9_]+
|
28
|
realNumber
|
::=
|
[0-9]+ ('.' [0-9]+)?
|
29
|
absoluteURIref
|
::=
|
defined in section URI References
also see
#rdfig discussion
|
30
|
character
|
::=
|
[#x20-#x7E] /* US-ASCII space to decimal
127 */
|