ebnf 2.3.5 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/etc/turtle.ebnf CHANGED
@@ -1,70 +1,73 @@
1
- [1] turtleDoc ::= statement*
2
- [2] statement ::= directive | triples "."
3
- [3] directive ::= prefixID | base | sparqlPrefix | sparqlBase
4
- [4] prefixID ::= '@prefix' PNAME_NS IRIREF "."
5
- [5] base ::= '@base' IRIREF "."
6
- [28s] sparqlPrefix ::= SPARQL_PREFIX PNAME_NS IRIREF
7
- [29s] sparqlBase ::= SPARQL_BASE IRIREF
8
- [6] triples ::= subject predicateObjectList | blankNodePropertyList predicateObjectList?
9
- [7] predicateObjectList ::= verb objectList ( ";" ( verb objectList)? )*
10
- [8] objectList ::= object ( "," object )*
11
- [9] verb ::= predicate | "a"
12
- [10] subject ::= iri | BlankNode | collection
13
- [11] predicate ::= iri
14
- [12] object ::= iri | BlankNode | collection | blankNodePropertyList| literal
15
- [13] literal ::= RDFLiteral | NumericLiteral | BooleanLiteral
16
- [14] blankNodePropertyList ::= "[" predicateObjectList "]"
17
- [15] collection ::= "(" object* ")"
18
- [16] NumericLiteral ::= INTEGER | DECIMAL | DOUBLE
19
- [128s] RDFLiteral ::= String ( LANGTAG | ( "^^" iri ) )?
20
- [133s] BooleanLiteral ::= "true" | "false"
21
- [17] String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE | STRING_LITERAL_LONG_SINGLE_QUOTE |
22
- STRING_LITERAL_LONG_QUOTE
23
- [135s] iri ::= IRIREF | PrefixedName
24
- [136s] PrefixedName ::= PNAME_LN | PNAME_NS
25
- [137s] BlankNode ::= BLANK_NODE_LABEL | ANON
1
+ turtleDoc ::= statement*
2
+ statement ::= directive | triples '.'
3
+ directive ::= prefixID | base | sparqlPrefix | sparqlBase
4
+ prefixID ::= '@prefix' PNAME_NS IRIREF '.'
5
+ base ::= '@base' IRIREF '.'
6
+ sparqlPrefix ::= "PREFIX" PNAME_NS IRIREF
7
+ sparqlBase ::= "BASE" IRIREF
8
+ triples ::= subject predicateObjectList | blankNodePropertyList predicateObjectList?
9
+ predicateObjectList ::= verb objectList (';' (verb objectList)? )*
10
+ objectList ::= object ( ',' object )*
11
+ verb ::= predicate | 'a'
12
+ subject ::= iri | BlankNode | collection
13
+ predicate ::= iri
14
+ object ::= iri | BlankNode | collection | blankNodePropertyList | literal
15
+ literal ::= RDFLiteral | NumericLiteral | BooleanLiteral
16
+ blankNodePropertyList ::= '[' predicateObjectList ']'
17
+ collection ::= '(' object* ')'
18
+ NumericLiteral ::= INTEGER | DECIMAL | DOUBLE
19
+ RDFLiteral ::= String ( LANGTAG | ( '^^' iri ) )?
20
+ BooleanLiteral ::= 'true' | 'false'
21
+ String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE
22
+ | STRING_LITERAL_LONG_SINGLE_QUOTE | STRING_LITERAL_LONG_QUOTE
23
+ iri ::= IRIREF | PrefixedName
24
+ PrefixedName ::= PNAME_LN | PNAME_NS
25
+ BlankNode ::= BLANK_NODE_LABEL | ANON
26
26
 
27
27
  @terminals
28
28
 
29
- [18] IRIREF ::= '<' ([^<>"{}|^`\]-[#x00-#x20] | UCHAR)* '>'
30
- [139s] PNAME_NS ::= PN_PREFIX? ":"
31
- [140s] PNAME_LN ::= PNAME_NS PN_LOCAL
32
- [141s] BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?
33
- [144s] LANGTAG ::= "@" ([a-zA-Z])+ ( "-" ([a-zA-Z0-9])+ )*
34
- [19] INTEGER ::= [+-]? [0-9]+
35
- [20] DECIMAL ::= [+-]? ( ([0-9])* '.' ([0-9])+ )
36
- [21] DOUBLE ::= [+-]? ( [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+ EXPONENT )
37
- [154s] EXPONENT ::= [eE] [+-]? [0-9]+
38
- [22] STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"'
39
- [23] STRING_LITERAL_SINGLE_QUOTE ::= "'" ( [^#x27#x5C#xA#xD] | ECHAR | UCHAR )* "'"
40
- [24] STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR | UCHAR ) )* "'''"
41
- [25] STRING_LITERAL_LONG_QUOTE ::= '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR | UCHAR ) )* '"""'
42
- [26] UCHAR ::= ( "\u" HEX HEX HEX HEX ) | ( "\U" HEX HEX HEX HEX HEX HEX HEX HEX )
43
- [159s] ECHAR ::= "\" [tbnrf\"']
44
- [28t] SPARQL_PREFIX ::= [Pp][Rr][Ee][Ff][Ii][Xx]
45
- [29t] SPARQL_BASE ::= [Bb][Aa][Ss][Ee]
46
- [161s] WS ::= #x20 | #x9 | #xD | #xA
47
- [162s] ANON ::= "[" WS* "]"
48
- [163s] PN_CHARS_BASE ::= [A-Z]
49
- | [a-z]
50
- | [#x00C0-#x00D6]
51
- | [#x00D8-#x00F6]
52
- | [#x00F8-#x02FF]
53
- | [#x0370-#x037D]
54
- | [#x037F-#x1FFF]
55
- | [#x200C-#x200D]
56
- | [#x2070-#x218F]
57
- | [#x2C00-#x2FEF]
58
- | [#x3001-#xD7FF]
59
- | [#xF900-#xFDCF]
60
- | [#xFDF0-#xFFFD]
61
- | [#x10000-#xEFFFF]
62
- [164s] PN_CHARS_U ::= PN_CHARS_BASE | '_'
63
- [166s] PN_CHARS ::= PN_CHARS_U | "-" | [0-9] | #x00B7 | [#x0300-#x036F] | [#x203F-#x2040]
64
- [167s] PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | "." )* PN_CHARS )?
65
- [168s] PN_LOCAL ::= ( PN_CHARS_U | ':' | [0-9] | PLX ) ( ( PN_CHARS | '.' | ':' | PLX )* ( PN_CHARS | ':' | PLX ) ) ?
66
- [169s] PLX ::= PERCENT | PN_LOCAL_ESC
67
- [170s] PERCENT ::= '%' HEX HEX
68
- [171s] HEX ::= [0-9A-Fa-f]
69
- [172s] PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '='
70
- | '/' | '?' | '#' | '@' | '%' )
29
+ IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'
30
+ PNAME_NS ::= PN_PREFIX? ':'
31
+ PNAME_LN ::= PNAME_NS PN_LOCAL
32
+ BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?
33
+ LANGTAG ::= '@' [a-zA-Z]+ ( '-' [a-zA-Z0-9]+ )*
34
+ INTEGER ::= [+-]? [0-9]+
35
+ DECIMAL ::= [+-]? ( ([0-9])* '.' ([0-9])+ )
36
+ DOUBLE ::= [+-]? ( [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+ EXPONENT )
37
+ EXPONENT ::= [eE] [+-]? [0-9]+
38
+ STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"' /* #x22=" #x5C=\ #xA=new line #xD=carriage return */
39
+ STRING_LITERAL_SINGLE_QUOTE ::= "'" ( [^#x27#x5C#xA#xD] | ECHAR | UCHAR )* "'" /* #x27=' #x5C=\ #xA=new line #xD=carriage return */
40
+ STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR | UCHAR ) )* "'''"
41
+ STRING_LITERAL_LONG_QUOTE ::= '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR | UCHAR ) )* '"""'
42
+ UCHAR ::= ( '\u' HEX HEX HEX HEX ) | ( '\U' HEX HEX HEX HEX HEX HEX HEX HEX )
43
+ ECHAR ::= ('\' [tbnrf\"'])
44
+ NIL ::= '(' WS* ')'
45
+ WS ::= #x20 | #x9 | #xD | #xA /* #x20=space #x9=character tabulation #xD=carriage return #xA=new line */
46
+ ANON ::= '[' WS* ']'
47
+ PN_CHARS_BASE ::= ([A-Z]
48
+ | [a-z]
49
+ | [#x00C0-#x00D6]
50
+ | [#x00D8-#x00F6]
51
+ | [#x00F8-#x02FF]
52
+ | [#x0370-#x037D]
53
+ | [#x037F-#x1FFF]
54
+ | [#x200C-#x200D]
55
+ | [#x2070-#x218F]
56
+ | [#x2C00-#x2FEF]
57
+ | [#x3001-#xD7FF]
58
+ | [#xF900-#xFDCF]
59
+ | [#xFDF0-#xFFFD]
60
+ | [#x10000-#xEFFFF])
61
+ PN_CHARS_U ::= PN_CHARS_BASE | '_'
62
+ PN_CHARS ::= (PN_CHARS_U
63
+ | '-'
64
+ | [0-9]
65
+ | #x00B7
66
+ | [#x0300-#x036F]
67
+ | [#x203F-#x2040])
68
+ PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )?
69
+ PN_LOCAL ::= ( PN_CHARS_U | ':' | [0-9] | PLX ) ( ( PN_CHARS | '.' | ':' | PLX )* ( PN_CHARS | ':' | PLX ) ) ?
70
+ PLX ::= PERCENT | PN_LOCAL_ESC
71
+ PERCENT ::= '%' HEX HEX
72
+ HEX ::= ([0-9] | [A-F] | [a-f])
73
+ PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )